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

// SetWAFRuleSetDetails struct for SetWAFRuleSetDetails
type SetWAFRuleSetDetails struct {
	WafId *int32 `json:"waf_id,omitempty"`
	Mode *string `json:"mode,omitempty"`
}

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

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

// GetWafId returns the WafId field value if set, zero value otherwise.
func (o *SetWAFRuleSetDetails) GetWafId() int32 {
	if o == nil || IsNil(o.WafId) {
		var ret int32
		return ret
	}
	return *o.WafId
}

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

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

	return false
}

// SetWafId gets a reference to the given int32 and assigns it to the WafId field.
func (o *SetWAFRuleSetDetails) SetWafId(v int32) {
	o.WafId = &v
}

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

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

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

	return false
}

// SetMode gets a reference to the given string and assigns it to the Mode field.
func (o *SetWAFRuleSetDetails) SetMode(v string) {
	o.Mode = &v
}

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

func (o SetWAFRuleSetDetails) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.WafId) {
		toSerialize["waf_id"] = o.WafId
	}
	if !IsNil(o.Mode) {
		toSerialize["mode"] = o.Mode
	}
	return toSerialize, nil
}

type NullableSetWAFRuleSetDetails struct {
	value *SetWAFRuleSetDetails
	isSet bool
}

func (v NullableSetWAFRuleSetDetails) Get() *SetWAFRuleSetDetails {
	return v.value
}

func (v *NullableSetWAFRuleSetDetails) Set(val *SetWAFRuleSetDetails) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableSetWAFRuleSetDetails(val *SetWAFRuleSetDetails) *NullableSetWAFRuleSetDetails {
	return &NullableSetWAFRuleSetDetails{value: val, isSet: true}
}

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

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


