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

// PipelinePatchProperties Patch pipeline properties
type PipelinePatchProperties struct {
	// The friendly name of your pipeline.
	Name *string `json:"name,omitempty"`
	// The information of the log pipelines
	Logs []PipelineCreatePropertiesLogs `json:"logs,omitempty"`
}

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

	return &this
}

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

// GetName returns the Name field value if set, zero value otherwise.
func (o *PipelinePatchProperties) GetName() string {
	if o == nil || IsNil(o.Name) {
		var ret string
		return ret
	}
	return *o.Name
}

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

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

	return false
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *PipelinePatchProperties) SetName(v string) {
	o.Name = &v
}

// GetLogs returns the Logs field value if set, zero value otherwise.
func (o *PipelinePatchProperties) GetLogs() []PipelineCreatePropertiesLogs {
	if o == nil || IsNil(o.Logs) {
		var ret []PipelineCreatePropertiesLogs
		return ret
	}
	return o.Logs
}

// GetLogsOk returns a tuple with the Logs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PipelinePatchProperties) GetLogsOk() ([]PipelineCreatePropertiesLogs, bool) {
	if o == nil || IsNil(o.Logs) {
		return nil, false
	}
	return o.Logs, true
}

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

	return false
}

// SetLogs gets a reference to the given []PipelineCreatePropertiesLogs and assigns it to the Logs field.
func (o *PipelinePatchProperties) SetLogs(v []PipelineCreatePropertiesLogs) {
	o.Logs = v
}

func (o PipelinePatchProperties) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.Logs) {
		toSerialize["logs"] = o.Logs
	}
	return toSerialize, nil
}

type NullablePipelinePatchProperties struct {
	value *PipelinePatchProperties
	isSet bool
}

func (v NullablePipelinePatchProperties) Get() *PipelinePatchProperties {
	return v.value
}

func (v *NullablePipelinePatchProperties) Set(val *PipelinePatchProperties) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePipelinePatchProperties(val *PipelinePatchProperties) *NullablePipelinePatchProperties {
	return &NullablePipelinePatchProperties{value: val, isSet: true}
}

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

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