mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
6.7 KiB
Go
265 lines
6.7 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 AiRoutingProposal type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiRoutingProposal{}
|
|
|
|
// AiRoutingProposal struct for AiRoutingProposal
|
|
type AiRoutingProposal struct {
|
|
Base *int32 `json:"base,omitempty"`
|
|
Diff *string `json:"diff,omitempty"`
|
|
Family *string `json:"family,omitempty"`
|
|
Refused *string `json:"refused,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiRoutingProposal AiRoutingProposal
|
|
|
|
// NewAiRoutingProposal instantiates a new AiRoutingProposal 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 NewAiRoutingProposal() *AiRoutingProposal {
|
|
this := AiRoutingProposal{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiRoutingProposalWithDefaults instantiates a new AiRoutingProposal 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 NewAiRoutingProposalWithDefaults() *AiRoutingProposal {
|
|
this := AiRoutingProposal{}
|
|
return &this
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *AiRoutingProposal) 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 *AiRoutingProposal) 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 *AiRoutingProposal) 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 *AiRoutingProposal) SetBase(v int32) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetDiff returns the Diff field value if set, zero value otherwise.
|
|
func (o *AiRoutingProposal) 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 *AiRoutingProposal) 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 *AiRoutingProposal) 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 *AiRoutingProposal) SetDiff(v string) {
|
|
o.Diff = &v
|
|
}
|
|
|
|
// GetFamily returns the Family field value if set, zero value otherwise.
|
|
func (o *AiRoutingProposal) 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 *AiRoutingProposal) 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 *AiRoutingProposal) 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 *AiRoutingProposal) SetFamily(v string) {
|
|
o.Family = &v
|
|
}
|
|
|
|
// GetRefused returns the Refused field value if set, zero value otherwise.
|
|
func (o *AiRoutingProposal) GetRefused() string {
|
|
if o == nil || IsNil(o.Refused) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Refused
|
|
}
|
|
|
|
// GetRefusedOk returns a tuple with the Refused field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRoutingProposal) GetRefusedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Refused) {
|
|
return nil, false
|
|
}
|
|
return o.Refused, true
|
|
}
|
|
|
|
// HasRefused returns a boolean if a field has been set.
|
|
func (o *AiRoutingProposal) HasRefused() bool {
|
|
if o != nil && !IsNil(o.Refused) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefused gets a reference to the given string and assigns it to the Refused field.
|
|
func (o *AiRoutingProposal) SetRefused(v string) {
|
|
o.Refused = &v
|
|
}
|
|
|
|
func (o AiRoutingProposal) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiRoutingProposal) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.Diff) {
|
|
toSerialize["diff"] = o.Diff
|
|
}
|
|
if !IsNil(o.Family) {
|
|
toSerialize["family"] = o.Family
|
|
}
|
|
if !IsNil(o.Refused) {
|
|
toSerialize["refused"] = o.Refused
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiRoutingProposal) UnmarshalJSON(data []byte) (err error) {
|
|
varAiRoutingProposal := _AiRoutingProposal{}
|
|
|
|
err = json.Unmarshal(data, &varAiRoutingProposal)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiRoutingProposal(varAiRoutingProposal)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "diff")
|
|
delete(additionalProperties, "family")
|
|
delete(additionalProperties, "refused")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiRoutingProposal struct {
|
|
value *AiRoutingProposal
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiRoutingProposal) Get() *AiRoutingProposal {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiRoutingProposal) Set(val *AiRoutingProposal) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiRoutingProposal) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiRoutingProposal) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiRoutingProposal(val *AiRoutingProposal) *NullableAiRoutingProposal {
|
|
return &NullableAiRoutingProposal{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiRoutingProposal) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiRoutingProposal) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|