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

// ZoneAllOf Indicates the specific fields for a primary zone. This type of zone is the default one.
type ZoneAllOf struct {
	// Users can activate and deactivate zones.
	Enabled *bool `json:"enabled,omitempty"`
}

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

	var enabled bool = true
	this.Enabled = &enabled

	return &this
}

// NewZoneAllOfWithDefaults instantiates a new ZoneAllOf 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 NewZoneAllOfWithDefaults() *ZoneAllOf {
	this := ZoneAllOf{}
	var enabled bool = true
	this.Enabled = &enabled
	return &this
}

// GetEnabled returns the Enabled field value
// If the value is explicit nil, the zero value for bool will be returned
func (o *ZoneAllOf) GetEnabled() *bool {
	if o == nil {
		return nil
	}

	return o.Enabled

}

// GetEnabledOk returns a tuple with the Enabled 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 *ZoneAllOf) GetEnabledOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}

	return o.Enabled, true
}

// SetEnabled sets field value
func (o *ZoneAllOf) SetEnabled(v bool) {

	o.Enabled = &v

}

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

	return false
}

func (o ZoneAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Enabled != nil {
		toSerialize["enabled"] = o.Enabled
	}

	return json.Marshal(toSerialize)
}

type NullableZoneAllOf struct {
	value *ZoneAllOf
	isSet bool
}

func (v NullableZoneAllOf) Get() *ZoneAllOf {
	return v.value
}

func (v *NullableZoneAllOf) Set(val *ZoneAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableZoneAllOf(val *ZoneAllOf) *NullableZoneAllOf {
	return &NullableZoneAllOf{value: val, isSet: true}
}

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

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