/* * 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" ) // TelegrafPluginRequest struct for TelegrafPluginRequest type TelegrafPluginRequest struct { Name *string `json:"name,omitempty" yaml:"name,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` Plugins *[]TelegrafPluginRequestPlugins `json:"plugins,omitempty" yaml:"plugins,omitempty"` Metadata *TelegrafRequestMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` Config *string `json:"config,omitempty" yaml:"config,omitempty"` OrgID *string `json:"orgID,omitempty" yaml:"orgID,omitempty"` } // NewTelegrafPluginRequest instantiates a new TelegrafPluginRequest 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 NewTelegrafPluginRequest() *TelegrafPluginRequest { this := TelegrafPluginRequest{} return &this } // NewTelegrafPluginRequestWithDefaults instantiates a new TelegrafPluginRequest 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 NewTelegrafPluginRequestWithDefaults() *TelegrafPluginRequest { this := TelegrafPluginRequest{} return &this } // GetName returns the Name field value if set, zero value otherwise. func (o *TelegrafPluginRequest) GetName() string { if o == nil || o.Name == nil { 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 *TelegrafPluginRequest) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { return nil, false } return o.Name, true } // HasName returns a boolean if a field has been set. func (o *TelegrafPluginRequest) HasName() bool { if o != nil && o.Name != nil { return true } return false } // SetName gets a reference to the given string and assigns it to the Name field. func (o *TelegrafPluginRequest) SetName(v string) { o.Name = &v } // GetDescription returns the Description field value if set, zero value otherwise. func (o *TelegrafPluginRequest) GetDescription() string { if o == nil || o.Description == nil { var ret string return ret } return *o.Description } // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafPluginRequest) GetDescriptionOk() (*string, bool) { if o == nil || o.Description == nil { return nil, false } return o.Description, true } // HasDescription returns a boolean if a field has been set. func (o *TelegrafPluginRequest) HasDescription() bool { if o != nil && o.Description != nil { return true } return false } // SetDescription gets a reference to the given string and assigns it to the Description field. func (o *TelegrafPluginRequest) SetDescription(v string) { o.Description = &v } // GetPlugins returns the Plugins field value if set, zero value otherwise. func (o *TelegrafPluginRequest) GetPlugins() []TelegrafPluginRequestPlugins { if o == nil || o.Plugins == nil { var ret []TelegrafPluginRequestPlugins return ret } return *o.Plugins } // GetPluginsOk returns a tuple with the Plugins field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafPluginRequest) GetPluginsOk() (*[]TelegrafPluginRequestPlugins, bool) { if o == nil || o.Plugins == nil { return nil, false } return o.Plugins, true } // HasPlugins returns a boolean if a field has been set. func (o *TelegrafPluginRequest) HasPlugins() bool { if o != nil && o.Plugins != nil { return true } return false } // SetPlugins gets a reference to the given []TelegrafPluginRequestPlugins and assigns it to the Plugins field. func (o *TelegrafPluginRequest) SetPlugins(v []TelegrafPluginRequestPlugins) { o.Plugins = &v } // GetMetadata returns the Metadata field value if set, zero value otherwise. func (o *TelegrafPluginRequest) GetMetadata() TelegrafRequestMetadata { if o == nil || o.Metadata == nil { var ret TelegrafRequestMetadata 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 *TelegrafPluginRequest) GetMetadataOk() (*TelegrafRequestMetadata, bool) { if o == nil || o.Metadata == nil { return nil, false } return o.Metadata, true } // HasMetadata returns a boolean if a field has been set. func (o *TelegrafPluginRequest) HasMetadata() bool { if o != nil && o.Metadata != nil { return true } return false } // SetMetadata gets a reference to the given TelegrafRequestMetadata and assigns it to the Metadata field. func (o *TelegrafPluginRequest) SetMetadata(v TelegrafRequestMetadata) { o.Metadata = &v } // GetConfig returns the Config field value if set, zero value otherwise. func (o *TelegrafPluginRequest) GetConfig() string { if o == nil || o.Config == nil { var ret string return ret } return *o.Config } // GetConfigOk returns a tuple with the Config field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafPluginRequest) GetConfigOk() (*string, bool) { if o == nil || o.Config == nil { return nil, false } return o.Config, true } // HasConfig returns a boolean if a field has been set. func (o *TelegrafPluginRequest) HasConfig() bool { if o != nil && o.Config != nil { return true } return false } // SetConfig gets a reference to the given string and assigns it to the Config field. func (o *TelegrafPluginRequest) SetConfig(v string) { o.Config = &v } // GetOrgID returns the OrgID field value if set, zero value otherwise. func (o *TelegrafPluginRequest) GetOrgID() string { if o == nil || o.OrgID == nil { var ret string return ret } return *o.OrgID } // GetOrgIDOk returns a tuple with the OrgID field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TelegrafPluginRequest) GetOrgIDOk() (*string, bool) { if o == nil || o.OrgID == nil { return nil, false } return o.OrgID, true } // HasOrgID returns a boolean if a field has been set. func (o *TelegrafPluginRequest) HasOrgID() bool { if o != nil && o.OrgID != nil { return true } return false } // SetOrgID gets a reference to the given string and assigns it to the OrgID field. func (o *TelegrafPluginRequest) SetOrgID(v string) { o.OrgID = &v } func (o TelegrafPluginRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Description != nil { toSerialize["description"] = o.Description } if o.Plugins != nil { toSerialize["plugins"] = o.Plugins } if o.Metadata != nil { toSerialize["metadata"] = o.Metadata } if o.Config != nil { toSerialize["config"] = o.Config } if o.OrgID != nil { toSerialize["orgID"] = o.OrgID } return json.Marshal(toSerialize) } type NullableTelegrafPluginRequest struct { value *TelegrafPluginRequest isSet bool } func (v NullableTelegrafPluginRequest) Get() *TelegrafPluginRequest { return v.value } func (v *NullableTelegrafPluginRequest) Set(val *TelegrafPluginRequest) { v.value = val v.isSet = true } func (v NullableTelegrafPluginRequest) IsSet() bool { return v.isSet } func (v *NullableTelegrafPluginRequest) Unset() { v.value = nil v.isSet = false } func NewNullableTelegrafPluginRequest(val *TelegrafPluginRequest) *NullableTelegrafPluginRequest { return &NullableTelegrafPluginRequest{value: val, isSet: true} } func (v NullableTelegrafPluginRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTelegrafPluginRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }