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

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

// NewDomainResults instantiates a new DomainResults 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 NewDomainResults(id int64, name string, cnames []string, cnameAccessOnly bool, isActive bool, edgeApplicationId int64, digitalCertificateId NullableInt64, domainName string, isMtlsEnabled bool, mtlsTrustedCaCertificateId NullableString, mtlsVerification NullableString) *DomainResults {
	this := DomainResults{}
	this.Id = id
	this.Name = name
	this.Cnames = cnames
	this.CnameAccessOnly = cnameAccessOnly
	this.IsActive = isActive
	this.EdgeApplicationId = edgeApplicationId
	this.DigitalCertificateId = digitalCertificateId
	this.DomainName = domainName
	this.IsMtlsEnabled = isMtlsEnabled
	this.MtlsTrustedCaCertificateId = mtlsTrustedCaCertificateId
	this.MtlsVerification = mtlsVerification
	return &this
}

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

// GetId returns the Id field value
func (o *DomainResults) GetId() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.Id
}

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

// SetId sets field value
func (o *DomainResults) SetId(v int64) {
	o.Id = v
}

// GetName returns the Name field value
func (o *DomainResults) GetName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Name
}

// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *DomainResults) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Name, true
}

// SetName sets field value
func (o *DomainResults) SetName(v string) {
	o.Name = v
}

// GetCnames returns the Cnames field value
func (o *DomainResults) GetCnames() []string {
	if o == nil {
		var ret []string
		return ret
	}

	return o.Cnames
}

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

// SetCnames sets field value
func (o *DomainResults) SetCnames(v []string) {
	o.Cnames = v
}

// GetCnameAccessOnly returns the CnameAccessOnly field value
func (o *DomainResults) GetCnameAccessOnly() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.CnameAccessOnly
}

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

// SetCnameAccessOnly sets field value
func (o *DomainResults) SetCnameAccessOnly(v bool) {
	o.CnameAccessOnly = v
}

// GetIsActive returns the IsActive field value
func (o *DomainResults) GetIsActive() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.IsActive
}

// GetIsActiveOk returns a tuple with the IsActive field value
// and a boolean to check if the value has been set.
func (o *DomainResults) GetIsActiveOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.IsActive, true
}

// SetIsActive sets field value
func (o *DomainResults) SetIsActive(v bool) {
	o.IsActive = v
}

// GetEdgeApplicationId returns the EdgeApplicationId field value
func (o *DomainResults) GetEdgeApplicationId() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.EdgeApplicationId
}

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

// SetEdgeApplicationId sets field value
func (o *DomainResults) SetEdgeApplicationId(v int64) {
	o.EdgeApplicationId = v
}

// GetDigitalCertificateId returns the DigitalCertificateId field value
// If the value is explicit nil, the zero value for int64 will be returned
func (o *DomainResults) GetDigitalCertificateId() int64 {
	if o == nil || o.DigitalCertificateId.Get() == nil {
		var ret int64
		return ret
	}

	return *o.DigitalCertificateId.Get()
}

// GetDigitalCertificateIdOk returns a tuple with the DigitalCertificateId field value
// 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 *DomainResults) GetDigitalCertificateIdOk() (*int64, bool) {
	if o == nil {
		return nil, false
	}
	return o.DigitalCertificateId.Get(), o.DigitalCertificateId.IsSet()
}

// SetDigitalCertificateId sets field value
func (o *DomainResults) SetDigitalCertificateId(v int64) {
	o.DigitalCertificateId.Set(&v)
}

// GetDomainName returns the DomainName field value
func (o *DomainResults) GetDomainName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.DomainName
}

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

// SetDomainName sets field value
func (o *DomainResults) SetDomainName(v string) {
	o.DomainName = v
}

// GetEnvironment returns the Environment field value if set, zero value otherwise.
func (o *DomainResults) 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 *DomainResults) 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 *DomainResults) 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 *DomainResults) SetEnvironment(v string) {
	o.Environment = &v
}

// GetIsMtlsEnabled returns the IsMtlsEnabled field value
func (o *DomainResults) GetIsMtlsEnabled() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.IsMtlsEnabled
}

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

// SetIsMtlsEnabled sets field value
func (o *DomainResults) SetIsMtlsEnabled(v bool) {
	o.IsMtlsEnabled = v
}

// GetMtlsTrustedCaCertificateId returns the MtlsTrustedCaCertificateId field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DomainResults) GetMtlsTrustedCaCertificateId() string {
	if o == nil || o.MtlsTrustedCaCertificateId.Get() == nil {
		var ret string
		return ret
	}

	return *o.MtlsTrustedCaCertificateId.Get()
}

// GetMtlsTrustedCaCertificateIdOk returns a tuple with the MtlsTrustedCaCertificateId field value
// 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 *DomainResults) GetMtlsTrustedCaCertificateIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.MtlsTrustedCaCertificateId.Get(), o.MtlsTrustedCaCertificateId.IsSet()
}

// SetMtlsTrustedCaCertificateId sets field value
func (o *DomainResults) SetMtlsTrustedCaCertificateId(v string) {
	o.MtlsTrustedCaCertificateId.Set(&v)
}

// GetMtlsVerification returns the MtlsVerification field value
// If the value is explicit nil, the zero value for string will be returned
func (o *DomainResults) GetMtlsVerification() string {
	if o == nil || o.MtlsVerification.Get() == nil {
		var ret string
		return ret
	}

	return *o.MtlsVerification.Get()
}

// GetMtlsVerificationOk returns a tuple with the MtlsVerification field value
// 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 *DomainResults) GetMtlsVerificationOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.MtlsVerification.Get(), o.MtlsVerification.IsSet()
}

// SetMtlsVerification sets field value
func (o *DomainResults) SetMtlsVerification(v string) {
	o.MtlsVerification.Set(&v)
}

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

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

type NullableDomainResults struct {
	value *DomainResults
	isSet bool
}

func (v NullableDomainResults) Get() *DomainResults {
	return v.value
}

func (v *NullableDomainResults) Set(val *DomainResults) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableDomainResults(val *DomainResults) *NullableDomainResults {
	return &NullableDomainResults{value: val, isSet: true}
}

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

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


