mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
487 lines
12 KiB
Go
487 lines
12 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 RoutingVersion type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RoutingVersion{}
|
|
|
|
// RoutingVersion struct for RoutingVersion
|
|
type RoutingVersion struct {
|
|
Actor *string `json:"actor,omitempty"`
|
|
Base *int32 `json:"base,omitempty"`
|
|
Boot *string `json:"boot,omitempty"`
|
|
Catalog *string `json:"catalog,omitempty"`
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
Diff *string `json:"diff,omitempty"`
|
|
Family *string `json:"family,omitempty"`
|
|
Id *int32 `json:"id,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
Sum *string `json:"sum,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RoutingVersion RoutingVersion
|
|
|
|
// NewRoutingVersion instantiates a new RoutingVersion 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 NewRoutingVersion() *RoutingVersion {
|
|
this := RoutingVersion{}
|
|
return &this
|
|
}
|
|
|
|
// NewRoutingVersionWithDefaults instantiates a new RoutingVersion 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 NewRoutingVersionWithDefaults() *RoutingVersion {
|
|
this := RoutingVersion{}
|
|
return &this
|
|
}
|
|
|
|
// GetActor returns the Actor field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetActor() string {
|
|
if o == nil || IsNil(o.Actor) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Actor
|
|
}
|
|
|
|
// GetActorOk returns a tuple with the Actor field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetActorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Actor) {
|
|
return nil, false
|
|
}
|
|
return o.Actor, true
|
|
}
|
|
|
|
// HasActor returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasActor() bool {
|
|
if o != nil && !IsNil(o.Actor) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActor gets a reference to the given string and assigns it to the Actor field.
|
|
func (o *RoutingVersion) SetActor(v string) {
|
|
o.Actor = &v
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetBase() int32 {
|
|
if o == nil || IsNil(o.Base) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Base
|
|
}
|
|
|
|
// GetBaseOk returns a tuple with the Base field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetBaseOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Base) {
|
|
return nil, false
|
|
}
|
|
return o.Base, true
|
|
}
|
|
|
|
// HasBase returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasBase() bool {
|
|
if o != nil && !IsNil(o.Base) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBase gets a reference to the given int32 and assigns it to the Base field.
|
|
func (o *RoutingVersion) SetBase(v int32) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetBoot returns the Boot field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetBoot() string {
|
|
if o == nil || IsNil(o.Boot) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Boot
|
|
}
|
|
|
|
// GetBootOk returns a tuple with the Boot field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetBootOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Boot) {
|
|
return nil, false
|
|
}
|
|
return o.Boot, true
|
|
}
|
|
|
|
// HasBoot returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasBoot() bool {
|
|
if o != nil && !IsNil(o.Boot) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBoot gets a reference to the given string and assigns it to the Boot field.
|
|
func (o *RoutingVersion) SetBoot(v string) {
|
|
o.Boot = &v
|
|
}
|
|
|
|
// GetCatalog returns the Catalog field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetCatalog() string {
|
|
if o == nil || IsNil(o.Catalog) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Catalog
|
|
}
|
|
|
|
// GetCatalogOk returns a tuple with the Catalog field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetCatalogOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Catalog) {
|
|
return nil, false
|
|
}
|
|
return o.Catalog, true
|
|
}
|
|
|
|
// HasCatalog returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasCatalog() bool {
|
|
if o != nil && !IsNil(o.Catalog) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCatalog gets a reference to the given string and assigns it to the Catalog field.
|
|
func (o *RoutingVersion) SetCatalog(v string) {
|
|
o.Catalog = &v
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *RoutingVersion) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetDiff returns the Diff field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetDiff() string {
|
|
if o == nil || IsNil(o.Diff) {
|
|
var ret string
|
|
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 *RoutingVersion) GetDiffOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Diff) {
|
|
return nil, false
|
|
}
|
|
return o.Diff, true
|
|
}
|
|
|
|
// HasDiff returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasDiff() bool {
|
|
if o != nil && !IsNil(o.Diff) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDiff gets a reference to the given string and assigns it to the Diff field.
|
|
func (o *RoutingVersion) SetDiff(v string) {
|
|
o.Diff = &v
|
|
}
|
|
|
|
// GetFamily returns the Family field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetFamily() string {
|
|
if o == nil || IsNil(o.Family) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Family
|
|
}
|
|
|
|
// GetFamilyOk returns a tuple with the Family field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetFamilyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Family) {
|
|
return nil, false
|
|
}
|
|
return o.Family, true
|
|
}
|
|
|
|
// HasFamily returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasFamily() bool {
|
|
if o != nil && !IsNil(o.Family) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFamily gets a reference to the given string and assigns it to the Family field.
|
|
func (o *RoutingVersion) SetFamily(v string) {
|
|
o.Family = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetId() int32 {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetIdOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given int32 and assigns it to the Id field.
|
|
func (o *RoutingVersion) SetId(v int32) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *RoutingVersion) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetSum returns the Sum field value if set, zero value otherwise.
|
|
func (o *RoutingVersion) GetSum() string {
|
|
if o == nil || IsNil(o.Sum) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Sum
|
|
}
|
|
|
|
// GetSumOk returns a tuple with the Sum field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RoutingVersion) GetSumOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Sum) {
|
|
return nil, false
|
|
}
|
|
return o.Sum, true
|
|
}
|
|
|
|
// HasSum returns a boolean if a field has been set.
|
|
func (o *RoutingVersion) HasSum() bool {
|
|
if o != nil && !IsNil(o.Sum) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSum gets a reference to the given string and assigns it to the Sum field.
|
|
func (o *RoutingVersion) SetSum(v string) {
|
|
o.Sum = &v
|
|
}
|
|
|
|
func (o RoutingVersion) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RoutingVersion) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Actor) {
|
|
toSerialize["actor"] = o.Actor
|
|
}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Boot) {
|
|
toSerialize["boot"] = o.Boot
|
|
}
|
|
if !IsNil(o.Catalog) {
|
|
toSerialize["catalog"] = o.Catalog
|
|
}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.Diff) {
|
|
toSerialize["diff"] = o.Diff
|
|
}
|
|
if !IsNil(o.Family) {
|
|
toSerialize["family"] = o.Family
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Sum) {
|
|
toSerialize["sum"] = o.Sum
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RoutingVersion) UnmarshalJSON(data []byte) (err error) {
|
|
varRoutingVersion := _RoutingVersion{}
|
|
|
|
err = json.Unmarshal(data, &varRoutingVersion)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RoutingVersion(varRoutingVersion)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "actor")
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "boot")
|
|
delete(additionalProperties, "catalog")
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "diff")
|
|
delete(additionalProperties, "family")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "sum")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRoutingVersion struct {
|
|
value *RoutingVersion
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRoutingVersion) Get() *RoutingVersion {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRoutingVersion) Set(val *RoutingVersion) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRoutingVersion) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRoutingVersion) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRoutingVersion(val *RoutingVersion) *NullableRoutingVersion {
|
|
return &NullableRoutingVersion{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRoutingVersion) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRoutingVersion) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|