/*
Edge Application API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 2.0.0
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package edgeapplications

import (
	"encoding/json"
	"bytes"
	"fmt"
)

// checks if the ApplicationResultsCreate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ApplicationResultsCreate{}

// ApplicationResultsCreate struct for ApplicationResultsCreate
type ApplicationResultsCreate struct {
	Id int64 `json:"id"`
	Name string `json:"name"`
	Active bool `json:"active"`
	DebugRules bool `json:"debug_rules"`
	Http3 bool `json:"http3"`
	SupportedCiphers string `json:"supported_ciphers"`
	DeliveryProtocol string `json:"delivery_protocol"`
	HttpPort interface{} `json:"http_port"`
	HttpsPort interface{} `json:"https_port"`
	MinimumTlsVersion string `json:"minimum_tls_version"`
	ApplicationAcceleration bool `json:"application_acceleration"`
	Caching bool `json:"caching"`
	DeviceDetection bool `json:"device_detection"`
	EdgeFirewall bool `json:"edge_firewall"`
	EdgeFunctions bool `json:"edge_functions"`
	ImageOptimization bool `json:"image_optimization"`
	LoadBalancer bool `json:"load_balancer"`
	RawLogs bool `json:"raw_logs"`
	WebApplicationFirewall bool `json:"web_application_firewall"`
	L2Caching *bool `json:"l2_caching,omitempty"`
	Websocket *bool `json:"websocket,omitempty"`
}

type _ApplicationResultsCreate ApplicationResultsCreate

// NewApplicationResultsCreate instantiates a new ApplicationResultsCreate object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewApplicationResultsCreate(id int64, name string, active bool, debugRules bool, http3 bool, supportedCiphers string, deliveryProtocol string, httpPort interface{}, httpsPort interface{}, minimumTlsVersion string, applicationAcceleration bool, caching bool, deviceDetection bool, edgeFirewall bool, edgeFunctions bool, imageOptimization bool, loadBalancer bool, rawLogs bool, webApplicationFirewall bool) *ApplicationResultsCreate {
	this := ApplicationResultsCreate{}
	this.Id = id
	this.Name = name
	this.Active = active
	this.DebugRules = debugRules
	this.Http3 = http3
	this.SupportedCiphers = supportedCiphers
	this.DeliveryProtocol = deliveryProtocol
	this.HttpPort = httpPort
	this.HttpsPort = httpsPort
	this.MinimumTlsVersion = minimumTlsVersion
	this.ApplicationAcceleration = applicationAcceleration
	this.Caching = caching
	this.DeviceDetection = deviceDetection
	this.EdgeFirewall = edgeFirewall
	this.EdgeFunctions = edgeFunctions
	this.ImageOptimization = imageOptimization
	this.LoadBalancer = loadBalancer
	this.RawLogs = rawLogs
	this.WebApplicationFirewall = webApplicationFirewall
	return &this
}

// NewApplicationResultsCreateWithDefaults instantiates a new ApplicationResultsCreate object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewApplicationResultsCreateWithDefaults() *ApplicationResultsCreate {
	this := ApplicationResultsCreate{}
	return &this
}

// GetId returns the Id field value
func (o *ApplicationResultsCreate) GetId() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.Id
}

// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetIdOk() (*int64, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Id, true
}

// SetId sets field value
func (o *ApplicationResultsCreate) SetId(v int64) {
	o.Id = v
}

// GetName returns the Name field value
func (o *ApplicationResultsCreate) GetName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Name
}

// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Name, true
}

// SetName sets field value
func (o *ApplicationResultsCreate) SetName(v string) {
	o.Name = v
}

// GetActive returns the Active field value
func (o *ApplicationResultsCreate) GetActive() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Active
}

// GetActiveOk returns a tuple with the Active field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetActiveOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Active, true
}

// SetActive sets field value
func (o *ApplicationResultsCreate) SetActive(v bool) {
	o.Active = v
}

// GetDebugRules returns the DebugRules field value
func (o *ApplicationResultsCreate) GetDebugRules() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.DebugRules
}

// GetDebugRulesOk returns a tuple with the DebugRules field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetDebugRulesOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.DebugRules, true
}

// SetDebugRules sets field value
func (o *ApplicationResultsCreate) SetDebugRules(v bool) {
	o.DebugRules = v
}

// GetHttp3 returns the Http3 field value
func (o *ApplicationResultsCreate) GetHttp3() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Http3
}

// GetHttp3Ok returns a tuple with the Http3 field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetHttp3Ok() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Http3, true
}

// SetHttp3 sets field value
func (o *ApplicationResultsCreate) SetHttp3(v bool) {
	o.Http3 = v
}

// GetSupportedCiphers returns the SupportedCiphers field value
func (o *ApplicationResultsCreate) GetSupportedCiphers() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.SupportedCiphers
}

// GetSupportedCiphersOk returns a tuple with the SupportedCiphers field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetSupportedCiphersOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.SupportedCiphers, true
}

// SetSupportedCiphers sets field value
func (o *ApplicationResultsCreate) SetSupportedCiphers(v string) {
	o.SupportedCiphers = v
}

// GetDeliveryProtocol returns the DeliveryProtocol field value
func (o *ApplicationResultsCreate) GetDeliveryProtocol() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.DeliveryProtocol
}

// GetDeliveryProtocolOk returns a tuple with the DeliveryProtocol field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetDeliveryProtocolOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.DeliveryProtocol, true
}

// SetDeliveryProtocol sets field value
func (o *ApplicationResultsCreate) SetDeliveryProtocol(v string) {
	o.DeliveryProtocol = v
}

// GetHttpPort returns the HttpPort field value
// If the value is explicit nil, the zero value for interface{} will be returned
func (o *ApplicationResultsCreate) GetHttpPort() interface{} {
	if o == nil {
		var ret interface{}
		return ret
	}

	return o.HttpPort
}

// GetHttpPortOk returns a tuple with the HttpPort field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ApplicationResultsCreate) GetHttpPortOk() (*interface{}, bool) {
	if o == nil || IsNil(o.HttpPort) {
		return nil, false
	}
	return &o.HttpPort, true
}

// SetHttpPort sets field value
func (o *ApplicationResultsCreate) SetHttpPort(v interface{}) {
	o.HttpPort = v
}

// GetHttpsPort returns the HttpsPort field value
// If the value is explicit nil, the zero value for interface{} will be returned
func (o *ApplicationResultsCreate) GetHttpsPort() interface{} {
	if o == nil {
		var ret interface{}
		return ret
	}

	return o.HttpsPort
}

// GetHttpsPortOk returns a tuple with the HttpsPort field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ApplicationResultsCreate) GetHttpsPortOk() (*interface{}, bool) {
	if o == nil || IsNil(o.HttpsPort) {
		return nil, false
	}
	return &o.HttpsPort, true
}

// SetHttpsPort sets field value
func (o *ApplicationResultsCreate) SetHttpsPort(v interface{}) {
	o.HttpsPort = v
}

// GetMinimumTlsVersion returns the MinimumTlsVersion field value
func (o *ApplicationResultsCreate) GetMinimumTlsVersion() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.MinimumTlsVersion
}

// GetMinimumTlsVersionOk returns a tuple with the MinimumTlsVersion field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetMinimumTlsVersionOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.MinimumTlsVersion, true
}

// SetMinimumTlsVersion sets field value
func (o *ApplicationResultsCreate) SetMinimumTlsVersion(v string) {
	o.MinimumTlsVersion = v
}

// GetApplicationAcceleration returns the ApplicationAcceleration field value
func (o *ApplicationResultsCreate) GetApplicationAcceleration() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.ApplicationAcceleration
}

// GetApplicationAccelerationOk returns a tuple with the ApplicationAcceleration field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetApplicationAccelerationOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.ApplicationAcceleration, true
}

// SetApplicationAcceleration sets field value
func (o *ApplicationResultsCreate) SetApplicationAcceleration(v bool) {
	o.ApplicationAcceleration = v
}

// GetCaching returns the Caching field value
func (o *ApplicationResultsCreate) GetCaching() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Caching
}

// GetCachingOk returns a tuple with the Caching field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetCachingOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Caching, true
}

// SetCaching sets field value
func (o *ApplicationResultsCreate) SetCaching(v bool) {
	o.Caching = v
}

// GetDeviceDetection returns the DeviceDetection field value
func (o *ApplicationResultsCreate) GetDeviceDetection() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.DeviceDetection
}

// GetDeviceDetectionOk returns a tuple with the DeviceDetection field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetDeviceDetectionOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.DeviceDetection, true
}

// SetDeviceDetection sets field value
func (o *ApplicationResultsCreate) SetDeviceDetection(v bool) {
	o.DeviceDetection = v
}

// GetEdgeFirewall returns the EdgeFirewall field value
func (o *ApplicationResultsCreate) GetEdgeFirewall() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.EdgeFirewall
}

// GetEdgeFirewallOk returns a tuple with the EdgeFirewall field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetEdgeFirewallOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.EdgeFirewall, true
}

// SetEdgeFirewall sets field value
func (o *ApplicationResultsCreate) SetEdgeFirewall(v bool) {
	o.EdgeFirewall = v
}

// GetEdgeFunctions returns the EdgeFunctions field value
func (o *ApplicationResultsCreate) GetEdgeFunctions() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.EdgeFunctions
}

// GetEdgeFunctionsOk returns a tuple with the EdgeFunctions field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetEdgeFunctionsOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.EdgeFunctions, true
}

// SetEdgeFunctions sets field value
func (o *ApplicationResultsCreate) SetEdgeFunctions(v bool) {
	o.EdgeFunctions = v
}

// GetImageOptimization returns the ImageOptimization field value
func (o *ApplicationResultsCreate) GetImageOptimization() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.ImageOptimization
}

// GetImageOptimizationOk returns a tuple with the ImageOptimization field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetImageOptimizationOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.ImageOptimization, true
}

// SetImageOptimization sets field value
func (o *ApplicationResultsCreate) SetImageOptimization(v bool) {
	o.ImageOptimization = v
}

// GetLoadBalancer returns the LoadBalancer field value
func (o *ApplicationResultsCreate) GetLoadBalancer() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.LoadBalancer
}

// GetLoadBalancerOk returns a tuple with the LoadBalancer field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetLoadBalancerOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.LoadBalancer, true
}

// SetLoadBalancer sets field value
func (o *ApplicationResultsCreate) SetLoadBalancer(v bool) {
	o.LoadBalancer = v
}

// GetRawLogs returns the RawLogs field value
func (o *ApplicationResultsCreate) GetRawLogs() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.RawLogs
}

// GetRawLogsOk returns a tuple with the RawLogs field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetRawLogsOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.RawLogs, true
}

// SetRawLogs sets field value
func (o *ApplicationResultsCreate) SetRawLogs(v bool) {
	o.RawLogs = v
}

// GetWebApplicationFirewall returns the WebApplicationFirewall field value
func (o *ApplicationResultsCreate) GetWebApplicationFirewall() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.WebApplicationFirewall
}

// GetWebApplicationFirewallOk returns a tuple with the WebApplicationFirewall field value
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetWebApplicationFirewallOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.WebApplicationFirewall, true
}

// SetWebApplicationFirewall sets field value
func (o *ApplicationResultsCreate) SetWebApplicationFirewall(v bool) {
	o.WebApplicationFirewall = v
}

// GetL2Caching returns the L2Caching field value if set, zero value otherwise.
func (o *ApplicationResultsCreate) GetL2Caching() bool {
	if o == nil || IsNil(o.L2Caching) {
		var ret bool
		return ret
	}
	return *o.L2Caching
}

// GetL2CachingOk returns a tuple with the L2Caching field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetL2CachingOk() (*bool, bool) {
	if o == nil || IsNil(o.L2Caching) {
		return nil, false
	}
	return o.L2Caching, true
}

// HasL2Caching returns a boolean if a field has been set.
func (o *ApplicationResultsCreate) HasL2Caching() bool {
	if o != nil && !IsNil(o.L2Caching) {
		return true
	}

	return false
}

// SetL2Caching gets a reference to the given bool and assigns it to the L2Caching field.
func (o *ApplicationResultsCreate) SetL2Caching(v bool) {
	o.L2Caching = &v
}

// GetWebsocket returns the Websocket field value if set, zero value otherwise.
func (o *ApplicationResultsCreate) GetWebsocket() bool {
	if o == nil || IsNil(o.Websocket) {
		var ret bool
		return ret
	}
	return *o.Websocket
}

// GetWebsocketOk returns a tuple with the Websocket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ApplicationResultsCreate) GetWebsocketOk() (*bool, bool) {
	if o == nil || IsNil(o.Websocket) {
		return nil, false
	}
	return o.Websocket, true
}

// HasWebsocket returns a boolean if a field has been set.
func (o *ApplicationResultsCreate) HasWebsocket() bool {
	if o != nil && !IsNil(o.Websocket) {
		return true
	}

	return false
}

// SetWebsocket gets a reference to the given bool and assigns it to the Websocket field.
func (o *ApplicationResultsCreate) SetWebsocket(v bool) {
	o.Websocket = &v
}

func (o ApplicationResultsCreate) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o ApplicationResultsCreate) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["id"] = o.Id
	toSerialize["name"] = o.Name
	toSerialize["active"] = o.Active
	toSerialize["debug_rules"] = o.DebugRules
	toSerialize["http3"] = o.Http3
	toSerialize["supported_ciphers"] = o.SupportedCiphers
	toSerialize["delivery_protocol"] = o.DeliveryProtocol
	if o.HttpPort != nil {
		toSerialize["http_port"] = o.HttpPort
	}
	if o.HttpsPort != nil {
		toSerialize["https_port"] = o.HttpsPort
	}
	toSerialize["minimum_tls_version"] = o.MinimumTlsVersion
	toSerialize["application_acceleration"] = o.ApplicationAcceleration
	toSerialize["caching"] = o.Caching
	toSerialize["device_detection"] = o.DeviceDetection
	toSerialize["edge_firewall"] = o.EdgeFirewall
	toSerialize["edge_functions"] = o.EdgeFunctions
	toSerialize["image_optimization"] = o.ImageOptimization
	toSerialize["load_balancer"] = o.LoadBalancer
	toSerialize["raw_logs"] = o.RawLogs
	toSerialize["web_application_firewall"] = o.WebApplicationFirewall
	if !IsNil(o.L2Caching) {
		toSerialize["l2_caching"] = o.L2Caching
	}
	if !IsNil(o.Websocket) {
		toSerialize["websocket"] = o.Websocket
	}
	return toSerialize, nil
}

func (o *ApplicationResultsCreate) UnmarshalJSON(data []byte) (err error) {
	// This validates that all required properties are included in the JSON object
	// by unmarshalling the object into a generic map with string keys and checking
	// that every required field exists as a key in the generic map.
	requiredProperties := []string{
		"id",
		"name",
		"active",
		"debug_rules",
		"http3",
		"supported_ciphers",
		"delivery_protocol",
		"http_port",
		"https_port",
		"minimum_tls_version",
		"application_acceleration",
		"caching",
		"device_detection",
		"edge_firewall",
		"edge_functions",
		"image_optimization",
		"load_balancer",
		"raw_logs",
		"web_application_firewall",
	}

	allProperties := make(map[string]interface{})

	err = json.Unmarshal(data, &allProperties)

	if err != nil {
		return err;
	}

	for _, requiredProperty := range(requiredProperties) {
		if _, exists := allProperties[requiredProperty]; !exists {
			return fmt.Errorf("no value given for required property %v", requiredProperty)
		}
	}

	varApplicationResultsCreate := _ApplicationResultsCreate{}

	decoder := json.NewDecoder(bytes.NewReader(data))
	decoder.DisallowUnknownFields()
	err = decoder.Decode(&varApplicationResultsCreate)

	if err != nil {
		return err
	}

	*o = ApplicationResultsCreate(varApplicationResultsCreate)

	return err
}

type NullableApplicationResultsCreate struct {
	value *ApplicationResultsCreate
	isSet bool
}

func (v NullableApplicationResultsCreate) Get() *ApplicationResultsCreate {
	return v.value
}

func (v *NullableApplicationResultsCreate) Set(val *ApplicationResultsCreate) {
	v.value = val
	v.isSet = true
}

func (v NullableApplicationResultsCreate) IsSet() bool {
	return v.isSet
}

func (v *NullableApplicationResultsCreate) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableApplicationResultsCreate(val *ApplicationResultsCreate) *NullableApplicationResultsCreate {
	return &NullableApplicationResultsCreate{value: val, isSet: true}
}

func (v NullableApplicationResultsCreate) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableApplicationResultsCreate) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


