influx-cli/api/model_template_entry.gen.go

194 lines
4.6 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"
)
// TemplateEntry struct for TemplateEntry
type TemplateEntry struct {
ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
Kind string `json:"kind" yaml:"kind"`
Metadata TemplateEntryMetadata `json:"metadata" yaml:"metadata"`
Spec map[string]interface{} `json:"spec" yaml:"spec"`
}
// 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(apiVersion string, kind string, metadata TemplateEntryMetadata, spec map[string]interface{}) *TemplateEntry {
this := TemplateEntry{}
this.ApiVersion = apiVersion
this.Kind = kind
this.Metadata = metadata
this.Spec = spec
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
func (o *TemplateEntry) GetApiVersion() string {
if o == nil {
var ret string
return ret
}
return o.ApiVersion
}
// GetApiVersionOk returns a tuple with the ApiVersion field value
// and a boolean to check if the value has been set.
func (o *TemplateEntry) GetApiVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ApiVersion, true
}
// SetApiVersion sets field value
func (o *TemplateEntry) SetApiVersion(v string) {
o.ApiVersion = v
}
// GetKind returns the Kind field value
func (o *TemplateEntry) 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 *TemplateEntry) GetKindOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Kind, true
}
// SetKind sets field value
func (o *TemplateEntry) SetKind(v string) {
o.Kind = v
}
// GetMetadata returns the Metadata field value
func (o *TemplateEntry) GetMetadata() TemplateEntryMetadata {
if o == nil {
var ret TemplateEntryMetadata
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value
// and a boolean to check if the value has been set.
func (o *TemplateEntry) GetMetadataOk() (*TemplateEntryMetadata, bool) {
if o == nil {
return nil, false
}
return &o.Metadata, true
}
// SetMetadata sets field value
func (o *TemplateEntry) SetMetadata(v TemplateEntryMetadata) {
o.Metadata = v
}
// GetSpec returns the Spec field value
func (o *TemplateEntry) GetSpec() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Spec
}
// GetSpecOk returns a tuple with the Spec field value
// and a boolean to check if the value has been set.
func (o *TemplateEntry) GetSpecOk() (*map[string]interface{}, bool) {
if o == nil {
return nil, false
}
return &o.Spec, true
}
// SetSpec sets field value
func (o *TemplateEntry) SetSpec(v map[string]interface{}) {
o.Spec = v
}
func (o TemplateEntry) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["apiVersion"] = o.ApiVersion
}
if true {
toSerialize["kind"] = o.Kind
}
if true {
toSerialize["metadata"] = o.Metadata
}
if true {
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)
}