mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
413 lines
10 KiB
Go
413 lines
10 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 DeclareResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeclareResult{}
|
|
|
|
// DeclareResult struct for DeclareResult
|
|
type DeclareResult struct {
|
|
Changed *bool `json:"changed,omitempty"`
|
|
Commit *string `json:"commit,omitempty"`
|
|
Created *bool `json:"created,omitempty"`
|
|
Declaration *Declaration `json:"declaration,omitempty"`
|
|
Live *bool `json:"live,omitempty"`
|
|
Mode *string `json:"mode,omitempty"`
|
|
Ref *string `json:"ref,omitempty"`
|
|
Review *string `json:"review,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeclareResult DeclareResult
|
|
|
|
// NewDeclareResult instantiates a new DeclareResult 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 NewDeclareResult() *DeclareResult {
|
|
this := DeclareResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeclareResultWithDefaults instantiates a new DeclareResult 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 NewDeclareResultWithDefaults() *DeclareResult {
|
|
this := DeclareResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetChanged returns the Changed field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetChanged() bool {
|
|
if o == nil || IsNil(o.Changed) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Changed
|
|
}
|
|
|
|
// GetChangedOk returns a tuple with the Changed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetChangedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Changed) {
|
|
return nil, false
|
|
}
|
|
return o.Changed, true
|
|
}
|
|
|
|
// HasChanged returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasChanged() bool {
|
|
if o != nil && !IsNil(o.Changed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChanged gets a reference to the given bool and assigns it to the Changed field.
|
|
func (o *DeclareResult) SetChanged(v bool) {
|
|
o.Changed = &v
|
|
}
|
|
|
|
// GetCommit returns the Commit field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetCommit() string {
|
|
if o == nil || IsNil(o.Commit) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Commit
|
|
}
|
|
|
|
// GetCommitOk returns a tuple with the Commit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetCommitOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Commit) {
|
|
return nil, false
|
|
}
|
|
return o.Commit, true
|
|
}
|
|
|
|
// HasCommit returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasCommit() bool {
|
|
if o != nil && !IsNil(o.Commit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCommit gets a reference to the given string and assigns it to the Commit field.
|
|
func (o *DeclareResult) SetCommit(v string) {
|
|
o.Commit = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetCreated() bool {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetCreatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given bool and assigns it to the Created field.
|
|
func (o *DeclareResult) SetCreated(v bool) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetDeclaration returns the Declaration field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetDeclaration() Declaration {
|
|
if o == nil || IsNil(o.Declaration) {
|
|
var ret Declaration
|
|
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 *DeclareResult) GetDeclarationOk() (*Declaration, 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 *DeclareResult) HasDeclaration() bool {
|
|
if o != nil && !IsNil(o.Declaration) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeclaration gets a reference to the given Declaration and assigns it to the Declaration field.
|
|
func (o *DeclareResult) SetDeclaration(v Declaration) {
|
|
o.Declaration = &v
|
|
}
|
|
|
|
// GetLive returns the Live field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetLive() bool {
|
|
if o == nil || IsNil(o.Live) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Live
|
|
}
|
|
|
|
// GetLiveOk returns a tuple with the Live field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetLiveOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Live) {
|
|
return nil, false
|
|
}
|
|
return o.Live, true
|
|
}
|
|
|
|
// HasLive returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasLive() bool {
|
|
if o != nil && !IsNil(o.Live) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLive gets a reference to the given bool and assigns it to the Live field.
|
|
func (o *DeclareResult) SetLive(v bool) {
|
|
o.Live = &v
|
|
}
|
|
|
|
// GetMode returns the Mode field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetMode() string {
|
|
if o == nil || IsNil(o.Mode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Mode
|
|
}
|
|
|
|
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetModeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Mode) {
|
|
return nil, false
|
|
}
|
|
return o.Mode, true
|
|
}
|
|
|
|
// HasMode returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasMode() bool {
|
|
if o != nil && !IsNil(o.Mode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMode gets a reference to the given string and assigns it to the Mode field.
|
|
func (o *DeclareResult) SetMode(v string) {
|
|
o.Mode = &v
|
|
}
|
|
|
|
// GetRef returns the Ref field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetRef() string {
|
|
if o == nil || IsNil(o.Ref) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ref
|
|
}
|
|
|
|
// GetRefOk returns a tuple with the Ref field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ref) {
|
|
return nil, false
|
|
}
|
|
return o.Ref, true
|
|
}
|
|
|
|
// HasRef returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasRef() bool {
|
|
if o != nil && !IsNil(o.Ref) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRef gets a reference to the given string and assigns it to the Ref field.
|
|
func (o *DeclareResult) SetRef(v string) {
|
|
o.Ref = &v
|
|
}
|
|
|
|
// GetReview returns the Review field value if set, zero value otherwise.
|
|
func (o *DeclareResult) GetReview() string {
|
|
if o == nil || IsNil(o.Review) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Review
|
|
}
|
|
|
|
// GetReviewOk returns a tuple with the Review field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeclareResult) GetReviewOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Review) {
|
|
return nil, false
|
|
}
|
|
return o.Review, true
|
|
}
|
|
|
|
// HasReview returns a boolean if a field has been set.
|
|
func (o *DeclareResult) HasReview() bool {
|
|
if o != nil && !IsNil(o.Review) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReview gets a reference to the given string and assigns it to the Review field.
|
|
func (o *DeclareResult) SetReview(v string) {
|
|
o.Review = &v
|
|
}
|
|
|
|
func (o DeclareResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeclareResult) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Changed) {
|
|
toSerialize["changed"] = o.Changed
|
|
}
|
|
if !IsNil(o.Commit) {
|
|
toSerialize["commit"] = o.Commit
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Declaration) {
|
|
toSerialize["declaration"] = o.Declaration
|
|
}
|
|
if !IsNil(o.Live) {
|
|
toSerialize["live"] = o.Live
|
|
}
|
|
if !IsNil(o.Mode) {
|
|
toSerialize["mode"] = o.Mode
|
|
}
|
|
if !IsNil(o.Ref) {
|
|
toSerialize["ref"] = o.Ref
|
|
}
|
|
if !IsNil(o.Review) {
|
|
toSerialize["review"] = o.Review
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeclareResult) UnmarshalJSON(data []byte) (err error) {
|
|
varDeclareResult := _DeclareResult{}
|
|
|
|
err = json.Unmarshal(data, &varDeclareResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeclareResult(varDeclareResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "changed")
|
|
delete(additionalProperties, "commit")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "declaration")
|
|
delete(additionalProperties, "live")
|
|
delete(additionalProperties, "mode")
|
|
delete(additionalProperties, "ref")
|
|
delete(additionalProperties, "review")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeclareResult struct {
|
|
value *DeclareResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeclareResult) Get() *DeclareResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeclareResult) Set(val *DeclareResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeclareResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeclareResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeclareResult(val *DeclareResult) *NullableDeclareResult {
|
|
return &NullableDeclareResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeclareResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeclareResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|