influx-cli/api/model_stack_event_resource.gen.go
2021-06-30 14:47:35 -04:00

259 lines
6.8 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"
)
// StackEventResource struct for StackEventResource
type StackEventResource struct {
ApiVersion string `json:"apiVersion" yaml:"apiVersion"`
ResourceID string `json:"resourceID" yaml:"resourceID"`
Kind string `json:"kind" yaml:"kind"`
TemplateMetaName string `json:"templateMetaName" yaml:"templateMetaName"`
Associations []StackEventResourceAssociation `json:"associations" yaml:"associations"`
Links *StackEventResourceLinks `json:"links,omitempty" yaml:"links,omitempty"`
}
// NewStackEventResource instantiates a new StackEventResource 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 NewStackEventResource(apiVersion string, resourceID string, kind string, templateMetaName string, associations []StackEventResourceAssociation) *StackEventResource {
this := StackEventResource{}
this.ApiVersion = apiVersion
this.ResourceID = resourceID
this.Kind = kind
this.TemplateMetaName = templateMetaName
this.Associations = associations
return &this
}
// NewStackEventResourceWithDefaults instantiates a new StackEventResource 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 NewStackEventResourceWithDefaults() *StackEventResource {
this := StackEventResource{}
return &this
}
// GetApiVersion returns the ApiVersion field value
func (o *StackEventResource) 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 *StackEventResource) GetApiVersionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ApiVersion, true
}
// SetApiVersion sets field value
func (o *StackEventResource) SetApiVersion(v string) {
o.ApiVersion = v
}
// GetResourceID returns the ResourceID field value
func (o *StackEventResource) GetResourceID() string {
if o == nil {
var ret string
return ret
}
return o.ResourceID
}
// GetResourceIDOk returns a tuple with the ResourceID field value
// and a boolean to check if the value has been set.
func (o *StackEventResource) GetResourceIDOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ResourceID, true
}
// SetResourceID sets field value
func (o *StackEventResource) SetResourceID(v string) {
o.ResourceID = v
}
// GetKind returns the Kind field value
func (o *StackEventResource) 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 *StackEventResource) GetKindOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Kind, true
}
// SetKind sets field value
func (o *StackEventResource) SetKind(v string) {
o.Kind = v
}
// GetTemplateMetaName returns the TemplateMetaName field value
func (o *StackEventResource) GetTemplateMetaName() string {
if o == nil {
var ret string
return ret
}
return o.TemplateMetaName
}
// GetTemplateMetaNameOk returns a tuple with the TemplateMetaName field value
// and a boolean to check if the value has been set.
func (o *StackEventResource) GetTemplateMetaNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TemplateMetaName, true
}
// SetTemplateMetaName sets field value
func (o *StackEventResource) SetTemplateMetaName(v string) {
o.TemplateMetaName = v
}
// GetAssociations returns the Associations field value
func (o *StackEventResource) GetAssociations() []StackEventResourceAssociation {
if o == nil {
var ret []StackEventResourceAssociation
return ret
}
return o.Associations
}
// GetAssociationsOk returns a tuple with the Associations field value
// and a boolean to check if the value has been set.
func (o *StackEventResource) GetAssociationsOk() (*[]StackEventResourceAssociation, bool) {
if o == nil {
return nil, false
}
return &o.Associations, true
}
// SetAssociations sets field value
func (o *StackEventResource) SetAssociations(v []StackEventResourceAssociation) {
o.Associations = v
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *StackEventResource) GetLinks() StackEventResourceLinks {
if o == nil || o.Links == nil {
var ret StackEventResourceLinks
return ret
}
return *o.Links
}
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StackEventResource) GetLinksOk() (*StackEventResourceLinks, bool) {
if o == nil || o.Links == nil {
return nil, false
}
return o.Links, true
}
// HasLinks returns a boolean if a field has been set.
func (o *StackEventResource) HasLinks() bool {
if o != nil && o.Links != nil {
return true
}
return false
}
// SetLinks gets a reference to the given StackEventResourceLinks and assigns it to the Links field.
func (o *StackEventResource) SetLinks(v StackEventResourceLinks) {
o.Links = &v
}
func (o StackEventResource) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["apiVersion"] = o.ApiVersion
}
if true {
toSerialize["resourceID"] = o.ResourceID
}
if true {
toSerialize["kind"] = o.Kind
}
if true {
toSerialize["templateMetaName"] = o.TemplateMetaName
}
if true {
toSerialize["associations"] = o.Associations
}
if o.Links != nil {
toSerialize["links"] = o.Links
}
return json.Marshal(toSerialize)
}
type NullableStackEventResource struct {
value *StackEventResource
isSet bool
}
func (v NullableStackEventResource) Get() *StackEventResource {
return v.value
}
func (v *NullableStackEventResource) Set(val *StackEventResource) {
v.value = val
v.isSet = true
}
func (v NullableStackEventResource) IsSet() bool {
return v.isSet
}
func (v *NullableStackEventResource) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStackEventResource(val *StackEventResource) *NullableStackEventResource {
return &NullableStackEventResource{value: val, isSet: true}
}
func (v NullableStackEventResource) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStackEventResource) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}