/*
 * IONOS Cloud - API Gateway
 *
 * API Gateway is an application that acts as a \"front door\" for backend services and APIs, handling client requests and routing them to the appropriate backend.
 *
 * API version: 0.0.1
 */

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

package ionoscloud

import (
	"encoding/json"
)

// GatewayCustomDomains The custom domain that the API Gateway instance should listen on.
type GatewayCustomDomains struct {
	// The domain name of the distribution.
	Name *string `json:"name,omitempty"`
	// The ID of the certificate to use for the distribution.
	CertificateId *string `json:"certificateId,omitempty"`
}

// NewGatewayCustomDomains instantiates a new GatewayCustomDomains 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 NewGatewayCustomDomains() *GatewayCustomDomains {
	this := GatewayCustomDomains{}

	return &this
}

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

// GetName returns the Name field value
// If the value is explicit nil, the zero value for string will be returned
func (o *GatewayCustomDomains) GetName() *string {
	if o == nil {
		return nil
	}

	return o.Name

}

// GetNameOk returns a tuple with the Name 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 *GatewayCustomDomains) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Name, true
}

// SetName sets field value
func (o *GatewayCustomDomains) SetName(v string) {

	o.Name = &v

}

// HasName returns a boolean if a field has been set.
func (o *GatewayCustomDomains) HasName() bool {
	if o != nil && o.Name != nil {
		return true
	}

	return false
}

// GetCertificateId returns the CertificateId field value
// If the value is explicit nil, the zero value for string will be returned
func (o *GatewayCustomDomains) GetCertificateId() *string {
	if o == nil {
		return nil
	}

	return o.CertificateId

}

// GetCertificateIdOk returns a tuple with the CertificateId 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 *GatewayCustomDomains) GetCertificateIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.CertificateId, true
}

// SetCertificateId sets field value
func (o *GatewayCustomDomains) SetCertificateId(v string) {

	o.CertificateId = &v

}

// HasCertificateId returns a boolean if a field has been set.
func (o *GatewayCustomDomains) HasCertificateId() bool {
	if o != nil && o.CertificateId != nil {
		return true
	}

	return false
}

func (o GatewayCustomDomains) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Name != nil {
		toSerialize["name"] = o.Name
	}

	if o.CertificateId != nil {
		toSerialize["certificateId"] = o.CertificateId
	}

	return json.Marshal(toSerialize)
}

type NullableGatewayCustomDomains struct {
	value *GatewayCustomDomains
	isSet bool
}

func (v NullableGatewayCustomDomains) Get() *GatewayCustomDomains {
	return v.value
}

func (v *NullableGatewayCustomDomains) Set(val *GatewayCustomDomains) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableGatewayCustomDomains(val *GatewayCustomDomains) *NullableGatewayCustomDomains {
	return &NullableGatewayCustomDomains{value: val, isSet: true}
}

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

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