mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
487 lines
13 KiB
Go
487 lines
13 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 AiRouterStats type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiRouterStats{}
|
|
|
|
// AiRouterStats struct for AiRouterStats
|
|
type AiRouterStats struct {
|
|
ByModel map[string]int32 `json:"by_model,omitempty"`
|
|
BySource map[string]int32 `json:"by_source,omitempty"`
|
|
ByTask map[string]AiTaskStats `json:"by_task,omitempty"`
|
|
Cost *AiCostStats `json:"cost,omitempty"`
|
|
Org *string `json:"org,omitempty"`
|
|
Quality *AiQualityStats `json:"quality,omitempty"`
|
|
Retrain *AiRetrainMeta `json:"retrain,omitempty"`
|
|
Scope *string `json:"scope,omitempty"`
|
|
Throughput *AiThroughputStats `json:"throughput,omitempty"`
|
|
Window *AiStatsWindow `json:"window,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiRouterStats AiRouterStats
|
|
|
|
// NewAiRouterStats instantiates a new AiRouterStats 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 NewAiRouterStats() *AiRouterStats {
|
|
this := AiRouterStats{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiRouterStatsWithDefaults instantiates a new AiRouterStats 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 NewAiRouterStatsWithDefaults() *AiRouterStats {
|
|
this := AiRouterStats{}
|
|
return &this
|
|
}
|
|
|
|
// GetByModel returns the ByModel field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetByModel() map[string]int32 {
|
|
if o == nil || IsNil(o.ByModel) {
|
|
var ret map[string]int32
|
|
return ret
|
|
}
|
|
return o.ByModel
|
|
}
|
|
|
|
// GetByModelOk returns a tuple with the ByModel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetByModelOk() (map[string]int32, bool) {
|
|
if o == nil || IsNil(o.ByModel) {
|
|
return map[string]int32{}, false
|
|
}
|
|
return o.ByModel, true
|
|
}
|
|
|
|
// HasByModel returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasByModel() bool {
|
|
if o != nil && !IsNil(o.ByModel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetByModel gets a reference to the given map[string]int32 and assigns it to the ByModel field.
|
|
func (o *AiRouterStats) SetByModel(v map[string]int32) {
|
|
o.ByModel = v
|
|
}
|
|
|
|
// GetBySource returns the BySource field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetBySource() map[string]int32 {
|
|
if o == nil || IsNil(o.BySource) {
|
|
var ret map[string]int32
|
|
return ret
|
|
}
|
|
return o.BySource
|
|
}
|
|
|
|
// GetBySourceOk returns a tuple with the BySource field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetBySourceOk() (map[string]int32, bool) {
|
|
if o == nil || IsNil(o.BySource) {
|
|
return map[string]int32{}, false
|
|
}
|
|
return o.BySource, true
|
|
}
|
|
|
|
// HasBySource returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasBySource() bool {
|
|
if o != nil && !IsNil(o.BySource) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBySource gets a reference to the given map[string]int32 and assigns it to the BySource field.
|
|
func (o *AiRouterStats) SetBySource(v map[string]int32) {
|
|
o.BySource = v
|
|
}
|
|
|
|
// GetByTask returns the ByTask field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetByTask() map[string]AiTaskStats {
|
|
if o == nil || IsNil(o.ByTask) {
|
|
var ret map[string]AiTaskStats
|
|
return ret
|
|
}
|
|
return o.ByTask
|
|
}
|
|
|
|
// GetByTaskOk returns a tuple with the ByTask field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetByTaskOk() (map[string]AiTaskStats, bool) {
|
|
if o == nil || IsNil(o.ByTask) {
|
|
return map[string]AiTaskStats{}, false
|
|
}
|
|
return o.ByTask, true
|
|
}
|
|
|
|
// HasByTask returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasByTask() bool {
|
|
if o != nil && !IsNil(o.ByTask) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetByTask gets a reference to the given map[string]AiTaskStats and assigns it to the ByTask field.
|
|
func (o *AiRouterStats) SetByTask(v map[string]AiTaskStats) {
|
|
o.ByTask = v
|
|
}
|
|
|
|
// GetCost returns the Cost field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetCost() AiCostStats {
|
|
if o == nil || IsNil(o.Cost) {
|
|
var ret AiCostStats
|
|
return ret
|
|
}
|
|
return *o.Cost
|
|
}
|
|
|
|
// GetCostOk returns a tuple with the Cost field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetCostOk() (*AiCostStats, bool) {
|
|
if o == nil || IsNil(o.Cost) {
|
|
return nil, false
|
|
}
|
|
return o.Cost, true
|
|
}
|
|
|
|
// HasCost returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasCost() bool {
|
|
if o != nil && !IsNil(o.Cost) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCost gets a reference to the given AiCostStats and assigns it to the Cost field.
|
|
func (o *AiRouterStats) SetCost(v AiCostStats) {
|
|
o.Cost = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetOrg() string {
|
|
if o == nil || IsNil(o.Org) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Org
|
|
}
|
|
|
|
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetOrgOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Org) {
|
|
return nil, false
|
|
}
|
|
return o.Org, true
|
|
}
|
|
|
|
// HasOrg returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasOrg() bool {
|
|
if o != nil && !IsNil(o.Org) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrg gets a reference to the given string and assigns it to the Org field.
|
|
func (o *AiRouterStats) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetQuality returns the Quality field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetQuality() AiQualityStats {
|
|
if o == nil || IsNil(o.Quality) {
|
|
var ret AiQualityStats
|
|
return ret
|
|
}
|
|
return *o.Quality
|
|
}
|
|
|
|
// GetQualityOk returns a tuple with the Quality field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetQualityOk() (*AiQualityStats, bool) {
|
|
if o == nil || IsNil(o.Quality) {
|
|
return nil, false
|
|
}
|
|
return o.Quality, true
|
|
}
|
|
|
|
// HasQuality returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasQuality() bool {
|
|
if o != nil && !IsNil(o.Quality) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetQuality gets a reference to the given AiQualityStats and assigns it to the Quality field.
|
|
func (o *AiRouterStats) SetQuality(v AiQualityStats) {
|
|
o.Quality = &v
|
|
}
|
|
|
|
// GetRetrain returns the Retrain field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetRetrain() AiRetrainMeta {
|
|
if o == nil || IsNil(o.Retrain) {
|
|
var ret AiRetrainMeta
|
|
return ret
|
|
}
|
|
return *o.Retrain
|
|
}
|
|
|
|
// GetRetrainOk returns a tuple with the Retrain field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetRetrainOk() (*AiRetrainMeta, bool) {
|
|
if o == nil || IsNil(o.Retrain) {
|
|
return nil, false
|
|
}
|
|
return o.Retrain, true
|
|
}
|
|
|
|
// HasRetrain returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasRetrain() bool {
|
|
if o != nil && !IsNil(o.Retrain) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRetrain gets a reference to the given AiRetrainMeta and assigns it to the Retrain field.
|
|
func (o *AiRouterStats) SetRetrain(v AiRetrainMeta) {
|
|
o.Retrain = &v
|
|
}
|
|
|
|
// GetScope returns the Scope field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetScope() string {
|
|
if o == nil || IsNil(o.Scope) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Scope
|
|
}
|
|
|
|
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetScopeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Scope) {
|
|
return nil, false
|
|
}
|
|
return o.Scope, true
|
|
}
|
|
|
|
// HasScope returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasScope() bool {
|
|
if o != nil && !IsNil(o.Scope) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScope gets a reference to the given string and assigns it to the Scope field.
|
|
func (o *AiRouterStats) SetScope(v string) {
|
|
o.Scope = &v
|
|
}
|
|
|
|
// GetThroughput returns the Throughput field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetThroughput() AiThroughputStats {
|
|
if o == nil || IsNil(o.Throughput) {
|
|
var ret AiThroughputStats
|
|
return ret
|
|
}
|
|
return *o.Throughput
|
|
}
|
|
|
|
// GetThroughputOk returns a tuple with the Throughput field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetThroughputOk() (*AiThroughputStats, bool) {
|
|
if o == nil || IsNil(o.Throughput) {
|
|
return nil, false
|
|
}
|
|
return o.Throughput, true
|
|
}
|
|
|
|
// HasThroughput returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasThroughput() bool {
|
|
if o != nil && !IsNil(o.Throughput) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetThroughput gets a reference to the given AiThroughputStats and assigns it to the Throughput field.
|
|
func (o *AiRouterStats) SetThroughput(v AiThroughputStats) {
|
|
o.Throughput = &v
|
|
}
|
|
|
|
// GetWindow returns the Window field value if set, zero value otherwise.
|
|
func (o *AiRouterStats) GetWindow() AiStatsWindow {
|
|
if o == nil || IsNil(o.Window) {
|
|
var ret AiStatsWindow
|
|
return ret
|
|
}
|
|
return *o.Window
|
|
}
|
|
|
|
// GetWindowOk returns a tuple with the Window field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiRouterStats) GetWindowOk() (*AiStatsWindow, bool) {
|
|
if o == nil || IsNil(o.Window) {
|
|
return nil, false
|
|
}
|
|
return o.Window, true
|
|
}
|
|
|
|
// HasWindow returns a boolean if a field has been set.
|
|
func (o *AiRouterStats) HasWindow() bool {
|
|
if o != nil && !IsNil(o.Window) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWindow gets a reference to the given AiStatsWindow and assigns it to the Window field.
|
|
func (o *AiRouterStats) SetWindow(v AiStatsWindow) {
|
|
o.Window = &v
|
|
}
|
|
|
|
func (o AiRouterStats) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiRouterStats) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ByModel) {
|
|
toSerialize["by_model"] = o.ByModel
|
|
}
|
|
if !IsNil(o.BySource) {
|
|
toSerialize["by_source"] = o.BySource
|
|
}
|
|
if !IsNil(o.ByTask) {
|
|
toSerialize["by_task"] = o.ByTask
|
|
}
|
|
if !IsNil(o.Cost) {
|
|
toSerialize["cost"] = o.Cost
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.Quality) {
|
|
toSerialize["quality"] = o.Quality
|
|
}
|
|
if !IsNil(o.Retrain) {
|
|
toSerialize["retrain"] = o.Retrain
|
|
}
|
|
if !IsNil(o.Scope) {
|
|
toSerialize["scope"] = o.Scope
|
|
}
|
|
if !IsNil(o.Throughput) {
|
|
toSerialize["throughput"] = o.Throughput
|
|
}
|
|
if !IsNil(o.Window) {
|
|
toSerialize["window"] = o.Window
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiRouterStats) UnmarshalJSON(data []byte) (err error) {
|
|
varAiRouterStats := _AiRouterStats{}
|
|
|
|
err = json.Unmarshal(data, &varAiRouterStats)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiRouterStats(varAiRouterStats)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "by_model")
|
|
delete(additionalProperties, "by_source")
|
|
delete(additionalProperties, "by_task")
|
|
delete(additionalProperties, "cost")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "quality")
|
|
delete(additionalProperties, "retrain")
|
|
delete(additionalProperties, "scope")
|
|
delete(additionalProperties, "throughput")
|
|
delete(additionalProperties, "window")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiRouterStats struct {
|
|
value *AiRouterStats
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiRouterStats) Get() *AiRouterStats {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiRouterStats) Set(val *AiRouterStats) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiRouterStats) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiRouterStats) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiRouterStats(val *AiRouterStats) *NullableAiRouterStats {
|
|
return &NullableAiRouterStats{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiRouterStats) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiRouterStats) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|