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,410 @@
/*
* 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"
)
// TemplateSummaryNotificationRule struct for TemplateSummaryNotificationRule
type TemplateSummaryNotificationRule struct {
Kind string `json:"kind"`
TemplateMetaName *string `json:"templateMetaName,omitempty"`
EnvReferences []TemplateEnvReference `json:"envReferences"`
LabelAssociations []TemplateSummaryLabel `json:"labelAssociations"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
EndpointTemplateMetaName string `json:"endpointTemplateMetaName"`
EndpointID string `json:"endpointID"`
EndpointType string `json:"endpointType"`
Every string `json:"every"`
Offset string `json:"offset"`
}
// NewTemplateSummaryNotificationRule instantiates a new TemplateSummaryNotificationRule 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 NewTemplateSummaryNotificationRule(kind string, envReferences []TemplateEnvReference, labelAssociations []TemplateSummaryLabel, name string, endpointTemplateMetaName string, endpointID string, endpointType string, every string, offset string) *TemplateSummaryNotificationRule {
this := TemplateSummaryNotificationRule{}
this.Kind = kind
this.EnvReferences = envReferences
this.LabelAssociations = labelAssociations
this.Name = name
this.EndpointTemplateMetaName = endpointTemplateMetaName
this.EndpointID = endpointID
this.EndpointType = endpointType
this.Every = every
this.Offset = offset
return &this
}
// NewTemplateSummaryNotificationRuleWithDefaults instantiates a new TemplateSummaryNotificationRule 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 NewTemplateSummaryNotificationRuleWithDefaults() *TemplateSummaryNotificationRule {
this := TemplateSummaryNotificationRule{}
return &this
}
// GetKind returns the Kind field value
func (o *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) GetKindOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Kind, true
}
// SetKind sets field value
func (o *TemplateSummaryNotificationRule) SetKind(v string) {
o.Kind = v
}
// GetTemplateMetaName returns the TemplateMetaName field value if set, zero value otherwise.
func (o *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) SetTemplateMetaName(v string) {
o.TemplateMetaName = &v
}
// GetEnvReferences returns the EnvReferences field value
func (o *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) GetEnvReferencesOk() (*[]TemplateEnvReference, bool) {
if o == nil {
return nil, false
}
return &o.EnvReferences, true
}
// SetEnvReferences sets field value
func (o *TemplateSummaryNotificationRule) SetEnvReferences(v []TemplateEnvReference) {
o.EnvReferences = v
}
// GetLabelAssociations returns the LabelAssociations field value
func (o *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) GetLabelAssociationsOk() (*[]TemplateSummaryLabel, bool) {
if o == nil {
return nil, false
}
return &o.LabelAssociations, true
}
// SetLabelAssociations sets field value
func (o *TemplateSummaryNotificationRule) SetLabelAssociations(v []TemplateSummaryLabel) {
o.LabelAssociations = v
}
// GetName returns the Name field value
func (o *TemplateSummaryNotificationRule) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryNotificationRule) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *TemplateSummaryNotificationRule) SetName(v string) {
o.Name = v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) 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 *TemplateSummaryNotificationRule) SetDescription(v string) {
o.Description = &v
}
// GetEndpointTemplateMetaName returns the EndpointTemplateMetaName field value
func (o *TemplateSummaryNotificationRule) GetEndpointTemplateMetaName() string {
if o == nil {
var ret string
return ret
}
return o.EndpointTemplateMetaName
}
// GetEndpointTemplateMetaNameOk returns a tuple with the EndpointTemplateMetaName field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryNotificationRule) GetEndpointTemplateMetaNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EndpointTemplateMetaName, true
}
// SetEndpointTemplateMetaName sets field value
func (o *TemplateSummaryNotificationRule) SetEndpointTemplateMetaName(v string) {
o.EndpointTemplateMetaName = v
}
// GetEndpointID returns the EndpointID field value
func (o *TemplateSummaryNotificationRule) GetEndpointID() string {
if o == nil {
var ret string
return ret
}
return o.EndpointID
}
// GetEndpointIDOk returns a tuple with the EndpointID field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryNotificationRule) GetEndpointIDOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EndpointID, true
}
// SetEndpointID sets field value
func (o *TemplateSummaryNotificationRule) SetEndpointID(v string) {
o.EndpointID = v
}
// GetEndpointType returns the EndpointType field value
func (o *TemplateSummaryNotificationRule) GetEndpointType() string {
if o == nil {
var ret string
return ret
}
return o.EndpointType
}
// GetEndpointTypeOk returns a tuple with the EndpointType field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryNotificationRule) GetEndpointTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.EndpointType, true
}
// SetEndpointType sets field value
func (o *TemplateSummaryNotificationRule) SetEndpointType(v string) {
o.EndpointType = v
}
// GetEvery returns the Every field value
func (o *TemplateSummaryNotificationRule) GetEvery() string {
if o == nil {
var ret string
return ret
}
return o.Every
}
// GetEveryOk returns a tuple with the Every field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryNotificationRule) GetEveryOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Every, true
}
// SetEvery sets field value
func (o *TemplateSummaryNotificationRule) SetEvery(v string) {
o.Every = v
}
// GetOffset returns the Offset field value
func (o *TemplateSummaryNotificationRule) GetOffset() string {
if o == nil {
var ret string
return ret
}
return o.Offset
}
// GetOffsetOk returns a tuple with the Offset field value
// and a boolean to check if the value has been set.
func (o *TemplateSummaryNotificationRule) GetOffsetOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Offset, true
}
// SetOffset sets field value
func (o *TemplateSummaryNotificationRule) SetOffset(v string) {
o.Offset = v
}
func (o TemplateSummaryNotificationRule) 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
}
if true {
toSerialize["name"] = o.Name
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
if true {
toSerialize["endpointTemplateMetaName"] = o.EndpointTemplateMetaName
}
if true {
toSerialize["endpointID"] = o.EndpointID
}
if true {
toSerialize["endpointType"] = o.EndpointType
}
if true {
toSerialize["every"] = o.Every
}
if true {
toSerialize["offset"] = o.Offset
}
return json.Marshal(toSerialize)
}
type NullableTemplateSummaryNotificationRule struct {
value *TemplateSummaryNotificationRule
isSet bool
}
func (v NullableTemplateSummaryNotificationRule) Get() *TemplateSummaryNotificationRule {
return v.value
}
func (v *NullableTemplateSummaryNotificationRule) Set(val *TemplateSummaryNotificationRule) {
v.value = val
v.isSet = true
}
func (v NullableTemplateSummaryNotificationRule) IsSet() bool {
return v.isSet
}
func (v *NullableTemplateSummaryNotificationRule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTemplateSummaryNotificationRule(val *TemplateSummaryNotificationRule) *NullableTemplateSummaryNotificationRule {
return &NullableTemplateSummaryNotificationRule{value: val, isSet: true}
}
func (v NullableTemplateSummaryNotificationRule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTemplateSummaryNotificationRule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}