/* * 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" ) // TemplateEntry struct for TemplateEntry type TemplateEntry struct { ApiVersion *string `json:"apiVersion,omitempty"` Kind *string `json:"kind,omitempty"` Meta *TemplateEntryMeta `json:"meta,omitempty"` Spec *map[string]interface{} `json:"spec,omitempty"` } // NewTemplateEntry instantiates a new TemplateEntry 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 NewTemplateEntry() *TemplateEntry { this := TemplateEntry{} return &this } // NewTemplateEntryWithDefaults instantiates a new TemplateEntry 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 NewTemplateEntryWithDefaults() *TemplateEntry { this := TemplateEntry{} return &this } // GetApiVersion returns the ApiVersion field value if set, zero value otherwise. func (o *TemplateEntry) GetApiVersion() string { if o == nil || o.ApiVersion == nil { var ret string return ret } return *o.ApiVersion } // GetApiVersionOk returns a tuple with the ApiVersion field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateEntry) GetApiVersionOk() (*string, bool) { if o == nil || o.ApiVersion == nil { return nil, false } return o.ApiVersion, true } // HasApiVersion returns a boolean if a field has been set. func (o *TemplateEntry) HasApiVersion() bool { if o != nil && o.ApiVersion != nil { return true } return false } // SetApiVersion gets a reference to the given string and assigns it to the ApiVersion field. func (o *TemplateEntry) SetApiVersion(v string) { o.ApiVersion = &v } // GetKind returns the Kind field value if set, zero value otherwise. func (o *TemplateEntry) GetKind() string { if o == nil || o.Kind == nil { var ret string return ret } return *o.Kind } // GetKindOk returns a tuple with the Kind field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateEntry) GetKindOk() (*string, bool) { if o == nil || o.Kind == nil { return nil, false } return o.Kind, true } // HasKind returns a boolean if a field has been set. func (o *TemplateEntry) HasKind() bool { if o != nil && o.Kind != nil { return true } return false } // SetKind gets a reference to the given string and assigns it to the Kind field. func (o *TemplateEntry) SetKind(v string) { o.Kind = &v } // GetMeta returns the Meta field value if set, zero value otherwise. func (o *TemplateEntry) GetMeta() TemplateEntryMeta { if o == nil || o.Meta == nil { var ret TemplateEntryMeta return ret } return *o.Meta } // GetMetaOk returns a tuple with the Meta field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateEntry) GetMetaOk() (*TemplateEntryMeta, bool) { if o == nil || o.Meta == nil { return nil, false } return o.Meta, true } // HasMeta returns a boolean if a field has been set. func (o *TemplateEntry) HasMeta() bool { if o != nil && o.Meta != nil { return true } return false } // SetMeta gets a reference to the given TemplateEntryMeta and assigns it to the Meta field. func (o *TemplateEntry) SetMeta(v TemplateEntryMeta) { o.Meta = &v } // GetSpec returns the Spec field value if set, zero value otherwise. func (o *TemplateEntry) GetSpec() map[string]interface{} { if o == nil || o.Spec == nil { var ret map[string]interface{} return ret } return *o.Spec } // GetSpecOk returns a tuple with the Spec field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateEntry) GetSpecOk() (*map[string]interface{}, bool) { if o == nil || o.Spec == nil { return nil, false } return o.Spec, true } // HasSpec returns a boolean if a field has been set. func (o *TemplateEntry) HasSpec() bool { if o != nil && o.Spec != nil { return true } return false } // SetSpec gets a reference to the given map[string]interface{} and assigns it to the Spec field. func (o *TemplateEntry) SetSpec(v map[string]interface{}) { o.Spec = &v } func (o TemplateEntry) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.ApiVersion != nil { toSerialize["apiVersion"] = o.ApiVersion } if o.Kind != nil { toSerialize["kind"] = o.Kind } if o.Meta != nil { toSerialize["meta"] = o.Meta } if o.Spec != nil { toSerialize["spec"] = o.Spec } return json.Marshal(toSerialize) } type NullableTemplateEntry struct { value *TemplateEntry isSet bool } func (v NullableTemplateEntry) Get() *TemplateEntry { return v.value } func (v *NullableTemplateEntry) Set(val *TemplateEntry) { v.value = val v.isSet = true } func (v NullableTemplateEntry) IsSet() bool { return v.isSet } func (v *NullableTemplateEntry) Unset() { v.value = nil v.isSet = false } func NewNullableTemplateEntry(val *TemplateEntry) *NullableTemplateEntry { return &NullableTemplateEntry{value: val, isSet: true} } func (v NullableTemplateEntry) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTemplateEntry) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }