/* * 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" ) // TemplateSummaryError struct for TemplateSummaryError type TemplateSummaryError struct { Message string `json:"message" yaml:"message"` Code string `json:"code" yaml:"code"` Sources *[]string `json:"sources,omitempty" yaml:"sources,omitempty"` StackID *string `json:"stackID,omitempty" yaml:"stackID,omitempty"` Summary *TemplateSummaryResources `json:"summary,omitempty" yaml:"summary,omitempty"` Diff *TemplateSummaryDiff `json:"diff,omitempty" yaml:"diff,omitempty"` Errors *[]TemplateSummaryErrors `json:"errors,omitempty" yaml:"errors,omitempty"` } // NewTemplateSummaryError instantiates a new TemplateSummaryError 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 NewTemplateSummaryError(message string, code string) *TemplateSummaryError { this := TemplateSummaryError{} this.Message = message this.Code = code return &this } // NewTemplateSummaryErrorWithDefaults instantiates a new TemplateSummaryError 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 NewTemplateSummaryErrorWithDefaults() *TemplateSummaryError { this := TemplateSummaryError{} return &this } // GetMessage returns the Message field value func (o *TemplateSummaryError) GetMessage() string { if o == nil { var ret string return ret } return o.Message } // GetMessageOk returns a tuple with the Message field value // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetMessageOk() (*string, bool) { if o == nil { return nil, false } return &o.Message, true } // SetMessage sets field value func (o *TemplateSummaryError) SetMessage(v string) { o.Message = v } // GetCode returns the Code field value func (o *TemplateSummaryError) GetCode() string { if o == nil { var ret string return ret } return o.Code } // GetCodeOk returns a tuple with the Code field value // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetCodeOk() (*string, bool) { if o == nil { return nil, false } return &o.Code, true } // SetCode sets field value func (o *TemplateSummaryError) SetCode(v string) { o.Code = v } // GetSources returns the Sources field value if set, zero value otherwise. func (o *TemplateSummaryError) GetSources() []string { if o == nil || o.Sources == nil { var ret []string return ret } return *o.Sources } // GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetSourcesOk() (*[]string, bool) { if o == nil || o.Sources == nil { return nil, false } return o.Sources, true } // HasSources returns a boolean if a field has been set. func (o *TemplateSummaryError) HasSources() bool { if o != nil && o.Sources != nil { return true } return false } // SetSources gets a reference to the given []string and assigns it to the Sources field. func (o *TemplateSummaryError) SetSources(v []string) { o.Sources = &v } // GetStackID returns the StackID field value if set, zero value otherwise. func (o *TemplateSummaryError) GetStackID() string { if o == nil || o.StackID == nil { var ret string return ret } return *o.StackID } // GetStackIDOk returns a tuple with the StackID field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetStackIDOk() (*string, bool) { if o == nil || o.StackID == nil { return nil, false } return o.StackID, true } // HasStackID returns a boolean if a field has been set. func (o *TemplateSummaryError) HasStackID() bool { if o != nil && o.StackID != nil { return true } return false } // SetStackID gets a reference to the given string and assigns it to the StackID field. func (o *TemplateSummaryError) SetStackID(v string) { o.StackID = &v } // GetSummary returns the Summary field value if set, zero value otherwise. func (o *TemplateSummaryError) GetSummary() TemplateSummaryResources { if o == nil || o.Summary == nil { var ret TemplateSummaryResources return ret } return *o.Summary } // GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetSummaryOk() (*TemplateSummaryResources, bool) { if o == nil || o.Summary == nil { return nil, false } return o.Summary, true } // HasSummary returns a boolean if a field has been set. func (o *TemplateSummaryError) HasSummary() bool { if o != nil && o.Summary != nil { return true } return false } // SetSummary gets a reference to the given TemplateSummaryResources and assigns it to the Summary field. func (o *TemplateSummaryError) SetSummary(v TemplateSummaryResources) { o.Summary = &v } // GetDiff returns the Diff field value if set, zero value otherwise. func (o *TemplateSummaryError) GetDiff() TemplateSummaryDiff { if o == nil || o.Diff == nil { var ret TemplateSummaryDiff return ret } return *o.Diff } // GetDiffOk returns a tuple with the Diff field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetDiffOk() (*TemplateSummaryDiff, bool) { if o == nil || o.Diff == nil { return nil, false } return o.Diff, true } // HasDiff returns a boolean if a field has been set. func (o *TemplateSummaryError) HasDiff() bool { if o != nil && o.Diff != nil { return true } return false } // SetDiff gets a reference to the given TemplateSummaryDiff and assigns it to the Diff field. func (o *TemplateSummaryError) SetDiff(v TemplateSummaryDiff) { o.Diff = &v } // GetErrors returns the Errors field value if set, zero value otherwise. func (o *TemplateSummaryError) GetErrors() []TemplateSummaryErrors { if o == nil || o.Errors == nil { var ret []TemplateSummaryErrors return ret } return *o.Errors } // GetErrorsOk returns a tuple with the Errors field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *TemplateSummaryError) GetErrorsOk() (*[]TemplateSummaryErrors, bool) { if o == nil || o.Errors == nil { return nil, false } return o.Errors, true } // HasErrors returns a boolean if a field has been set. func (o *TemplateSummaryError) HasErrors() bool { if o != nil && o.Errors != nil { return true } return false } // SetErrors gets a reference to the given []TemplateSummaryErrors and assigns it to the Errors field. func (o *TemplateSummaryError) SetErrors(v []TemplateSummaryErrors) { o.Errors = &v } func (o TemplateSummaryError) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["message"] = o.Message } if true { toSerialize["code"] = o.Code } if o.Sources != nil { toSerialize["sources"] = o.Sources } if o.StackID != nil { toSerialize["stackID"] = o.StackID } if o.Summary != nil { toSerialize["summary"] = o.Summary } if o.Diff != nil { toSerialize["diff"] = o.Diff } if o.Errors != nil { toSerialize["errors"] = o.Errors } return json.Marshal(toSerialize) } type NullableTemplateSummaryError struct { value *TemplateSummaryError isSet bool } func (v NullableTemplateSummaryError) Get() *TemplateSummaryError { return v.value } func (v *NullableTemplateSummaryError) Set(val *TemplateSummaryError) { v.value = val v.isSet = true } func (v NullableTemplateSummaryError) IsSet() bool { return v.isSet } func (v *NullableTemplateSummaryError) Unset() { v.value = nil v.isSet = false } func NewNullableTemplateSummaryError(val *TemplateSummaryError) *NullableTemplateSummaryError { return &NullableTemplateSummaryError{value: val, isSet: true} } func (v NullableTemplateSummaryError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableTemplateSummaryError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }