feat: add API & override specs for template application (#144)

This commit is contained in:
Daniel Moran
2021-06-24 11:31:08 -04:00
committed by GitHub
parent 8972d23024
commit 1183d3780b
99 changed files with 13191 additions and 97 deletions

View File

@ -0,0 +1,200 @@
/*
* 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"
)
// TemplateSummaryCommon struct for TemplateSummaryCommon
type TemplateSummaryCommon struct {
Kind string `json:"kind"`
TemplateMetaName *string `json:"templateMetaName,omitempty"`
EnvReferences []TemplateEnvReference `json:"envReferences"`
LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"`
}
// NewTemplateSummaryCommon instantiates a new TemplateSummaryCommon 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 NewTemplateSummaryCommon(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel) *TemplateSummaryCommon {
this := TemplateSummaryCommon{}
this.Kind = kind
this.EnvReferences = envReferences
this.LabelAssociations = labelAssociations
return &this
}
// NewTemplateSummaryCommonWithDefaults instantiates a new TemplateSummaryCommon 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 NewTemplateSummaryCommonWithDefaults() *TemplateSummaryCommon {
this := TemplateSummaryCommon{}
return &this
}
// GetKind returns the Kind field value
func (o *TemplateSummaryCommon) 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 *TemplateSummaryCommon) GetKindOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Kind, true
}
// SetKind sets field value
func (o *TemplateSummaryCommon) SetKind(v string) {
o.Kind = v
}
// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise.
func (o *TemplateSummaryCommon) GetTemplateMetaName() string {
if o == nil || o.TemplateMetaName == nil {
var ret string
return ret
}
return *o.TemplateMetaName
}
// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TemplateSummaryCommon) GetTemplateMetaNameOk() (*string, bool) {
if o == nil || o.TemplateMetaName == nil {
return nil, false
}
return o.TemplateMetaName, true
}
// HasTemplateMetaName returns a boolean if a field has been set.
func (o *TemplateSummaryCommon) HasTemplateMetaName() bool {
if o != nil && o.TemplateMetaName != nil {
return true
}
return false
}
// SetTemplateMetaName gets a reference to the given string and assigns it to the TemplateMetaName field.
func (o *TemplateSummaryCommon) SetTemplateMetaName(v string) {
o.TemplateMetaName = &v
}
// GetEnvReferences returns the EnvReferences field value
func (o *TemplateSummaryCommon) GetEnvReferences() []TemplateEnvReference {
if o == nil {
var ret []TemplateEnvReference
return ret
}
return o.EnvReferences
}
// GetEnvReferencesOk returns a tuple with the EnvReferences field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryCommon) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) {
if o == nil {
return nil, false
}
return &o.EnvReferences, true
}
// SetEnvReferences sets field value
func (o *TemplateSummaryCommon) SetEnvReferences(v []TemplateEnvReference) {
o.EnvReferences = v
}
// GetLabelAssociations returns the LabelAssociations field value
func (o *TemplateSummaryCommon) GetLabelAssociations() []TemplateSummaryLabel {
if o == nil {
var ret []TemplateSummaryLabel
return ret
}
return o.LabelAssociations
}
// GetLabelAssociationsOk returns a tuple with the LabelAssociations field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryCommon) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) {
if o == nil {
return nil, false
}
return &o.LabelAssociations, true
}
// SetLabelAssociations sets field value
func (o *TemplateSummaryCommon) SetLabelAssociations(v []TemplateSummaryLabel) {
o.LabelAssociations = v
}
func (o TemplateSummaryCommon) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["kind"] = o.Kind
}
if o.TemplateMetaName != nil {
toSerialize["templateMetaName"] = o.TemplateMetaName
}
if true {
toSerialize["envReferences"] = o.EnvReferences
}
if true {
toSerialize["labelAssociations"] = o.LabelAssociations
}
return json.Marshal(toSerialize)
}
type NullableTemplateSummaryCommon struct {
value *TemplateSummaryCommon
isSet bool
}
func (v NullableTemplateSummaryCommon) Get() *TemplateSummaryCommon {
return v.value
}
func (v *NullableTemplateSummaryCommon) Set(val *TemplateSummaryCommon) {
v.value = val
v.isSet = true
}
func (v NullableTemplateSummaryCommon) IsSet() bool {
return v.isSet
}
func (v *NullableTemplateSummaryCommon) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTemplateSummaryCommon(val *TemplateSummaryCommon) *NullableTemplateSummaryCommon {
return &NullableTemplateSummaryCommon{value: val, isSet: true}
}
func (v NullableTemplateSummaryCommon) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTemplateSummaryCommon) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}