mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
9.9 KiB
Go
383 lines
9.9 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 BenchmarkBenchmark type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BenchmarkBenchmark{}
|
|
|
|
// BenchmarkBenchmark struct for BenchmarkBenchmark
|
|
type BenchmarkBenchmark struct {
|
|
// what capability it measures
|
|
Axis *string `json:"axis,omitempty"`
|
|
// Direction is \"higher\" when a higher score is better and \"lower\" when a lower one is: a false-alarm rate, a share of answers that moved. The leaderboard orders its rows by it.
|
|
Direction *string `json:"direction,omitempty"`
|
|
// the id every other op on this surface takes
|
|
Id *string `json:"id,omitempty"`
|
|
// how many items it holds, when the set is fixed
|
|
Items *int64 `json:"items,omitempty"`
|
|
// whether the standardized harness runs it today
|
|
Native *bool `json:"native,omitempty"`
|
|
// where the items come from
|
|
Source *string `json:"source,omitempty"`
|
|
// the benchmark's published name
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BenchmarkBenchmark BenchmarkBenchmark
|
|
|
|
// NewBenchmarkBenchmark instantiates a new BenchmarkBenchmark 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 NewBenchmarkBenchmark() *BenchmarkBenchmark {
|
|
this := BenchmarkBenchmark{}
|
|
return &this
|
|
}
|
|
|
|
// NewBenchmarkBenchmarkWithDefaults instantiates a new BenchmarkBenchmark 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 NewBenchmarkBenchmarkWithDefaults() *BenchmarkBenchmark {
|
|
this := BenchmarkBenchmark{}
|
|
return &this
|
|
}
|
|
|
|
// GetAxis returns the Axis field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetAxis() string {
|
|
if o == nil || IsNil(o.Axis) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Axis
|
|
}
|
|
|
|
// GetAxisOk returns a tuple with the Axis field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetAxisOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Axis) {
|
|
return nil, false
|
|
}
|
|
return o.Axis, true
|
|
}
|
|
|
|
// HasAxis returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasAxis() bool {
|
|
if o != nil && !IsNil(o.Axis) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAxis gets a reference to the given string and assigns it to the Axis field.
|
|
func (o *BenchmarkBenchmark) SetAxis(v string) {
|
|
o.Axis = &v
|
|
}
|
|
|
|
// GetDirection returns the Direction field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetDirection() string {
|
|
if o == nil || IsNil(o.Direction) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Direction
|
|
}
|
|
|
|
// GetDirectionOk returns a tuple with the Direction field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetDirectionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Direction) {
|
|
return nil, false
|
|
}
|
|
return o.Direction, true
|
|
}
|
|
|
|
// HasDirection returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasDirection() bool {
|
|
if o != nil && !IsNil(o.Direction) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDirection gets a reference to the given string and assigns it to the Direction field.
|
|
func (o *BenchmarkBenchmark) SetDirection(v string) {
|
|
o.Direction = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *BenchmarkBenchmark) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetItems returns the Items field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetItems() int64 {
|
|
if o == nil || IsNil(o.Items) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Items
|
|
}
|
|
|
|
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetItemsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Items) {
|
|
return nil, false
|
|
}
|
|
return o.Items, true
|
|
}
|
|
|
|
// HasItems returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasItems() bool {
|
|
if o != nil && !IsNil(o.Items) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetItems gets a reference to the given int64 and assigns it to the Items field.
|
|
func (o *BenchmarkBenchmark) SetItems(v int64) {
|
|
o.Items = &v
|
|
}
|
|
|
|
// GetNative returns the Native field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetNative() bool {
|
|
if o == nil || IsNil(o.Native) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Native
|
|
}
|
|
|
|
// GetNativeOk returns a tuple with the Native field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetNativeOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Native) {
|
|
return nil, false
|
|
}
|
|
return o.Native, true
|
|
}
|
|
|
|
// HasNative returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasNative() bool {
|
|
if o != nil && !IsNil(o.Native) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNative gets a reference to the given bool and assigns it to the Native field.
|
|
func (o *BenchmarkBenchmark) SetNative(v bool) {
|
|
o.Native = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *BenchmarkBenchmark) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *BenchmarkBenchmark) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkBenchmark) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *BenchmarkBenchmark) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *BenchmarkBenchmark) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o BenchmarkBenchmark) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BenchmarkBenchmark) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Axis) {
|
|
toSerialize["axis"] = o.Axis
|
|
}
|
|
if !IsNil(o.Direction) {
|
|
toSerialize["direction"] = o.Direction
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Items) {
|
|
toSerialize["items"] = o.Items
|
|
}
|
|
if !IsNil(o.Native) {
|
|
toSerialize["native"] = o.Native
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BenchmarkBenchmark) UnmarshalJSON(data []byte) (err error) {
|
|
varBenchmarkBenchmark := _BenchmarkBenchmark{}
|
|
|
|
err = json.Unmarshal(data, &varBenchmarkBenchmark)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BenchmarkBenchmark(varBenchmarkBenchmark)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "axis")
|
|
delete(additionalProperties, "direction")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "items")
|
|
delete(additionalProperties, "native")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBenchmarkBenchmark struct {
|
|
value *BenchmarkBenchmark
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBenchmarkBenchmark) Get() *BenchmarkBenchmark {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBenchmarkBenchmark) Set(val *BenchmarkBenchmark) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBenchmarkBenchmark) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBenchmarkBenchmark) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBenchmarkBenchmark(val *BenchmarkBenchmark) *NullableBenchmarkBenchmark {
|
|
return &NullableBenchmarkBenchmark{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBenchmarkBenchmark) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBenchmarkBenchmark) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|