/*
Intelligent DNS API

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

API version: 1.0.0
*/

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

package idns

import (
	"encoding/json"
)

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

// DnsSec struct for DnsSec
type DnsSec struct {
	IsEnabled *bool `json:"is_enabled,omitempty"`
	Status *string `json:"status,omitempty"`
	DelegationSigner *DnsSecDelegationSigner `json:"delegation_signer,omitempty"`
}

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

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

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

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

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

	return false
}

// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field.
func (o *DnsSec) SetIsEnabled(v bool) {
	o.IsEnabled = &v
}

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

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

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

	return false
}

// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *DnsSec) SetStatus(v string) {
	o.Status = &v
}

// GetDelegationSigner returns the DelegationSigner field value if set, zero value otherwise.
func (o *DnsSec) GetDelegationSigner() DnsSecDelegationSigner {
	if o == nil || IsNil(o.DelegationSigner) {
		var ret DnsSecDelegationSigner
		return ret
	}
	return *o.DelegationSigner
}

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

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

	return false
}

// SetDelegationSigner gets a reference to the given DnsSecDelegationSigner and assigns it to the DelegationSigner field.
func (o *DnsSec) SetDelegationSigner(v DnsSecDelegationSigner) {
	o.DelegationSigner = &v
}

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

func (o DnsSec) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.IsEnabled) {
		toSerialize["is_enabled"] = o.IsEnabled
	}
	if !IsNil(o.Status) {
		toSerialize["status"] = o.Status
	}
	if !IsNil(o.DelegationSigner) {
		toSerialize["delegation_signer"] = o.DelegationSigner
	}
	return toSerialize, nil
}

type NullableDnsSec struct {
	value *DnsSec
	isSet bool
}

func (v NullableDnsSec) Get() *DnsSec {
	return v.value
}

func (v *NullableDnsSec) Set(val *DnsSec) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDnsSec(val *DnsSec) *NullableDnsSec {
	return &NullableDnsSec{value: val, isSet: true}
}

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

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


