mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
340 lines
8.5 KiB
Go
340 lines
8.5 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 AiRoutingEdit type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiRoutingEdit{}
|
|
|
|
// AiRoutingEdit struct for AiRoutingEdit
|
|
type AiRoutingEdit struct {
|
|
Base *int32 `json:"base,omitempty"`
|
|
Catalog interface{} `json:"catalog,omitempty"`
|
|
Family *string `json:"family,omitempty"`
|
|
Model *string `json:"model,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
Version *int32 `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiRoutingEdit AiRoutingEdit
|
|
|
|
// NewAiRoutingEdit instantiates a new AiRoutingEdit 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 NewAiRoutingEdit() *AiRoutingEdit {
|
|
this := AiRoutingEdit{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiRoutingEditWithDefaults instantiates a new AiRoutingEdit 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 NewAiRoutingEditWithDefaults() *AiRoutingEdit {
|
|
this := AiRoutingEdit{}
|
|
return &this
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) SetBase(v int32) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetCatalog returns the Catalog field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) SetCatalog(v interface{}) {
|
|
o.Catalog = v
|
|
}
|
|
|
|
// GetFamily returns the Family field value if set, zero value otherwise.
|
|
func (o *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) SetFamily(v string) {
|
|
o.Family = &v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *AiRoutingEdit) GetModel() string {
|
|
if o == nil || IsNil(o.Model) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingEdit) GetModelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Model) {
|
|
return nil, false
|
|
}
|
|
return o.Model, true
|
|
}
|
|
|
|
// HasModel returns a boolean if a field has been set.
|
|
func (o *AiRoutingEdit) HasModel() bool {
|
|
if o != nil && !IsNil(o.Model) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModel gets a reference to the given string and assigns it to the Model field.
|
|
func (o *AiRoutingEdit) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) 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 *AiRoutingEdit) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *AiRoutingEdit) GetVersion() int32 {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret int32
|
|
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 *AiRoutingEdit) GetVersionOk() (*int32, 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 *AiRoutingEdit) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given int32 and assigns it to the Version field.
|
|
func (o *AiRoutingEdit) SetVersion(v int32) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o AiRoutingEdit) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiRoutingEdit) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if o.Catalog != nil {
|
|
toSerialize["catalog"] = o.Catalog
|
|
}
|
|
if !IsNil(o.Family) {
|
|
toSerialize["family"] = o.Family
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiRoutingEdit) UnmarshalJSON(data []byte) (err error) {
|
|
varAiRoutingEdit := _AiRoutingEdit{}
|
|
|
|
err = json.Unmarshal(data, &varAiRoutingEdit)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiRoutingEdit(varAiRoutingEdit)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "catalog")
|
|
delete(additionalProperties, "family")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiRoutingEdit struct {
|
|
value *AiRoutingEdit
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiRoutingEdit) Get() *AiRoutingEdit {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiRoutingEdit) Set(val *AiRoutingEdit) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiRoutingEdit) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiRoutingEdit) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiRoutingEdit(val *AiRoutingEdit) *NullableAiRoutingEdit {
|
|
return &NullableAiRoutingEdit{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiRoutingEdit) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiRoutingEdit) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|