/* * 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" ) // StackPatchRequest struct for StackPatchRequest type StackPatchRequest struct { Name *string `json:"name,omitempty" yaml:"name,omitempty"` Description *string `json:"description,omitempty" yaml:"description,omitempty"` TemplateURLs []string `json:"templateURLs" yaml:"templateURLs"` AdditionalResources []StackPatchRequestResource `json:"additionalResources" yaml:"additionalResources"` } // NewStackPatchRequest instantiates a new StackPatchRequest 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 NewStackPatchRequest(templateURLs []string, additionalResources []StackPatchRequestResource) *StackPatchRequest { this := StackPatchRequest{} this.TemplateURLs = templateURLs this.AdditionalResources = additionalResources return &this } // NewStackPatchRequestWithDefaults instantiates a new StackPatchRequest 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 NewStackPatchRequestWithDefaults() *StackPatchRequest { this := StackPatchRequest{} return &this } // GetName returns the Name field value if set, zero value otherwise. func (o *StackPatchRequest) GetName() string { if o == nil || o.Name == nil { var ret string return ret } return *o.Name } // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *StackPatchRequest) GetNameOk() (*string, bool) { if o == nil || o.Name == nil { return nil, false } return o.Name, true } // HasName returns a boolean if a field has been set. func (o *StackPatchRequest) HasName() bool { if o != nil && o.Name != nil { return true } return false } // SetName gets a reference to the given string and assigns it to the Name field. func (o *StackPatchRequest) SetName(v string) { o.Name = &v } // GetDescription returns the Description field value if set, zero value otherwise. func (o *StackPatchRequest) 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 *StackPatchRequest) 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 *StackPatchRequest) 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 *StackPatchRequest) SetDescription(v string) { o.Description = &v } // GetTemplateURLs returns the TemplateURLs field value func (o *StackPatchRequest) GetTemplateURLs() []string { if o == nil { var ret []string return ret } return o.TemplateURLs } // GetTemplateURLsOk returns a tuple with the TemplateURLs field value // and a boolean to check if the value has been set. func (o *StackPatchRequest) GetTemplateURLsOk() (*[]string, bool) { if o == nil { return nil, false } return &o.TemplateURLs, true } // SetTemplateURLs sets field value func (o *StackPatchRequest) SetTemplateURLs(v []string) { o.TemplateURLs = v } // GetAdditionalResources returns the AdditionalResources field value func (o *StackPatchRequest) GetAdditionalResources() []StackPatchRequestResource { if o == nil { var ret []StackPatchRequestResource return ret } return o.AdditionalResources } // GetAdditionalResourcesOk returns a tuple with the AdditionalResources field value // and a boolean to check if the value has been set. func (o *StackPatchRequest) GetAdditionalResourcesOk() (*[]StackPatchRequestResource, bool) { if o == nil { return nil, false } return &o.AdditionalResources, true } // SetAdditionalResources sets field value func (o *StackPatchRequest) SetAdditionalResources(v []StackPatchRequestResource) { o.AdditionalResources = v } func (o StackPatchRequest) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Name != nil { toSerialize["name"] = o.Name } if o.Description != nil { toSerialize["description"] = o.Description } if true { toSerialize["templateURLs"] = o.TemplateURLs } if true { toSerialize["additionalResources"] = o.AdditionalResources } return json.Marshal(toSerialize) } type NullableStackPatchRequest struct { value *StackPatchRequest isSet bool } func (v NullableStackPatchRequest) Get() *StackPatchRequest { return v.value } func (v *NullableStackPatchRequest) Set(val *StackPatchRequest) { v.value = val v.isSet = true } func (v NullableStackPatchRequest) IsSet() bool { return v.isSet } func (v *NullableStackPatchRequest) Unset() { v.value = nil v.isSet = false } func NewNullableStackPatchRequest(val *StackPatchRequest) *NullableStackPatchRequest { return &NullableStackPatchRequest{value: val, isSet: true} } func (v NullableStackPatchRequest) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableStackPatchRequest) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }