/*
Domain 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 domains

import (
	"encoding/json"
)

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

// DomainEntityResponse struct for DomainEntityResponse
type DomainEntityResponse struct {
	Name *string `json:"name,omitempty"`
	Cnames []string `json:"cnames,omitempty"`
	CnameAccessOnly *bool `json:"cname_access_only,omitempty"`
	IsActive *bool `json:"is_active,omitempty"`
	EdgeApplicationId *int64 `json:"edge_application_id,omitempty"`
	DigitalCertificateId *int64 `json:"digital_certificate_id,omitempty"`
	Environment *string `json:"environment,omitempty"`
	IsMtlsEnabled *bool `json:"is_mtls_enabled,omitempty"`
	MtlsTrustedCaCertificateId NullableInt64 `json:"mtls_trusted_ca_certificate_id,omitempty"`
	EdgeFirewallId NullableInt64 `json:"edge_firewall_id,omitempty"`
	MtlsVerification *string `json:"mtls_verification,omitempty"`
	CrlList []int64 `json:"crl_list,omitempty"`
	Id *int64 `json:"id,omitempty"`
	DomainName *string `json:"domain_name,omitempty"`
}

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

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

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

// GetCnames returns the Cnames field value if set, zero value otherwise.
func (o *DomainEntityResponse) GetCnames() []string {
	if o == nil || IsNil(o.Cnames) {
		var ret []string
		return ret
	}
	return o.Cnames
}

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

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

	return false
}

// SetCnames gets a reference to the given []string and assigns it to the Cnames field.
func (o *DomainEntityResponse) SetCnames(v []string) {
	o.Cnames = v
}

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

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

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

	return false
}

// SetCnameAccessOnly gets a reference to the given bool and assigns it to the CnameAccessOnly field.
func (o *DomainEntityResponse) SetCnameAccessOnly(v bool) {
	o.CnameAccessOnly = &v
}

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

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

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

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

	return false
}

// SetEdgeApplicationId gets a reference to the given int64 and assigns it to the EdgeApplicationId field.
func (o *DomainEntityResponse) SetEdgeApplicationId(v int64) {
	o.EdgeApplicationId = &v
}

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

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

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

	return false
}

// SetDigitalCertificateId gets a reference to the given int64 and assigns it to the DigitalCertificateId field.
func (o *DomainEntityResponse) SetDigitalCertificateId(v int64) {
	o.DigitalCertificateId = &v
}

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

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

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

	return false
}

// SetEnvironment gets a reference to the given string and assigns it to the Environment field.
func (o *DomainEntityResponse) SetEnvironment(v string) {
	o.Environment = &v
}

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

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

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

	return false
}

// SetIsMtlsEnabled gets a reference to the given bool and assigns it to the IsMtlsEnabled field.
func (o *DomainEntityResponse) SetIsMtlsEnabled(v bool) {
	o.IsMtlsEnabled = &v
}

// GetMtlsTrustedCaCertificateId returns the MtlsTrustedCaCertificateId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DomainEntityResponse) GetMtlsTrustedCaCertificateId() int64 {
	if o == nil || IsNil(o.MtlsTrustedCaCertificateId.Get()) {
		var ret int64
		return ret
	}
	return *o.MtlsTrustedCaCertificateId.Get()
}

// GetMtlsTrustedCaCertificateIdOk returns a tuple with the MtlsTrustedCaCertificateId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DomainEntityResponse) GetMtlsTrustedCaCertificateIdOk() (*int64, bool) {
	if o == nil {
		return nil, false
	}
	return o.MtlsTrustedCaCertificateId.Get(), o.MtlsTrustedCaCertificateId.IsSet()
}

// HasMtlsTrustedCaCertificateId returns a boolean if a field has been set.
func (o *DomainEntityResponse) HasMtlsTrustedCaCertificateId() bool {
	if o != nil && o.MtlsTrustedCaCertificateId.IsSet() {
		return true
	}

	return false
}

// SetMtlsTrustedCaCertificateId gets a reference to the given NullableInt64 and assigns it to the MtlsTrustedCaCertificateId field.
func (o *DomainEntityResponse) SetMtlsTrustedCaCertificateId(v int64) {
	o.MtlsTrustedCaCertificateId.Set(&v)
}
// SetMtlsTrustedCaCertificateIdNil sets the value for MtlsTrustedCaCertificateId to be an explicit nil
func (o *DomainEntityResponse) SetMtlsTrustedCaCertificateIdNil() {
	o.MtlsTrustedCaCertificateId.Set(nil)
}

// UnsetMtlsTrustedCaCertificateId ensures that no value is present for MtlsTrustedCaCertificateId, not even an explicit nil
func (o *DomainEntityResponse) UnsetMtlsTrustedCaCertificateId() {
	o.MtlsTrustedCaCertificateId.Unset()
}

// GetEdgeFirewallId returns the EdgeFirewallId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DomainEntityResponse) GetEdgeFirewallId() int64 {
	if o == nil || IsNil(o.EdgeFirewallId.Get()) {
		var ret int64
		return ret
	}
	return *o.EdgeFirewallId.Get()
}

// GetEdgeFirewallIdOk returns a tuple with the EdgeFirewallId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DomainEntityResponse) GetEdgeFirewallIdOk() (*int64, bool) {
	if o == nil {
		return nil, false
	}
	return o.EdgeFirewallId.Get(), o.EdgeFirewallId.IsSet()
}

// HasEdgeFirewallId returns a boolean if a field has been set.
func (o *DomainEntityResponse) HasEdgeFirewallId() bool {
	if o != nil && o.EdgeFirewallId.IsSet() {
		return true
	}

	return false
}

// SetEdgeFirewallId gets a reference to the given NullableInt64 and assigns it to the EdgeFirewallId field.
func (o *DomainEntityResponse) SetEdgeFirewallId(v int64) {
	o.EdgeFirewallId.Set(&v)
}
// SetEdgeFirewallIdNil sets the value for EdgeFirewallId to be an explicit nil
func (o *DomainEntityResponse) SetEdgeFirewallIdNil() {
	o.EdgeFirewallId.Set(nil)
}

// UnsetEdgeFirewallId ensures that no value is present for EdgeFirewallId, not even an explicit nil
func (o *DomainEntityResponse) UnsetEdgeFirewallId() {
	o.EdgeFirewallId.Unset()
}

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

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

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

	return false
}

// SetMtlsVerification gets a reference to the given string and assigns it to the MtlsVerification field.
func (o *DomainEntityResponse) SetMtlsVerification(v string) {
	o.MtlsVerification = &v
}

// GetCrlList returns the CrlList field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *DomainEntityResponse) GetCrlList() []int64 {
	if o == nil {
		var ret []int64
		return ret
	}
	return o.CrlList
}

// GetCrlListOk returns a tuple with the CrlList field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *DomainEntityResponse) GetCrlListOk() ([]int64, bool) {
	if o == nil || IsNil(o.CrlList) {
		return nil, false
	}
	return o.CrlList, true
}

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

	return false
}

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

// GetId returns the Id field value if set, zero value otherwise.
func (o *DomainEntityResponse) 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 *DomainEntityResponse) 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 *DomainEntityResponse) 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 *DomainEntityResponse) SetId(v int64) {
	o.Id = &v
}

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

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

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

	return false
}

// SetDomainName gets a reference to the given string and assigns it to the DomainName field.
func (o *DomainEntityResponse) SetDomainName(v string) {
	o.DomainName = &v
}

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

func (o DomainEntityResponse) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.Cnames) {
		toSerialize["cnames"] = o.Cnames
	}
	if !IsNil(o.CnameAccessOnly) {
		toSerialize["cname_access_only"] = o.CnameAccessOnly
	}
	if !IsNil(o.IsActive) {
		toSerialize["is_active"] = o.IsActive
	}
	if !IsNil(o.EdgeApplicationId) {
		toSerialize["edge_application_id"] = o.EdgeApplicationId
	}
	if !IsNil(o.DigitalCertificateId) {
		toSerialize["digital_certificate_id"] = o.DigitalCertificateId
	}
	if !IsNil(o.Environment) {
		toSerialize["environment"] = o.Environment
	}
	if !IsNil(o.IsMtlsEnabled) {
		toSerialize["is_mtls_enabled"] = o.IsMtlsEnabled
	}
	if o.MtlsTrustedCaCertificateId.IsSet() {
		toSerialize["mtls_trusted_ca_certificate_id"] = o.MtlsTrustedCaCertificateId.Get()
	}
	if o.EdgeFirewallId.IsSet() {
		toSerialize["edge_firewall_id"] = o.EdgeFirewallId.Get()
	}
	if !IsNil(o.MtlsVerification) {
		toSerialize["mtls_verification"] = o.MtlsVerification
	}
	if o.CrlList != nil {
		toSerialize["crl_list"] = o.CrlList
	}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.DomainName) {
		toSerialize["domain_name"] = o.DomainName
	}
	return toSerialize, nil
}

type NullableDomainEntityResponse struct {
	value *DomainEntityResponse
	isSet bool
}

func (v NullableDomainEntityResponse) Get() *DomainEntityResponse {
	return v.value
}

func (v *NullableDomainEntityResponse) Set(val *DomainEntityResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDomainEntityResponse(val *DomainEntityResponse) *NullableDomainEntityResponse {
	return &NullableDomainEntityResponse{value: val, isSet: true}
}

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

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


