/*
Edge Firewall 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 edgefirewall

import (
	"encoding/json"
)

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

// UpdateEdgeFirewallRequest struct for UpdateEdgeFirewallRequest
type UpdateEdgeFirewallRequest struct {
	Name *string `json:"name,omitempty"`
	Domains []int64 `json:"domains,omitempty"`
	IsActive *bool `json:"is_active,omitempty"`
	EdgeFunctionsEnabled *bool `json:"edge_functions_enabled,omitempty"`
	NetworkProtectionEnabled *bool `json:"network_protection_enabled,omitempty"`
	WafEnabled *bool `json:"waf_enabled,omitempty"`
}

// NewUpdateEdgeFirewallRequest instantiates a new UpdateEdgeFirewallRequest 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 NewUpdateEdgeFirewallRequest() *UpdateEdgeFirewallRequest {
	this := UpdateEdgeFirewallRequest{}
	return &this
}

// NewUpdateEdgeFirewallRequestWithDefaults instantiates a new UpdateEdgeFirewallRequest 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 NewUpdateEdgeFirewallRequestWithDefaults() *UpdateEdgeFirewallRequest {
	this := UpdateEdgeFirewallRequest{}
	return &this
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateEdgeFirewallRequest) GetName() string {
	if o == nil || IsNil(o.Name) {
		var ret string
		return ret
	}
	return *o.Name
}

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

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

	return false
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateEdgeFirewallRequest) SetName(v string) {
	o.Name = &v
}

// GetDomains returns the Domains field value if set, zero value otherwise.
func (o *UpdateEdgeFirewallRequest) GetDomains() []int64 {
	if o == nil || IsNil(o.Domains) {
		var ret []int64
		return ret
	}
	return o.Domains
}

// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateEdgeFirewallRequest) GetDomainsOk() ([]int64, bool) {
	if o == nil || IsNil(o.Domains) {
		return nil, false
	}
	return o.Domains, true
}

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

	return false
}

// SetDomains gets a reference to the given []int64 and assigns it to the Domains field.
func (o *UpdateEdgeFirewallRequest) SetDomains(v []int64) {
	o.Domains = v
}

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

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

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

	return false
}

// SetIsActive gets a reference to the given bool and assigns it to the IsActive field.
func (o *UpdateEdgeFirewallRequest) SetIsActive(v bool) {
	o.IsActive = &v
}

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

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

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

	return false
}

// SetEdgeFunctionsEnabled gets a reference to the given bool and assigns it to the EdgeFunctionsEnabled field.
func (o *UpdateEdgeFirewallRequest) SetEdgeFunctionsEnabled(v bool) {
	o.EdgeFunctionsEnabled = &v
}

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

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

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

	return false
}

// SetNetworkProtectionEnabled gets a reference to the given bool and assigns it to the NetworkProtectionEnabled field.
func (o *UpdateEdgeFirewallRequest) SetNetworkProtectionEnabled(v bool) {
	o.NetworkProtectionEnabled = &v
}

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

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

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

	return false
}

// SetWafEnabled gets a reference to the given bool and assigns it to the WafEnabled field.
func (o *UpdateEdgeFirewallRequest) SetWafEnabled(v bool) {
	o.WafEnabled = &v
}

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

func (o UpdateEdgeFirewallRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.Domains) {
		toSerialize["domains"] = o.Domains
	}
	if !IsNil(o.IsActive) {
		toSerialize["is_active"] = o.IsActive
	}
	if !IsNil(o.EdgeFunctionsEnabled) {
		toSerialize["edge_functions_enabled"] = o.EdgeFunctionsEnabled
	}
	if !IsNil(o.NetworkProtectionEnabled) {
		toSerialize["network_protection_enabled"] = o.NetworkProtectionEnabled
	}
	if !IsNil(o.WafEnabled) {
		toSerialize["waf_enabled"] = o.WafEnabled
	}
	return toSerialize, nil
}

type NullableUpdateEdgeFirewallRequest struct {
	value *UpdateEdgeFirewallRequest
	isSet bool
}

func (v NullableUpdateEdgeFirewallRequest) Get() *UpdateEdgeFirewallRequest {
	return v.value
}

func (v *NullableUpdateEdgeFirewallRequest) Set(val *UpdateEdgeFirewallRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUpdateEdgeFirewallRequest(val *UpdateEdgeFirewallRequest) *NullableUpdateEdgeFirewallRequest {
	return &NullableUpdateEdgeFirewallRequest{value: val, isSet: true}
}

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

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


