/*
 * Subset of Influx API covered by Influx CLI
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 2.0.0
 */

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

package api

import (
	"encoding/json"
)

// TemplateSummaryTelegraf struct for TemplateSummaryTelegraf
type TemplateSummaryTelegraf struct {
	Kind              string                        `json:"kind" yaml:"kind"`
	TemplateMetaName  string                        `json:"templateMetaName" yaml:"templateMetaName"`
	EnvReferences     []TemplateEnvReference        `json:"envReferences" yaml:"envReferences"`
	LabelAssociations []TemplateSummaryLabel        `json:"labelAssociations" yaml:"labelAssociations"`
	TelegrafConfig    TemplateSummaryTelegrafConfig `json:"telegrafConfig" yaml:"telegrafConfig"`
}

// NewTemplateSummaryTelegraf instantiates a new TemplateSummaryTelegraf 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 NewTemplateSummaryTelegraf(kind string, templateMetaName string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, telegrafConfig TemplateSummaryTelegrafConfig) *TemplateSummaryTelegraf {
	this := TemplateSummaryTelegraf{}
	this.Kind = kind
	this.TemplateMetaName = templateMetaName
	this.EnvReferences = envReferences
	this.LabelAssociations = labelAssociations
	this.TelegrafConfig = telegrafConfig
	return &this
}

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

// GetKind returns the Kind field value
func (o *TemplateSummaryTelegraf) GetKind() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Kind
}

// GetKindOk returns a tuple with the Kind field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryTelegraf) GetKindOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Kind, true
}

// SetKind sets field value
func (o *TemplateSummaryTelegraf) SetKind(v string) {
	o.Kind = v
}

// GetTemplateMetaName returns the TemplateMetaName field value
func (o *TemplateSummaryTelegraf) GetTemplateMetaName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.TemplateMetaName
}

// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryTelegraf) GetTemplateMetaNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.TemplateMetaName, true
}

// SetTemplateMetaName sets field value
func (o *TemplateSummaryTelegraf) SetTemplateMetaName(v string) {
	o.TemplateMetaName = v
}

// GetEnvReferences returns the EnvReferences field value
func (o *TemplateSummaryTelegraf) GetEnvReferences() []TemplateEnvReference {
	if o == nil {
		var ret []TemplateEnvReference
		return ret
	}

	return o.EnvReferences
}

// GetEnvReferencesOk returns a tuple with the EnvReferences field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryTelegraf) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) {
	if o == nil {
		return nil, false
	}
	return &o.EnvReferences, true
}

// SetEnvReferences sets field value
func (o *TemplateSummaryTelegraf) SetEnvReferences(v []TemplateEnvReference) {
	o.EnvReferences = v
}

// GetLabelAssociations returns the LabelAssociations field value
func (o *TemplateSummaryTelegraf) GetLabelAssociations() []TemplateSummaryLabel {
	if o == nil {
		var ret []TemplateSummaryLabel
		return ret
	}

	return o.LabelAssociations
}

// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryTelegraf) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) {
	if o == nil {
		return nil, false
	}
	return &o.LabelAssociations, true
}

// SetLabelAssociations sets field value
func (o *TemplateSummaryTelegraf) SetLabelAssociations(v []TemplateSummaryLabel) {
	o.LabelAssociations = v
}

// GetTelegrafConfig returns the TelegrafConfig field value
func (o *TemplateSummaryTelegraf) GetTelegrafConfig() TemplateSummaryTelegrafConfig {
	if o == nil {
		var ret TemplateSummaryTelegrafConfig
		return ret
	}

	return o.TelegrafConfig
}

// GetTelegrafConfigOk returns a tuple with the TelegrafConfig field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryTelegraf) GetTelegrafConfigOk() (*TemplateSummaryTelegrafConfig, bool) {
	if o == nil {
		return nil, false
	}
	return &o.TelegrafConfig, true
}

// SetTelegrafConfig sets field value
func (o *TemplateSummaryTelegraf) SetTelegrafConfig(v TemplateSummaryTelegrafConfig) {
	o.TelegrafConfig = v
}

func (o TemplateSummaryTelegraf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["kind"] = o.Kind
	}
	if true {
		toSerialize["templateMetaName"] = o.TemplateMetaName
	}
	if true {
		toSerialize["envReferences"] = o.EnvReferences
	}
	if true {
		toSerialize["labelAssociations"] = o.LabelAssociations
	}
	if true {
		toSerialize["telegrafConfig"] = o.TelegrafConfig
	}
	return json.Marshal(toSerialize)
}

type NullableTemplateSummaryTelegraf struct {
	value *TemplateSummaryTelegraf
	isSet bool
}

func (v NullableTemplateSummaryTelegraf) Get() *TemplateSummaryTelegraf {
	return v.value
}

func (v *NullableTemplateSummaryTelegraf) Set(val *TemplateSummaryTelegraf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTemplateSummaryTelegraf(val *TemplateSummaryTelegraf) *NullableTemplateSummaryTelegraf {
	return &NullableTemplateSummaryTelegraf{value: val, isSet: true}
}

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

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