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

// CreateRuleSetRequest struct for CreateRuleSetRequest
type CreateRuleSetRequest struct {
	Name *string `json:"name,omitempty"`
	IsActive *bool `json:"is_active,omitempty"`
	Behaviors []Behaviors `json:"behaviors,omitempty"`
	Criteria [][]SSLVerificationStatusCriteria `json:"criteria,omitempty"`
}

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

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

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

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

// GetBehaviors returns the Behaviors field value if set, zero value otherwise.
func (o *CreateRuleSetRequest) GetBehaviors() []Behaviors {
	if o == nil || IsNil(o.Behaviors) {
		var ret []Behaviors
		return ret
	}
	return o.Behaviors
}

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

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

	return false
}

// SetBehaviors gets a reference to the given []Behaviors and assigns it to the Behaviors field.
func (o *CreateRuleSetRequest) SetBehaviors(v []Behaviors) {
	o.Behaviors = v
}

// GetCriteria returns the Criteria field value if set, zero value otherwise.
func (o *CreateRuleSetRequest) GetCriteria() [][]SSLVerificationStatusCriteria {
	if o == nil || IsNil(o.Criteria) {
		var ret [][]SSLVerificationStatusCriteria
		return ret
	}
	return o.Criteria
}

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

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

	return false
}

// SetCriteria gets a reference to the given [][]SSLVerificationStatusCriteria and assigns it to the Criteria field.
func (o *CreateRuleSetRequest) SetCriteria(v [][]SSLVerificationStatusCriteria) {
	o.Criteria = v
}

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

func (o CreateRuleSetRequest) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.IsActive) {
		toSerialize["is_active"] = o.IsActive
	}
	if !IsNil(o.Behaviors) {
		toSerialize["behaviors"] = o.Behaviors
	}
	if !IsNil(o.Criteria) {
		toSerialize["criteria"] = o.Criteria
	}
	return toSerialize, nil
}

type NullableCreateRuleSetRequest struct {
	value *CreateRuleSetRequest
	isSet bool
}

func (v NullableCreateRuleSetRequest) Get() *CreateRuleSetRequest {
	return v.value
}

func (v *NullableCreateRuleSetRequest) Set(val *CreateRuleSetRequest) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableCreateRuleSetRequest(val *CreateRuleSetRequest) *NullableCreateRuleSetRequest {
	return &NullableCreateRuleSetRequest{value: val, isSet: true}
}

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

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


