/*
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 EdgeFirewall type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EdgeFirewall{}

// EdgeFirewall struct for EdgeFirewall
type EdgeFirewall struct {
	Id *int64 `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	IsActive *bool `json:"is_active,omitempty"`
	LastEditor *string `json:"last_editor,omitempty"`
	LastModified *string `json:"last_modified,omitempty"`
	EdgeFunctionsEnabled *bool `json:"edge_functions_enabled,omitempty"`
	NetworkProtectionEnabled *bool `json:"network_protection_enabled,omitempty"`
	WafEnabled *bool `json:"waf_enabled,omitempty"`
	DebugRules *bool `json:"debug_rules,omitempty"`
	Domains []int64 `json:"domains,omitempty"`
}

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

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

// GetId returns the Id field value if set, zero value otherwise.
func (o *EdgeFirewall) GetId() int64 {
	if o == nil || IsNil(o.Id) {
		var ret int64
		return ret
	}
	return *o.Id
}

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

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

	return false
}

// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *EdgeFirewall) SetId(v int64) {
	o.Id = &v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) SetName(v string) {
	o.Name = &v
}

// GetIsActive returns the IsActive field value if set, zero value otherwise.
func (o *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) SetIsActive(v bool) {
	o.IsActive = &v
}

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

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

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

	return false
}

// SetLastEditor gets a reference to the given string and assigns it to the LastEditor field.
func (o *EdgeFirewall) SetLastEditor(v string) {
	o.LastEditor = &v
}

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

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

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

	return false
}

// SetLastModified gets a reference to the given string and assigns it to the LastModified field.
func (o *EdgeFirewall) SetLastModified(v string) {
	o.LastModified = &v
}

// GetEdgeFunctionsEnabled returns the EdgeFunctionsEnabled field value if set, zero value otherwise.
func (o *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) SetEdgeFunctionsEnabled(v bool) {
	o.EdgeFunctionsEnabled = &v
}

// GetNetworkProtectionEnabled returns the NetworkProtectionEnabled field value if set, zero value otherwise.
func (o *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) SetNetworkProtectionEnabled(v bool) {
	o.NetworkProtectionEnabled = &v
}

// GetWafEnabled returns the WafEnabled field value if set, zero value otherwise.
func (o *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) SetWafEnabled(v bool) {
	o.WafEnabled = &v
}

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

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

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

	return false
}

// SetDebugRules gets a reference to the given bool and assigns it to the DebugRules field.
func (o *EdgeFirewall) SetDebugRules(v bool) {
	o.DebugRules = &v
}

// GetDomains returns the Domains field value if set, zero value otherwise.
func (o *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) 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 *EdgeFirewall) SetDomains(v []int64) {
	o.Domains = v
}

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

func (o EdgeFirewall) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.IsActive) {
		toSerialize["is_active"] = o.IsActive
	}
	if !IsNil(o.LastEditor) {
		toSerialize["last_editor"] = o.LastEditor
	}
	if !IsNil(o.LastModified) {
		toSerialize["last_modified"] = o.LastModified
	}
	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
	}
	if !IsNil(o.DebugRules) {
		toSerialize["debug_rules"] = o.DebugRules
	}
	if !IsNil(o.Domains) {
		toSerialize["domains"] = o.Domains
	}
	return toSerialize, nil
}

type NullableEdgeFirewall struct {
	value *EdgeFirewall
	isSet bool
}

func (v NullableEdgeFirewall) Get() *EdgeFirewall {
	return v.value
}

func (v *NullableEdgeFirewall) Set(val *EdgeFirewall) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableEdgeFirewall(val *EdgeFirewall) *NullableEdgeFirewall {
	return &NullableEdgeFirewall{value: val, isSet: true}
}

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

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


