/*
 * In-Memory DB API
 *
 * API description for the IONOS In-Memory DB
 *
 * API version: 1.0.0
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// ReplicaSetMetadataAllOf struct for ReplicaSetMetadataAllOf
type ReplicaSetMetadataAllOf struct {
	// The DNS name pointing to your replica set. Will be used to connect to the active/standalone instance.
	DnsName *string `json:"dnsName"`
}

// NewReplicaSetMetadataAllOf instantiates a new ReplicaSetMetadataAllOf 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 NewReplicaSetMetadataAllOf(dnsName string) *ReplicaSetMetadataAllOf {
	this := ReplicaSetMetadataAllOf{}

	this.DnsName = &dnsName

	return &this
}

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

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

	return o.DnsName

}

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

	return o.DnsName, true
}

// SetDnsName sets field value
func (o *ReplicaSetMetadataAllOf) SetDnsName(v string) {

	o.DnsName = &v

}

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

	return false
}

func (o ReplicaSetMetadataAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.DnsName != nil {
		toSerialize["dnsName"] = o.DnsName
	}

	return json.Marshal(toSerialize)
}

type NullableReplicaSetMetadataAllOf struct {
	value *ReplicaSetMetadataAllOf
	isSet bool
}

func (v NullableReplicaSetMetadataAllOf) Get() *ReplicaSetMetadataAllOf {
	return v.value
}

func (v *NullableReplicaSetMetadataAllOf) Set(val *ReplicaSetMetadataAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableReplicaSetMetadataAllOf(val *ReplicaSetMetadataAllOf) *NullableReplicaSetMetadataAllOf {
	return &NullableReplicaSetMetadataAllOf{value: val, isSet: true}
}

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

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