/*
 * IONOS Logging REST API
 *
 * The logging service offers a centralized platform to collect and store logs from various systems and applications. It includes tools to search, filter, visualize, and create alerts based on your log data.  This API provides programmatic control over logging pipelines, enabling you to create new pipelines or modify existing ones. It mirrors the functionality of the DCD visual tool, ensuring a consistent experience regardless of your chosen interface.
 *
 * API version: 0.0.1
 */

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

package logging

import (
	"encoding/json"
)

// checks if the CentralLoggingToggle type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CentralLoggingToggle{}

// CentralLoggingToggle Request payload to toggle central logging.
type CentralLoggingToggle struct {
	Properties *CentralLoggingToggleProperties `json:"properties,omitempty"`
}

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

	return &this
}

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

// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *CentralLoggingToggle) GetProperties() CentralLoggingToggleProperties {
	if o == nil || IsNil(o.Properties) {
		var ret CentralLoggingToggleProperties
		return ret
	}
	return *o.Properties
}

// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CentralLoggingToggle) GetPropertiesOk() (*CentralLoggingToggleProperties, bool) {
	if o == nil || IsNil(o.Properties) {
		return nil, false
	}
	return o.Properties, true
}

// HasProperties returns a boolean if a field has been set.
func (o *CentralLoggingToggle) HasProperties() bool {
	if o != nil && !IsNil(o.Properties) {
		return true
	}

	return false
}

// SetProperties gets a reference to the given CentralLoggingToggleProperties and assigns it to the Properties field.
func (o *CentralLoggingToggle) SetProperties(v CentralLoggingToggleProperties) {
	o.Properties = &v
}

func (o CentralLoggingToggle) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Properties) {
		toSerialize["properties"] = o.Properties
	}
	return toSerialize, nil
}

type NullableCentralLoggingToggle struct {
	value *CentralLoggingToggle
	isSet bool
}

func (v NullableCentralLoggingToggle) Get() *CentralLoggingToggle {
	return v.value
}

func (v *NullableCentralLoggingToggle) Set(val *CentralLoggingToggle) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableCentralLoggingToggle(val *CentralLoggingToggle) *NullableCentralLoggingToggle {
	return &NullableCentralLoggingToggle{value: val, isSet: true}
}

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

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