/*
 * 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 CentralLoggingResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CentralLoggingResponse{}

// CentralLoggingResponse struct for CentralLoggingResponse
type CentralLoggingResponse struct {
	Metadata   *CentralLoggingResponseMetadata   `json:"metadata,omitempty"`
	Properties *CentralLoggingResponseProperties `json:"properties,omitempty"`
}

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

	return &this
}

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

// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *CentralLoggingResponse) GetMetadata() CentralLoggingResponseMetadata {
	if o == nil || IsNil(o.Metadata) {
		var ret CentralLoggingResponseMetadata
		return ret
	}
	return *o.Metadata
}

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

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

	return false
}

// SetMetadata gets a reference to the given CentralLoggingResponseMetadata and assigns it to the Metadata field.
func (o *CentralLoggingResponse) SetMetadata(v CentralLoggingResponseMetadata) {
	o.Metadata = &v
}

// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *CentralLoggingResponse) GetProperties() CentralLoggingResponseProperties {
	if o == nil || IsNil(o.Properties) {
		var ret CentralLoggingResponseProperties
		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 *CentralLoggingResponse) GetPropertiesOk() (*CentralLoggingResponseProperties, 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 *CentralLoggingResponse) HasProperties() bool {
	if o != nil && !IsNil(o.Properties) {
		return true
	}

	return false
}

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

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

type NullableCentralLoggingResponse struct {
	value *CentralLoggingResponse
	isSet bool
}

func (v NullableCentralLoggingResponse) Get() *CentralLoggingResponse {
	return v.value
}

func (v *NullableCentralLoggingResponse) Set(val *CentralLoggingResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableCentralLoggingResponse(val *CentralLoggingResponse) *NullableCentralLoggingResponse {
	return &NullableCentralLoggingResponse{value: val, isSet: true}
}

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

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