/*
 * IONOS Cloud - DNS API
 *
 * Cloud DNS service helps IONOS Cloud customers to automate DNS Zone and Record management.
 *
 * API version: 1.16.0
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// MetadataForSecondaryZoneRecords Metadata for records of secondary zones.
type MetadataForSecondaryZoneRecords struct {
	// A fully qualified domain name. FQDN consists of two parts - the hostname and the domain name.
	Fqdn *string `json:"fqdn"`
	// The ID (UUID) of the DNS zone of which record belongs to.
	ZoneId *string `json:"zoneId"`
	// Indicates the root name (from the primary zone) for the record
	RootName *string `json:"rootName"`
}

// NewMetadataForSecondaryZoneRecords instantiates a new MetadataForSecondaryZoneRecords 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 NewMetadataForSecondaryZoneRecords(fqdn string, zoneId string, rootName string) *MetadataForSecondaryZoneRecords {
	this := MetadataForSecondaryZoneRecords{}

	this.Fqdn = &fqdn
	this.ZoneId = &zoneId
	this.RootName = &rootName

	return &this
}

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

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

	return o.Fqdn

}

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

	return o.Fqdn, true
}

// SetFqdn sets field value
func (o *MetadataForSecondaryZoneRecords) SetFqdn(v string) {

	o.Fqdn = &v

}

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

	return false
}

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

	return o.ZoneId

}

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

	return o.ZoneId, true
}

// SetZoneId sets field value
func (o *MetadataForSecondaryZoneRecords) SetZoneId(v string) {

	o.ZoneId = &v

}

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

	return false
}

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

	return o.RootName

}

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

	return o.RootName, true
}

// SetRootName sets field value
func (o *MetadataForSecondaryZoneRecords) SetRootName(v string) {

	o.RootName = &v

}

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

	return false
}

func (o MetadataForSecondaryZoneRecords) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Fqdn != nil {
		toSerialize["fqdn"] = o.Fqdn
	}

	if o.ZoneId != nil {
		toSerialize["zoneId"] = o.ZoneId
	}

	if o.RootName != nil {
		toSerialize["rootName"] = o.RootName
	}

	return json.Marshal(toSerialize)
}

type NullableMetadataForSecondaryZoneRecords struct {
	value *MetadataForSecondaryZoneRecords
	isSet bool
}

func (v NullableMetadataForSecondaryZoneRecords) Get() *MetadataForSecondaryZoneRecords {
	return v.value
}

func (v *NullableMetadataForSecondaryZoneRecords) Set(val *MetadataForSecondaryZoneRecords) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMetadataForSecondaryZoneRecords(val *MetadataForSecondaryZoneRecords) *NullableMetadataForSecondaryZoneRecords {
	return &NullableMetadataForSecondaryZoneRecords{value: val, isSet: true}
}

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

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