/* * 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" ) // TemplateApplyTemplate struct for TemplateApplyTemplate type TemplateApplyTemplate struct { Sources []string `json:"sources" yaml:"sources"` Contents []TemplateEntry `json:"contents" yaml:"contents"` ContentType string `json:"contentType" yaml:"contentType"` } // NewTemplateApplyTemplate instantiates a new TemplateApplyTemplate 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 NewTemplateApplyTemplate(sources []string, contents []TemplateEntry, contentType string) *TemplateApplyTemplate { this := TemplateApplyTemplate{} this.Sources = sources this.Contents = contents this.ContentType = contentType return &this } // NewTemplateApplyTemplateWithDefaults instantiates a new TemplateApplyTemplate 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 NewTemplateApplyTemplateWithDefaults() *TemplateApplyTemplate { this := TemplateApplyTemplate{} return &this } // GetSources returns the Sources field value func (o *TemplateApplyTemplate) GetSources() []string { if o == nil { var ret []string return ret } return o.Sources } // GetSourcesOk returns a tuple with the Sources field value // and a boolean to check if the value has been set. func (o *TemplateApplyTemplate) GetSourcesOk() (*[]string, bool) { if o == nil { return nil, false } return &o.Sources, true } // SetSources sets field value func (o *TemplateApplyTemplate) SetSources(v []string) { o.Sources = v } // GetContents returns the Contents field value func (o *TemplateApplyTemplate) GetContents() []TemplateEntry { if o == nil { var ret []TemplateEntry return ret } return o.Contents } // GetContentsOk returns a tuple with the Contents field value // and a boolean to check if the value has been set. func (o *TemplateApplyTemplate) GetContentsOk() (*[]TemplateEntry, bool) { if o == nil { return nil, false } return &o.Contents, true } // SetContents sets field value func (o *TemplateApplyTemplate) SetContents(v []TemplateEntry) { o.Contents = v } // GetContentType returns the ContentType field value func (o *TemplateApplyTemplate) GetContentType() string { if o == nil { var ret string return ret } return o.ContentType } // GetContentTypeOk returns a tuple with the ContentType field value // and a boolean to check if the value has been set. func (o *TemplateApplyTemplate) GetContentTypeOk() (*string, bool) { if o == nil { return nil, false } return &o.ContentType, true } // SetContentType sets field value func (o *TemplateApplyTemplate) SetContentType(v string) { o.ContentType = v } func (o TemplateApplyTemplate) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["sources"] = o.Sources } if true { toSerialize["contents"] = o.Contents } if true { toSerialize["contentType"] = o.ContentType } return json.Marshal(toSerialize) } type NullableTemplateApplyTemplate struct { value *TemplateApplyTemplate isSet bool } func (v NullableTemplateApplyTemplate) Get() *TemplateApplyTemplate { return v.value } func (v *NullableTemplateApplyTemplate) Set(val *TemplateApplyTemplate) { v.value = val v.isSet = true } func (v NullableTemplateApplyTemplate) IsSet() bool { return v.isSet } func (v *NullableTemplateApplyTemplate) Unset() { v.value = nil v.isSet = false } func NewNullableTemplateApplyTemplate(val *TemplateApplyTemplate) *NullableTemplateApplyTemplate { return &NullableTemplateApplyTemplate{value: val, isSet: true} } func (v NullableTemplateApplyTemplate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTemplateApplyTemplate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }