Files
sdk/model_eval_board.go

383 lines
9.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 EvalBoard type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalBoard{}
// EvalBoard struct for EvalBoard
type EvalBoard struct {
// the top models by spend
ByModel []EvalModelStat `json:"byModel,omitempty"`
// overall latency percentiles from the GenAI spans
Latency *EvalLatencyStat `json:"latency,omitempty"`
// the long tail beyond the top models, folded into one row
Other *EvalModelStat `json:"other,omitempty"`
// the window they were computed over, echoed back
Range *EvalBoardRange `json:"range,omitempty"`
// whose numbers these are
Scope *EvalBoardScope `json:"scope,omitempty"`
// one gap-filled bucket per interval, so a chart never breaks
Series []EvalBoardPoint `json:"series,omitempty"`
// the window's headline numbers
Totals *EvalBoardTotals `json:"totals,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalBoard EvalBoard
// NewEvalBoard instantiates a new EvalBoard 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 NewEvalBoard() *EvalBoard {
this := EvalBoard{}
return &this
}
// NewEvalBoardWithDefaults instantiates a new EvalBoard 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 NewEvalBoardWithDefaults() *EvalBoard {
this := EvalBoard{}
return &this
}
// GetByModel returns the ByModel field value if set, zero value otherwise.
func (o *EvalBoard) GetByModel() []EvalModelStat {
if o == nil || IsNil(o.ByModel) {
var ret []EvalModelStat
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 *EvalBoard) GetByModelOk() ([]EvalModelStat, bool) {
if o == nil || IsNil(o.ByModel) {
return nil, false
}
return o.ByModel, true
}
// HasByModel returns a boolean if a field has been set.
func (o *EvalBoard) HasByModel() bool {
if o != nil && !IsNil(o.ByModel) {
return true
}
return false
}
// SetByModel gets a reference to the given []EvalModelStat and assigns it to the ByModel field.
func (o *EvalBoard) SetByModel(v []EvalModelStat) {
o.ByModel = v
}
// GetLatency returns the Latency field value if set, zero value otherwise.
func (o *EvalBoard) GetLatency() EvalLatencyStat {
if o == nil || IsNil(o.Latency) {
var ret EvalLatencyStat
return ret
}
return *o.Latency
}
// GetLatencyOk returns a tuple with the Latency field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoard) GetLatencyOk() (*EvalLatencyStat, bool) {
if o == nil || IsNil(o.Latency) {
return nil, false
}
return o.Latency, true
}
// HasLatency returns a boolean if a field has been set.
func (o *EvalBoard) HasLatency() bool {
if o != nil && !IsNil(o.Latency) {
return true
}
return false
}
// SetLatency gets a reference to the given EvalLatencyStat and assigns it to the Latency field.
func (o *EvalBoard) SetLatency(v EvalLatencyStat) {
o.Latency = &v
}
// GetOther returns the Other field value if set, zero value otherwise.
func (o *EvalBoard) GetOther() EvalModelStat {
if o == nil || IsNil(o.Other) {
var ret EvalModelStat
return ret
}
return *o.Other
}
// GetOtherOk returns a tuple with the Other field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoard) GetOtherOk() (*EvalModelStat, bool) {
if o == nil || IsNil(o.Other) {
return nil, false
}
return o.Other, true
}
// HasOther returns a boolean if a field has been set.
func (o *EvalBoard) HasOther() bool {
if o != nil && !IsNil(o.Other) {
return true
}
return false
}
// SetOther gets a reference to the given EvalModelStat and assigns it to the Other field.
func (o *EvalBoard) SetOther(v EvalModelStat) {
o.Other = &v
}
// GetRange returns the Range field value if set, zero value otherwise.
func (o *EvalBoard) GetRange() EvalBoardRange {
if o == nil || IsNil(o.Range) {
var ret EvalBoardRange
return ret
}
return *o.Range
}
// GetRangeOk returns a tuple with the Range field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoard) GetRangeOk() (*EvalBoardRange, bool) {
if o == nil || IsNil(o.Range) {
return nil, false
}
return o.Range, true
}
// HasRange returns a boolean if a field has been set.
func (o *EvalBoard) HasRange() bool {
if o != nil && !IsNil(o.Range) {
return true
}
return false
}
// SetRange gets a reference to the given EvalBoardRange and assigns it to the Range field.
func (o *EvalBoard) SetRange(v EvalBoardRange) {
o.Range = &v
}
// GetScope returns the Scope field value if set, zero value otherwise.
func (o *EvalBoard) GetScope() EvalBoardScope {
if o == nil || IsNil(o.Scope) {
var ret EvalBoardScope
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 *EvalBoard) GetScopeOk() (*EvalBoardScope, 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 *EvalBoard) HasScope() bool {
if o != nil && !IsNil(o.Scope) {
return true
}
return false
}
// SetScope gets a reference to the given EvalBoardScope and assigns it to the Scope field.
func (o *EvalBoard) SetScope(v EvalBoardScope) {
o.Scope = &v
}
// GetSeries returns the Series field value if set, zero value otherwise.
func (o *EvalBoard) GetSeries() []EvalBoardPoint {
if o == nil || IsNil(o.Series) {
var ret []EvalBoardPoint
return ret
}
return o.Series
}
// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoard) GetSeriesOk() ([]EvalBoardPoint, bool) {
if o == nil || IsNil(o.Series) {
return nil, false
}
return o.Series, true
}
// HasSeries returns a boolean if a field has been set.
func (o *EvalBoard) HasSeries() bool {
if o != nil && !IsNil(o.Series) {
return true
}
return false
}
// SetSeries gets a reference to the given []EvalBoardPoint and assigns it to the Series field.
func (o *EvalBoard) SetSeries(v []EvalBoardPoint) {
o.Series = v
}
// GetTotals returns the Totals field value if set, zero value otherwise.
func (o *EvalBoard) GetTotals() EvalBoardTotals {
if o == nil || IsNil(o.Totals) {
var ret EvalBoardTotals
return ret
}
return *o.Totals
}
// GetTotalsOk returns a tuple with the Totals field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalBoard) GetTotalsOk() (*EvalBoardTotals, bool) {
if o == nil || IsNil(o.Totals) {
return nil, false
}
return o.Totals, true
}
// HasTotals returns a boolean if a field has been set.
func (o *EvalBoard) HasTotals() bool {
if o != nil && !IsNil(o.Totals) {
return true
}
return false
}
// SetTotals gets a reference to the given EvalBoardTotals and assigns it to the Totals field.
func (o *EvalBoard) SetTotals(v EvalBoardTotals) {
o.Totals = &v
}
func (o EvalBoard) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalBoard) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ByModel) {
toSerialize["byModel"] = o.ByModel
}
if !IsNil(o.Latency) {
toSerialize["latency"] = o.Latency
}
if !IsNil(o.Other) {
toSerialize["other"] = o.Other
}
if !IsNil(o.Range) {
toSerialize["range"] = o.Range
}
if !IsNil(o.Scope) {
toSerialize["scope"] = o.Scope
}
if !IsNil(o.Series) {
toSerialize["series"] = o.Series
}
if !IsNil(o.Totals) {
toSerialize["totals"] = o.Totals
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EvalBoard) UnmarshalJSON(data []byte) (err error) {
varEvalBoard := _EvalBoard{}
err = json.Unmarshal(data, &varEvalBoard)
if err != nil {
return err
}
*o = EvalBoard(varEvalBoard)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "byModel")
delete(additionalProperties, "latency")
delete(additionalProperties, "other")
delete(additionalProperties, "range")
delete(additionalProperties, "scope")
delete(additionalProperties, "series")
delete(additionalProperties, "totals")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalBoard struct {
value *EvalBoard
isSet bool
}
func (v NullableEvalBoard) Get() *EvalBoard {
return v.value
}
func (v *NullableEvalBoard) Set(val *EvalBoard) {
v.value = val
v.isSet = true
}
func (v NullableEvalBoard) IsSet() bool {
return v.isSet
}
func (v *NullableEvalBoard) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalBoard(val *EvalBoard) *NullableEvalBoard {
return &NullableEvalBoard{value: val, isSet: true}
}
func (v NullableEvalBoard) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalBoard) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}