mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
415 lines
11 KiB
Go
415 lines
11 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 AiRoutingView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiRoutingView{}
|
|
|
|
// AiRoutingView struct for AiRoutingView
|
|
type AiRoutingView struct {
|
|
Catalog interface{} `json:"catalog,omitempty"`
|
|
Drift *bool `json:"drift,omitempty"`
|
|
Error *string `json:"error,omitempty"`
|
|
Family *string `json:"family,omitempty"`
|
|
Redeployed *bool `json:"redeployed,omitempty"`
|
|
Stats interface{} `json:"stats,omitempty"`
|
|
Version *RoutingVersion `json:"version,omitempty"`
|
|
Versions []RoutingVersion `json:"versions,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiRoutingView AiRoutingView
|
|
|
|
// NewAiRoutingView instantiates a new AiRoutingView 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 NewAiRoutingView() *AiRoutingView {
|
|
this := AiRoutingView{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiRoutingViewWithDefaults instantiates a new AiRoutingView 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 NewAiRoutingViewWithDefaults() *AiRoutingView {
|
|
this := AiRoutingView{}
|
|
return &this
|
|
}
|
|
|
|
// GetCatalog returns the Catalog field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiRoutingView) GetCatalog() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
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.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiRoutingView) GetCatalogOk() (*interface{}, 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 *AiRoutingView) HasCatalog() bool {
|
|
if o != nil && !IsNil(o.Catalog) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCatalog gets a reference to the given interface{} and assigns it to the Catalog field.
|
|
func (o *AiRoutingView) SetCatalog(v interface{}) {
|
|
o.Catalog = v
|
|
}
|
|
|
|
// GetDrift returns the Drift field value if set, zero value otherwise.
|
|
func (o *AiRoutingView) GetDrift() bool {
|
|
if o == nil || IsNil(o.Drift) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Drift
|
|
}
|
|
|
|
// GetDriftOk returns a tuple with the Drift field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingView) GetDriftOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Drift) {
|
|
return nil, false
|
|
}
|
|
return o.Drift, true
|
|
}
|
|
|
|
// HasDrift returns a boolean if a field has been set.
|
|
func (o *AiRoutingView) HasDrift() bool {
|
|
if o != nil && !IsNil(o.Drift) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDrift gets a reference to the given bool and assigns it to the Drift field.
|
|
func (o *AiRoutingView) SetDrift(v bool) {
|
|
o.Drift = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *AiRoutingView) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingView) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *AiRoutingView) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *AiRoutingView) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetFamily returns the Family field value if set, zero value otherwise.
|
|
func (o *AiRoutingView) 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 *AiRoutingView) 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 *AiRoutingView) 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 *AiRoutingView) SetFamily(v string) {
|
|
o.Family = &v
|
|
}
|
|
|
|
// GetRedeployed returns the Redeployed field value if set, zero value otherwise.
|
|
func (o *AiRoutingView) GetRedeployed() bool {
|
|
if o == nil || IsNil(o.Redeployed) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Redeployed
|
|
}
|
|
|
|
// GetRedeployedOk returns a tuple with the Redeployed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingView) GetRedeployedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Redeployed) {
|
|
return nil, false
|
|
}
|
|
return o.Redeployed, true
|
|
}
|
|
|
|
// HasRedeployed returns a boolean if a field has been set.
|
|
func (o *AiRoutingView) HasRedeployed() bool {
|
|
if o != nil && !IsNil(o.Redeployed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRedeployed gets a reference to the given bool and assigns it to the Redeployed field.
|
|
func (o *AiRoutingView) SetRedeployed(v bool) {
|
|
o.Redeployed = &v
|
|
}
|
|
|
|
// GetStats returns the Stats field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiRoutingView) GetStats() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Stats
|
|
}
|
|
|
|
// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *AiRoutingView) GetStatsOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Stats) {
|
|
return nil, false
|
|
}
|
|
return &o.Stats, true
|
|
}
|
|
|
|
// HasStats returns a boolean if a field has been set.
|
|
func (o *AiRoutingView) HasStats() bool {
|
|
if o != nil && !IsNil(o.Stats) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStats gets a reference to the given interface{} and assigns it to the Stats field.
|
|
func (o *AiRoutingView) SetStats(v interface{}) {
|
|
o.Stats = v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *AiRoutingView) GetVersion() RoutingVersion {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret RoutingVersion
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingView) GetVersionOk() (*RoutingVersion, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *AiRoutingView) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given RoutingVersion and assigns it to the Version field.
|
|
func (o *AiRoutingView) SetVersion(v RoutingVersion) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetVersions returns the Versions field value if set, zero value otherwise.
|
|
func (o *AiRoutingView) GetVersions() []RoutingVersion {
|
|
if o == nil || IsNil(o.Versions) {
|
|
var ret []RoutingVersion
|
|
return ret
|
|
}
|
|
return o.Versions
|
|
}
|
|
|
|
// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingView) GetVersionsOk() ([]RoutingVersion, bool) {
|
|
if o == nil || IsNil(o.Versions) {
|
|
return nil, false
|
|
}
|
|
return o.Versions, true
|
|
}
|
|
|
|
// HasVersions returns a boolean if a field has been set.
|
|
func (o *AiRoutingView) HasVersions() bool {
|
|
if o != nil && !IsNil(o.Versions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersions gets a reference to the given []RoutingVersion and assigns it to the Versions field.
|
|
func (o *AiRoutingView) SetVersions(v []RoutingVersion) {
|
|
o.Versions = v
|
|
}
|
|
|
|
func (o AiRoutingView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiRoutingView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Catalog != nil {
|
|
toSerialize["catalog"] = o.Catalog
|
|
}
|
|
if !IsNil(o.Drift) {
|
|
toSerialize["drift"] = o.Drift
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Family) {
|
|
toSerialize["family"] = o.Family
|
|
}
|
|
if !IsNil(o.Redeployed) {
|
|
toSerialize["redeployed"] = o.Redeployed
|
|
}
|
|
if o.Stats != nil {
|
|
toSerialize["stats"] = o.Stats
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if !IsNil(o.Versions) {
|
|
toSerialize["versions"] = o.Versions
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiRoutingView) UnmarshalJSON(data []byte) (err error) {
|
|
varAiRoutingView := _AiRoutingView{}
|
|
|
|
err = json.Unmarshal(data, &varAiRoutingView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiRoutingView(varAiRoutingView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "catalog")
|
|
delete(additionalProperties, "drift")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "family")
|
|
delete(additionalProperties, "redeployed")
|
|
delete(additionalProperties, "stats")
|
|
delete(additionalProperties, "version")
|
|
delete(additionalProperties, "versions")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiRoutingView struct {
|
|
value *AiRoutingView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiRoutingView) Get() *AiRoutingView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiRoutingView) Set(val *AiRoutingView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiRoutingView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiRoutingView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiRoutingView(val *AiRoutingView) *NullableAiRoutingView {
|
|
return &NullableAiRoutingView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiRoutingView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiRoutingView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|