258 lines
6.8 KiB
Go
258 lines
6.8 KiB
Go
/*
|
|
* 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"
|
|
)
|
|
|
|
// TelegrafRequest struct for TelegrafRequest
|
|
type TelegrafRequest struct {
|
|
Name *string `json:"name,omitempty" yaml:"name,omitempty"`
|
|
Description *string `json:"description,omitempty" yaml:"description,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"`
|
|
}
|
|
|
|
// NewTelegrafRequest instantiates a new TelegrafRequest 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 NewTelegrafRequest() *TelegrafRequest {
|
|
this := TelegrafRequest{}
|
|
return &this
|
|
}
|
|
|
|
// NewTelegrafRequestWithDefaults instantiates a new TelegrafRequest 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 NewTelegrafRequestWithDefaults() *TelegrafRequest {
|
|
this := TelegrafRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value if set, zero value otherwise.
|
|
func (o *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) SetMetadata(v TelegrafRequestMetadata) {
|
|
o.Metadata = &v
|
|
}
|
|
|
|
// GetConfig returns the Config field value if set, zero value otherwise.
|
|
func (o *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) SetConfig(v string) {
|
|
o.Config = &v
|
|
}
|
|
|
|
// GetOrgID returns the OrgID field value if set, zero value otherwise.
|
|
func (o *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) 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 *TelegrafRequest) SetOrgID(v string) {
|
|
o.OrgID = &v
|
|
}
|
|
|
|
func (o TelegrafRequest) 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.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 NullableTelegrafRequest struct {
|
|
value *TelegrafRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTelegrafRequest) Get() *TelegrafRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTelegrafRequest) Set(val *TelegrafRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTelegrafRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTelegrafRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTelegrafRequest(val *TelegrafRequest) *NullableTelegrafRequest {
|
|
return &NullableTelegrafRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTelegrafRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTelegrafRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|