/* * 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" ) // Telegrafs struct for Telegrafs type Telegrafs struct { Configurations *[]Telegraf `json:"configurations,omitempty" yaml:"configurations,omitempty"` } // NewTelegrafs instantiates a new Telegrafs 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 NewTelegrafs() *Telegrafs { this := Telegrafs{} return &this } // NewTelegrafsWithDefaults instantiates a new Telegrafs 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 NewTelegrafsWithDefaults() *Telegrafs { this := Telegrafs{} return &this } // GetConfigurations returns the Configurations field value if set, zero value otherwise. func (o *Telegrafs) GetConfigurations() []Telegraf { if o == nil || o.Configurations == nil { var ret []Telegraf return ret } return *o.Configurations } // GetConfigurationsOk returns a tuple with the Configurations field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Telegrafs) GetConfigurationsOk() (*[]Telegraf, bool) { if o == nil || o.Configurations == nil { return nil, false } return o.Configurations, true } // HasConfigurations returns a boolean if a field has been set. func (o *Telegrafs) HasConfigurations() bool { if o != nil && o.Configurations != nil { return true } return false } // SetConfigurations gets a reference to the given []Telegraf and assigns it to the Configurations field. func (o *Telegrafs) SetConfigurations(v []Telegraf) { o.Configurations = &v } func (o Telegrafs) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Configurations != nil { toSerialize["configurations"] = o.Configurations } return json.Marshal(toSerialize) } type NullableTelegrafs struct { value *Telegrafs isSet bool } func (v NullableTelegrafs) Get() *Telegrafs { return v.value } func (v *NullableTelegrafs) Set(val *Telegrafs) { v.value = val v.isSet = true } func (v NullableTelegrafs) IsSet() bool { return v.isSet } func (v *NullableTelegrafs) Unset() { v.value = nil v.isSet = false } func NewNullableTelegrafs(val *Telegrafs) *NullableTelegrafs { return &NullableTelegrafs{value: val, isSet: true} } func (v NullableTelegrafs) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTelegrafs) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }