/*
 * 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"
)

// MetadataWithStateNameserversAllOf struct for MetadataWithStateNameserversAllOf
type MetadataWithStateNameserversAllOf struct {
	State *ProvisioningState `json:"state"`
	// The list of nameservers associated to the zone.  Nameservers are different for primary and secondary zones. For primary zones it would be: - ns-ic.ui-dns.com - ns-ic.ui-dns.de - ns-ic.ui-dns.org - ns-ic.ui-dns.biz  And for secondary zones: - nscs.ui-dns.com - nscs.ui-dns.de - nscs.ui-dns.org - nscs.ui-dns.biz
	Nameservers *[]string `json:"nameservers"`
}

// NewMetadataWithStateNameserversAllOf instantiates a new MetadataWithStateNameserversAllOf 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 NewMetadataWithStateNameserversAllOf(state ProvisioningState, nameservers []string) *MetadataWithStateNameserversAllOf {
	this := MetadataWithStateNameserversAllOf{}

	this.State = &state
	this.Nameservers = &nameservers

	return &this
}

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

// GetState returns the State field value
// If the value is explicit nil, the zero value for ProvisioningState will be returned
func (o *MetadataWithStateNameserversAllOf) GetState() *ProvisioningState {
	if o == nil {
		return nil
	}

	return o.State

}

// GetStateOk returns a tuple with the State 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 *MetadataWithStateNameserversAllOf) GetStateOk() (*ProvisioningState, bool) {
	if o == nil {
		return nil, false
	}

	return o.State, true
}

// SetState sets field value
func (o *MetadataWithStateNameserversAllOf) SetState(v ProvisioningState) {

	o.State = &v

}

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

	return false
}

// GetNameservers returns the Nameservers field value
// If the value is explicit nil, the zero value for []string will be returned
func (o *MetadataWithStateNameserversAllOf) GetNameservers() *[]string {
	if o == nil {
		return nil
	}

	return o.Nameservers

}

// GetNameserversOk returns a tuple with the Nameservers 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 *MetadataWithStateNameserversAllOf) GetNameserversOk() (*[]string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Nameservers, true
}

// SetNameservers sets field value
func (o *MetadataWithStateNameserversAllOf) SetNameservers(v []string) {

	o.Nameservers = &v

}

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

	return false
}

func (o MetadataWithStateNameserversAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.State != nil {
		toSerialize["state"] = o.State
	}

	if o.Nameservers != nil {
		toSerialize["nameservers"] = o.Nameservers
	}

	return json.Marshal(toSerialize)
}

type NullableMetadataWithStateNameserversAllOf struct {
	value *MetadataWithStateNameserversAllOf
	isSet bool
}

func (v NullableMetadataWithStateNameserversAllOf) Get() *MetadataWithStateNameserversAllOf {
	return v.value
}

func (v *NullableMetadataWithStateNameserversAllOf) Set(val *MetadataWithStateNameserversAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMetadataWithStateNameserversAllOf(val *MetadataWithStateNameserversAllOf) *NullableMetadataWithStateNameserversAllOf {
	return &NullableMetadataWithStateNameserversAllOf{value: val, isSet: true}
}

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

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