Files
sdk/model_declare_resp.go

265 lines
6.6 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the DeclareResp type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeclareResp{}
// DeclareResp struct for DeclareResp
type DeclareResp struct {
App *Declaration `json:"app,omitempty"`
Build *BuildRef `json:"build,omitempty"`
Declaration *DeclareResult `json:"declaration,omitempty"`
Notice *string `json:"notice,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeclareResp DeclareResp
// NewDeclareResp instantiates a new DeclareResp 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 NewDeclareResp() *DeclareResp {
this := DeclareResp{}
return &this
}
// NewDeclareRespWithDefaults instantiates a new DeclareResp 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 NewDeclareRespWithDefaults() *DeclareResp {
this := DeclareResp{}
return &this
}
// GetApp returns the App field value if set, zero value otherwise.
func (o *DeclareResp) GetApp() Declaration {
if o == nil || IsNil(o.App) {
var ret Declaration
return ret
}
return *o.App
}
// GetAppOk returns a tuple with the App field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeclareResp) GetAppOk() (*Declaration, bool) {
if o == nil || IsNil(o.App) {
return nil, false
}
return o.App, true
}
// HasApp returns a boolean if a field has been set.
func (o *DeclareResp) HasApp() bool {
if o != nil && !IsNil(o.App) {
return true
}
return false
}
// SetApp gets a reference to the given Declaration and assigns it to the App field.
func (o *DeclareResp) SetApp(v Declaration) {
o.App = &v
}
// GetBuild returns the Build field value if set, zero value otherwise.
func (o *DeclareResp) GetBuild() BuildRef {
if o == nil || IsNil(o.Build) {
var ret BuildRef
return ret
}
return *o.Build
}
// GetBuildOk returns a tuple with the Build field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeclareResp) GetBuildOk() (*BuildRef, bool) {
if o == nil || IsNil(o.Build) {
return nil, false
}
return o.Build, true
}
// HasBuild returns a boolean if a field has been set.
func (o *DeclareResp) HasBuild() bool {
if o != nil && !IsNil(o.Build) {
return true
}
return false
}
// SetBuild gets a reference to the given BuildRef and assigns it to the Build field.
func (o *DeclareResp) SetBuild(v BuildRef) {
o.Build = &v
}
// GetDeclaration returns the Declaration field value if set, zero value otherwise.
func (o *DeclareResp) GetDeclaration() DeclareResult {
if o == nil || IsNil(o.Declaration) {
var ret DeclareResult
return ret
}
return *o.Declaration
}
// GetDeclarationOk returns a tuple with the Declaration field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeclareResp) GetDeclarationOk() (*DeclareResult, bool) {
if o == nil || IsNil(o.Declaration) {
return nil, false
}
return o.Declaration, true
}
// HasDeclaration returns a boolean if a field has been set.
func (o *DeclareResp) HasDeclaration() bool {
if o != nil && !IsNil(o.Declaration) {
return true
}
return false
}
// SetDeclaration gets a reference to the given DeclareResult and assigns it to the Declaration field.
func (o *DeclareResp) SetDeclaration(v DeclareResult) {
o.Declaration = &v
}
// GetNotice returns the Notice field value if set, zero value otherwise.
func (o *DeclareResp) GetNotice() string {
if o == nil || IsNil(o.Notice) {
var ret string
return ret
}
return *o.Notice
}
// GetNoticeOk returns a tuple with the Notice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeclareResp) GetNoticeOk() (*string, bool) {
if o == nil || IsNil(o.Notice) {
return nil, false
}
return o.Notice, true
}
// HasNotice returns a boolean if a field has been set.
func (o *DeclareResp) HasNotice() bool {
if o != nil && !IsNil(o.Notice) {
return true
}
return false
}
// SetNotice gets a reference to the given string and assigns it to the Notice field.
func (o *DeclareResp) SetNotice(v string) {
o.Notice = &v
}
func (o DeclareResp) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeclareResp) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.App) {
toSerialize["app"] = o.App
}
if !IsNil(o.Build) {
toSerialize["build"] = o.Build
}
if !IsNil(o.Declaration) {
toSerialize["declaration"] = o.Declaration
}
if !IsNil(o.Notice) {
toSerialize["notice"] = o.Notice
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeclareResp) UnmarshalJSON(data []byte) (err error) {
varDeclareResp := _DeclareResp{}
err = json.Unmarshal(data, &varDeclareResp)
if err != nil {
return err
}
*o = DeclareResp(varDeclareResp)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "app")
delete(additionalProperties, "build")
delete(additionalProperties, "declaration")
delete(additionalProperties, "notice")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeclareResp struct {
value *DeclareResp
isSet bool
}
func (v NullableDeclareResp) Get() *DeclareResp {
return v.value
}
func (v *NullableDeclareResp) Set(val *DeclareResp) {
v.value = val
v.isSet = true
}
func (v NullableDeclareResp) IsSet() bool {
return v.isSet
}
func (v *NullableDeclareResp) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeclareResp(val *DeclareResp) *NullableDeclareResp {
return &NullableDeclareResp{value: val, isSet: true}
}
func (v NullableDeclareResp) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeclareResp) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}