mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
820 lines
23 KiB
Go
820 lines
23 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 ModelRoute type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ModelRoute{}
|
|
|
|
// ModelRoute struct for ModelRoute
|
|
type ModelRoute struct {
|
|
CostInPerMillion *float32 `json:"costInPerMillion,omitempty"`
|
|
CostOutPerMillion *float32 `json:"costOutPerMillion,omitempty"`
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
Fallback1Provider *string `json:"fallback1Provider,omitempty"`
|
|
Fallback1Upstream *string `json:"fallback1Upstream,omitempty"`
|
|
Fallback2Provider *string `json:"fallback2Provider,omitempty"`
|
|
Fallback2Upstream *string `json:"fallback2Upstream,omitempty"`
|
|
Hidden *bool `json:"hidden,omitempty"`
|
|
InputPricePerMillion *float32 `json:"inputPricePerMillion,omitempty"`
|
|
ModelName *string `json:"modelName,omitempty"`
|
|
OutputPricePerMillion *float32 `json:"outputPricePerMillion,omitempty"`
|
|
OwnedBy *string `json:"ownedBy,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
Premium *bool `json:"premium,omitempty"`
|
|
Priced *bool `json:"priced,omitempty"`
|
|
Provider *string `json:"provider,omitempty"`
|
|
UpdatedTime *string `json:"updatedTime,omitempty"`
|
|
Upstream *string `json:"upstream,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ModelRoute ModelRoute
|
|
|
|
// NewModelRoute instantiates a new ModelRoute 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 NewModelRoute() *ModelRoute {
|
|
this := ModelRoute{}
|
|
return &this
|
|
}
|
|
|
|
// NewModelRouteWithDefaults instantiates a new ModelRoute 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 NewModelRouteWithDefaults() *ModelRoute {
|
|
this := ModelRoute{}
|
|
return &this
|
|
}
|
|
|
|
// GetCostInPerMillion returns the CostInPerMillion field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetCostInPerMillion() float32 {
|
|
if o == nil || IsNil(o.CostInPerMillion) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.CostInPerMillion
|
|
}
|
|
|
|
// GetCostInPerMillionOk returns a tuple with the CostInPerMillion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetCostInPerMillionOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.CostInPerMillion) {
|
|
return nil, false
|
|
}
|
|
return o.CostInPerMillion, true
|
|
}
|
|
|
|
// HasCostInPerMillion returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasCostInPerMillion() bool {
|
|
if o != nil && !IsNil(o.CostInPerMillion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCostInPerMillion gets a reference to the given float32 and assigns it to the CostInPerMillion field.
|
|
func (o *ModelRoute) SetCostInPerMillion(v float32) {
|
|
o.CostInPerMillion = &v
|
|
}
|
|
|
|
// GetCostOutPerMillion returns the CostOutPerMillion field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetCostOutPerMillion() float32 {
|
|
if o == nil || IsNil(o.CostOutPerMillion) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.CostOutPerMillion
|
|
}
|
|
|
|
// GetCostOutPerMillionOk returns a tuple with the CostOutPerMillion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetCostOutPerMillionOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.CostOutPerMillion) {
|
|
return nil, false
|
|
}
|
|
return o.CostOutPerMillion, true
|
|
}
|
|
|
|
// HasCostOutPerMillion returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasCostOutPerMillion() bool {
|
|
if o != nil && !IsNil(o.CostOutPerMillion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCostOutPerMillion gets a reference to the given float32 and assigns it to the CostOutPerMillion field.
|
|
func (o *ModelRoute) SetCostOutPerMillion(v float32) {
|
|
o.CostOutPerMillion = &v
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *ModelRoute) 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 *ModelRoute) 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 *ModelRoute) 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 *ModelRoute) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetEnabled() bool {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Enabled
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
return nil, false
|
|
}
|
|
return o.Enabled, true
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasEnabled() bool {
|
|
if o != nil && !IsNil(o.Enabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
|
func (o *ModelRoute) SetEnabled(v bool) {
|
|
o.Enabled = &v
|
|
}
|
|
|
|
// GetFallback1Provider returns the Fallback1Provider field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetFallback1Provider() string {
|
|
if o == nil || IsNil(o.Fallback1Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Fallback1Provider
|
|
}
|
|
|
|
// GetFallback1ProviderOk returns a tuple with the Fallback1Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetFallback1ProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Fallback1Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Fallback1Provider, true
|
|
}
|
|
|
|
// HasFallback1Provider returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasFallback1Provider() bool {
|
|
if o != nil && !IsNil(o.Fallback1Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFallback1Provider gets a reference to the given string and assigns it to the Fallback1Provider field.
|
|
func (o *ModelRoute) SetFallback1Provider(v string) {
|
|
o.Fallback1Provider = &v
|
|
}
|
|
|
|
// GetFallback1Upstream returns the Fallback1Upstream field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetFallback1Upstream() string {
|
|
if o == nil || IsNil(o.Fallback1Upstream) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Fallback1Upstream
|
|
}
|
|
|
|
// GetFallback1UpstreamOk returns a tuple with the Fallback1Upstream field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetFallback1UpstreamOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Fallback1Upstream) {
|
|
return nil, false
|
|
}
|
|
return o.Fallback1Upstream, true
|
|
}
|
|
|
|
// HasFallback1Upstream returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasFallback1Upstream() bool {
|
|
if o != nil && !IsNil(o.Fallback1Upstream) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFallback1Upstream gets a reference to the given string and assigns it to the Fallback1Upstream field.
|
|
func (o *ModelRoute) SetFallback1Upstream(v string) {
|
|
o.Fallback1Upstream = &v
|
|
}
|
|
|
|
// GetFallback2Provider returns the Fallback2Provider field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetFallback2Provider() string {
|
|
if o == nil || IsNil(o.Fallback2Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Fallback2Provider
|
|
}
|
|
|
|
// GetFallback2ProviderOk returns a tuple with the Fallback2Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetFallback2ProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Fallback2Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Fallback2Provider, true
|
|
}
|
|
|
|
// HasFallback2Provider returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasFallback2Provider() bool {
|
|
if o != nil && !IsNil(o.Fallback2Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFallback2Provider gets a reference to the given string and assigns it to the Fallback2Provider field.
|
|
func (o *ModelRoute) SetFallback2Provider(v string) {
|
|
o.Fallback2Provider = &v
|
|
}
|
|
|
|
// GetFallback2Upstream returns the Fallback2Upstream field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetFallback2Upstream() string {
|
|
if o == nil || IsNil(o.Fallback2Upstream) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Fallback2Upstream
|
|
}
|
|
|
|
// GetFallback2UpstreamOk returns a tuple with the Fallback2Upstream field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetFallback2UpstreamOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Fallback2Upstream) {
|
|
return nil, false
|
|
}
|
|
return o.Fallback2Upstream, true
|
|
}
|
|
|
|
// HasFallback2Upstream returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasFallback2Upstream() bool {
|
|
if o != nil && !IsNil(o.Fallback2Upstream) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFallback2Upstream gets a reference to the given string and assigns it to the Fallback2Upstream field.
|
|
func (o *ModelRoute) SetFallback2Upstream(v string) {
|
|
o.Fallback2Upstream = &v
|
|
}
|
|
|
|
// GetHidden returns the Hidden field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetHidden() bool {
|
|
if o == nil || IsNil(o.Hidden) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Hidden
|
|
}
|
|
|
|
// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetHiddenOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Hidden) {
|
|
return nil, false
|
|
}
|
|
return o.Hidden, true
|
|
}
|
|
|
|
// HasHidden returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasHidden() bool {
|
|
if o != nil && !IsNil(o.Hidden) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHidden gets a reference to the given bool and assigns it to the Hidden field.
|
|
func (o *ModelRoute) SetHidden(v bool) {
|
|
o.Hidden = &v
|
|
}
|
|
|
|
// GetInputPricePerMillion returns the InputPricePerMillion field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetInputPricePerMillion() float32 {
|
|
if o == nil || IsNil(o.InputPricePerMillion) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.InputPricePerMillion
|
|
}
|
|
|
|
// GetInputPricePerMillionOk returns a tuple with the InputPricePerMillion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetInputPricePerMillionOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.InputPricePerMillion) {
|
|
return nil, false
|
|
}
|
|
return o.InputPricePerMillion, true
|
|
}
|
|
|
|
// HasInputPricePerMillion returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasInputPricePerMillion() bool {
|
|
if o != nil && !IsNil(o.InputPricePerMillion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInputPricePerMillion gets a reference to the given float32 and assigns it to the InputPricePerMillion field.
|
|
func (o *ModelRoute) SetInputPricePerMillion(v float32) {
|
|
o.InputPricePerMillion = &v
|
|
}
|
|
|
|
// GetModelName returns the ModelName field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetModelName() string {
|
|
if o == nil || IsNil(o.ModelName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ModelName
|
|
}
|
|
|
|
// GetModelNameOk returns a tuple with the ModelName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetModelNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ModelName) {
|
|
return nil, false
|
|
}
|
|
return o.ModelName, true
|
|
}
|
|
|
|
// HasModelName returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasModelName() bool {
|
|
if o != nil && !IsNil(o.ModelName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModelName gets a reference to the given string and assigns it to the ModelName field.
|
|
func (o *ModelRoute) SetModelName(v string) {
|
|
o.ModelName = &v
|
|
}
|
|
|
|
// GetOutputPricePerMillion returns the OutputPricePerMillion field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetOutputPricePerMillion() float32 {
|
|
if o == nil || IsNil(o.OutputPricePerMillion) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.OutputPricePerMillion
|
|
}
|
|
|
|
// GetOutputPricePerMillionOk returns a tuple with the OutputPricePerMillion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetOutputPricePerMillionOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.OutputPricePerMillion) {
|
|
return nil, false
|
|
}
|
|
return o.OutputPricePerMillion, true
|
|
}
|
|
|
|
// HasOutputPricePerMillion returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasOutputPricePerMillion() bool {
|
|
if o != nil && !IsNil(o.OutputPricePerMillion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOutputPricePerMillion gets a reference to the given float32 and assigns it to the OutputPricePerMillion field.
|
|
func (o *ModelRoute) SetOutputPricePerMillion(v float32) {
|
|
o.OutputPricePerMillion = &v
|
|
}
|
|
|
|
// GetOwnedBy returns the OwnedBy field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetOwnedBy() string {
|
|
if o == nil || IsNil(o.OwnedBy) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.OwnedBy
|
|
}
|
|
|
|
// GetOwnedByOk returns a tuple with the OwnedBy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetOwnedByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.OwnedBy) {
|
|
return nil, false
|
|
}
|
|
return o.OwnedBy, true
|
|
}
|
|
|
|
// HasOwnedBy returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasOwnedBy() bool {
|
|
if o != nil && !IsNil(o.OwnedBy) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwnedBy gets a reference to the given string and assigns it to the OwnedBy field.
|
|
func (o *ModelRoute) SetOwnedBy(v string) {
|
|
o.OwnedBy = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *ModelRoute) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetPremium returns the Premium field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetPremium() bool {
|
|
if o == nil || IsNil(o.Premium) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Premium
|
|
}
|
|
|
|
// GetPremiumOk returns a tuple with the Premium field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetPremiumOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Premium) {
|
|
return nil, false
|
|
}
|
|
return o.Premium, true
|
|
}
|
|
|
|
// HasPremium returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasPremium() bool {
|
|
if o != nil && !IsNil(o.Premium) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPremium gets a reference to the given bool and assigns it to the Premium field.
|
|
func (o *ModelRoute) SetPremium(v bool) {
|
|
o.Premium = &v
|
|
}
|
|
|
|
// GetPriced returns the Priced field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetPriced() bool {
|
|
if o == nil || IsNil(o.Priced) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Priced
|
|
}
|
|
|
|
// GetPricedOk returns a tuple with the Priced field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetPricedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Priced) {
|
|
return nil, false
|
|
}
|
|
return o.Priced, true
|
|
}
|
|
|
|
// HasPriced returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasPriced() bool {
|
|
if o != nil && !IsNil(o.Priced) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPriced gets a reference to the given bool and assigns it to the Priced field.
|
|
func (o *ModelRoute) SetPriced(v bool) {
|
|
o.Priced = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetProvider() string {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Provider, true
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *ModelRoute) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetUpdatedTime returns the UpdatedTime field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetUpdatedTime() string {
|
|
if o == nil || IsNil(o.UpdatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpdatedTime
|
|
}
|
|
|
|
// GetUpdatedTimeOk returns a tuple with the UpdatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetUpdatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpdatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedTime, true
|
|
}
|
|
|
|
// HasUpdatedTime returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasUpdatedTime() bool {
|
|
if o != nil && !IsNil(o.UpdatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedTime gets a reference to the given string and assigns it to the UpdatedTime field.
|
|
func (o *ModelRoute) SetUpdatedTime(v string) {
|
|
o.UpdatedTime = &v
|
|
}
|
|
|
|
// GetUpstream returns the Upstream field value if set, zero value otherwise.
|
|
func (o *ModelRoute) GetUpstream() string {
|
|
if o == nil || IsNil(o.Upstream) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Upstream
|
|
}
|
|
|
|
// GetUpstreamOk returns a tuple with the Upstream field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ModelRoute) GetUpstreamOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Upstream) {
|
|
return nil, false
|
|
}
|
|
return o.Upstream, true
|
|
}
|
|
|
|
// HasUpstream returns a boolean if a field has been set.
|
|
func (o *ModelRoute) HasUpstream() bool {
|
|
if o != nil && !IsNil(o.Upstream) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpstream gets a reference to the given string and assigns it to the Upstream field.
|
|
func (o *ModelRoute) SetUpstream(v string) {
|
|
o.Upstream = &v
|
|
}
|
|
|
|
func (o ModelRoute) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ModelRoute) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CostInPerMillion) {
|
|
toSerialize["costInPerMillion"] = o.CostInPerMillion
|
|
}
|
|
if !IsNil(o.CostOutPerMillion) {
|
|
toSerialize["costOutPerMillion"] = o.CostOutPerMillion
|
|
}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.Enabled) {
|
|
toSerialize["enabled"] = o.Enabled
|
|
}
|
|
if !IsNil(o.Fallback1Provider) {
|
|
toSerialize["fallback1Provider"] = o.Fallback1Provider
|
|
}
|
|
if !IsNil(o.Fallback1Upstream) {
|
|
toSerialize["fallback1Upstream"] = o.Fallback1Upstream
|
|
}
|
|
if !IsNil(o.Fallback2Provider) {
|
|
toSerialize["fallback2Provider"] = o.Fallback2Provider
|
|
}
|
|
if !IsNil(o.Fallback2Upstream) {
|
|
toSerialize["fallback2Upstream"] = o.Fallback2Upstream
|
|
}
|
|
if !IsNil(o.Hidden) {
|
|
toSerialize["hidden"] = o.Hidden
|
|
}
|
|
if !IsNil(o.InputPricePerMillion) {
|
|
toSerialize["inputPricePerMillion"] = o.InputPricePerMillion
|
|
}
|
|
if !IsNil(o.ModelName) {
|
|
toSerialize["modelName"] = o.ModelName
|
|
}
|
|
if !IsNil(o.OutputPricePerMillion) {
|
|
toSerialize["outputPricePerMillion"] = o.OutputPricePerMillion
|
|
}
|
|
if !IsNil(o.OwnedBy) {
|
|
toSerialize["ownedBy"] = o.OwnedBy
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Premium) {
|
|
toSerialize["premium"] = o.Premium
|
|
}
|
|
if !IsNil(o.Priced) {
|
|
toSerialize["priced"] = o.Priced
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.UpdatedTime) {
|
|
toSerialize["updatedTime"] = o.UpdatedTime
|
|
}
|
|
if !IsNil(o.Upstream) {
|
|
toSerialize["upstream"] = o.Upstream
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ModelRoute) UnmarshalJSON(data []byte) (err error) {
|
|
varModelRoute := _ModelRoute{}
|
|
|
|
err = json.Unmarshal(data, &varModelRoute)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ModelRoute(varModelRoute)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "costInPerMillion")
|
|
delete(additionalProperties, "costOutPerMillion")
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "enabled")
|
|
delete(additionalProperties, "fallback1Provider")
|
|
delete(additionalProperties, "fallback1Upstream")
|
|
delete(additionalProperties, "fallback2Provider")
|
|
delete(additionalProperties, "fallback2Upstream")
|
|
delete(additionalProperties, "hidden")
|
|
delete(additionalProperties, "inputPricePerMillion")
|
|
delete(additionalProperties, "modelName")
|
|
delete(additionalProperties, "outputPricePerMillion")
|
|
delete(additionalProperties, "ownedBy")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "premium")
|
|
delete(additionalProperties, "priced")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "updatedTime")
|
|
delete(additionalProperties, "upstream")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableModelRoute struct {
|
|
value *ModelRoute
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableModelRoute) Get() *ModelRoute {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableModelRoute) Set(val *ModelRoute) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableModelRoute) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableModelRoute) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableModelRoute(val *ModelRoute) *NullableModelRoute {
|
|
return &NullableModelRoute{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableModelRoute) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableModelRoute) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|