mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
497 lines
13 KiB
Go
497 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 BenchmarkPairing type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BenchmarkPairing{}
|
|
|
|
// BenchmarkPairing struct for BenchmarkPairing
|
|
type BenchmarkPairing struct {
|
|
// A is the first model id.
|
|
A *string `json:"a,omitempty"`
|
|
// ACorrect is how many of those common items A got right.
|
|
ACorrect *int64 `json:"a_correct,omitempty"`
|
|
// B is the second model id.
|
|
B *string `json:"b,omitempty"`
|
|
// BCorrect is how many of those common items B got right.
|
|
BCorrect *int64 `json:"b_correct,omitempty"`
|
|
// Benchmark is the catalog id the two arms were compared on.
|
|
Benchmark *string `json:"benchmark,omitempty"`
|
|
// McnemarP is the two-sided exact binomial p on the discordant pairs. It is 1 when nothing is discordant, which is \"no evidence of a difference\", not an error.
|
|
McnemarP *float64 `json:"mcnemar_p,omitempty"`
|
|
// NCommon is how many items BOTH arms completed. It is the denominator, and the reason this comparison is valid where a raw accuracy difference is not.
|
|
NCommon *int64 `json:"n_common,omitempty"`
|
|
// NetAMinusB is the two rescue counts subtracted — A's advantage in items.
|
|
NetAMinusB *int64 `json:"net_a_minus_b,omitempty"`
|
|
// RescueAOverB is how many items A got right and B got wrong.
|
|
RescueAOverB *int64 `json:"rescue_a_over_b,omitempty"`
|
|
// RescueBOverA is how many items B got right and A got wrong.
|
|
RescueBOverA *int64 `json:"rescue_b_over_a,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BenchmarkPairing BenchmarkPairing
|
|
|
|
// NewBenchmarkPairing instantiates a new BenchmarkPairing 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 NewBenchmarkPairing() *BenchmarkPairing {
|
|
this := BenchmarkPairing{}
|
|
return &this
|
|
}
|
|
|
|
// NewBenchmarkPairingWithDefaults instantiates a new BenchmarkPairing 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 NewBenchmarkPairingWithDefaults() *BenchmarkPairing {
|
|
this := BenchmarkPairing{}
|
|
return &this
|
|
}
|
|
|
|
// GetA returns the A field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetA() string {
|
|
if o == nil || IsNil(o.A) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.A
|
|
}
|
|
|
|
// GetAOk returns a tuple with the A field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetAOk() (*string, bool) {
|
|
if o == nil || IsNil(o.A) {
|
|
return nil, false
|
|
}
|
|
return o.A, true
|
|
}
|
|
|
|
// HasA returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasA() bool {
|
|
if o != nil && !IsNil(o.A) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetA gets a reference to the given string and assigns it to the A field.
|
|
func (o *BenchmarkPairing) SetA(v string) {
|
|
o.A = &v
|
|
}
|
|
|
|
// GetACorrect returns the ACorrect field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetACorrect() int64 {
|
|
if o == nil || IsNil(o.ACorrect) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ACorrect
|
|
}
|
|
|
|
// GetACorrectOk returns a tuple with the ACorrect field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetACorrectOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ACorrect) {
|
|
return nil, false
|
|
}
|
|
return o.ACorrect, true
|
|
}
|
|
|
|
// HasACorrect returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasACorrect() bool {
|
|
if o != nil && !IsNil(o.ACorrect) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetACorrect gets a reference to the given int64 and assigns it to the ACorrect field.
|
|
func (o *BenchmarkPairing) SetACorrect(v int64) {
|
|
o.ACorrect = &v
|
|
}
|
|
|
|
// GetB returns the B field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetB() string {
|
|
if o == nil || IsNil(o.B) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.B
|
|
}
|
|
|
|
// GetBOk returns a tuple with the B field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetBOk() (*string, bool) {
|
|
if o == nil || IsNil(o.B) {
|
|
return nil, false
|
|
}
|
|
return o.B, true
|
|
}
|
|
|
|
// HasB returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasB() bool {
|
|
if o != nil && !IsNil(o.B) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetB gets a reference to the given string and assigns it to the B field.
|
|
func (o *BenchmarkPairing) SetB(v string) {
|
|
o.B = &v
|
|
}
|
|
|
|
// GetBCorrect returns the BCorrect field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetBCorrect() int64 {
|
|
if o == nil || IsNil(o.BCorrect) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.BCorrect
|
|
}
|
|
|
|
// GetBCorrectOk returns a tuple with the BCorrect field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetBCorrectOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.BCorrect) {
|
|
return nil, false
|
|
}
|
|
return o.BCorrect, true
|
|
}
|
|
|
|
// HasBCorrect returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasBCorrect() bool {
|
|
if o != nil && !IsNil(o.BCorrect) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBCorrect gets a reference to the given int64 and assigns it to the BCorrect field.
|
|
func (o *BenchmarkPairing) SetBCorrect(v int64) {
|
|
o.BCorrect = &v
|
|
}
|
|
|
|
// GetBenchmark returns the Benchmark field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetBenchmark() string {
|
|
if o == nil || IsNil(o.Benchmark) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Benchmark
|
|
}
|
|
|
|
// GetBenchmarkOk returns a tuple with the Benchmark field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetBenchmarkOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Benchmark) {
|
|
return nil, false
|
|
}
|
|
return o.Benchmark, true
|
|
}
|
|
|
|
// HasBenchmark returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasBenchmark() bool {
|
|
if o != nil && !IsNil(o.Benchmark) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBenchmark gets a reference to the given string and assigns it to the Benchmark field.
|
|
func (o *BenchmarkPairing) SetBenchmark(v string) {
|
|
o.Benchmark = &v
|
|
}
|
|
|
|
// GetMcnemarP returns the McnemarP field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetMcnemarP() float64 {
|
|
if o == nil || IsNil(o.McnemarP) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.McnemarP
|
|
}
|
|
|
|
// GetMcnemarPOk returns a tuple with the McnemarP field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetMcnemarPOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.McnemarP) {
|
|
return nil, false
|
|
}
|
|
return o.McnemarP, true
|
|
}
|
|
|
|
// HasMcnemarP returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasMcnemarP() bool {
|
|
if o != nil && !IsNil(o.McnemarP) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMcnemarP gets a reference to the given float64 and assigns it to the McnemarP field.
|
|
func (o *BenchmarkPairing) SetMcnemarP(v float64) {
|
|
o.McnemarP = &v
|
|
}
|
|
|
|
// GetNCommon returns the NCommon field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetNCommon() int64 {
|
|
if o == nil || IsNil(o.NCommon) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.NCommon
|
|
}
|
|
|
|
// GetNCommonOk returns a tuple with the NCommon field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetNCommonOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.NCommon) {
|
|
return nil, false
|
|
}
|
|
return o.NCommon, true
|
|
}
|
|
|
|
// HasNCommon returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasNCommon() bool {
|
|
if o != nil && !IsNil(o.NCommon) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNCommon gets a reference to the given int64 and assigns it to the NCommon field.
|
|
func (o *BenchmarkPairing) SetNCommon(v int64) {
|
|
o.NCommon = &v
|
|
}
|
|
|
|
// GetNetAMinusB returns the NetAMinusB field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetNetAMinusB() int64 {
|
|
if o == nil || IsNil(o.NetAMinusB) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.NetAMinusB
|
|
}
|
|
|
|
// GetNetAMinusBOk returns a tuple with the NetAMinusB field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetNetAMinusBOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.NetAMinusB) {
|
|
return nil, false
|
|
}
|
|
return o.NetAMinusB, true
|
|
}
|
|
|
|
// HasNetAMinusB returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasNetAMinusB() bool {
|
|
if o != nil && !IsNil(o.NetAMinusB) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNetAMinusB gets a reference to the given int64 and assigns it to the NetAMinusB field.
|
|
func (o *BenchmarkPairing) SetNetAMinusB(v int64) {
|
|
o.NetAMinusB = &v
|
|
}
|
|
|
|
// GetRescueAOverB returns the RescueAOverB field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetRescueAOverB() int64 {
|
|
if o == nil || IsNil(o.RescueAOverB) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.RescueAOverB
|
|
}
|
|
|
|
// GetRescueAOverBOk returns a tuple with the RescueAOverB field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetRescueAOverBOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.RescueAOverB) {
|
|
return nil, false
|
|
}
|
|
return o.RescueAOverB, true
|
|
}
|
|
|
|
// HasRescueAOverB returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasRescueAOverB() bool {
|
|
if o != nil && !IsNil(o.RescueAOverB) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRescueAOverB gets a reference to the given int64 and assigns it to the RescueAOverB field.
|
|
func (o *BenchmarkPairing) SetRescueAOverB(v int64) {
|
|
o.RescueAOverB = &v
|
|
}
|
|
|
|
// GetRescueBOverA returns the RescueBOverA field value if set, zero value otherwise.
|
|
func (o *BenchmarkPairing) GetRescueBOverA() int64 {
|
|
if o == nil || IsNil(o.RescueBOverA) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.RescueBOverA
|
|
}
|
|
|
|
// GetRescueBOverAOk returns a tuple with the RescueBOverA field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPairing) GetRescueBOverAOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.RescueBOverA) {
|
|
return nil, false
|
|
}
|
|
return o.RescueBOverA, true
|
|
}
|
|
|
|
// HasRescueBOverA returns a boolean if a field has been set.
|
|
func (o *BenchmarkPairing) HasRescueBOverA() bool {
|
|
if o != nil && !IsNil(o.RescueBOverA) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRescueBOverA gets a reference to the given int64 and assigns it to the RescueBOverA field.
|
|
func (o *BenchmarkPairing) SetRescueBOverA(v int64) {
|
|
o.RescueBOverA = &v
|
|
}
|
|
|
|
func (o BenchmarkPairing) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BenchmarkPairing) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.A) {
|
|
toSerialize["a"] = o.A
|
|
}
|
|
if !IsNil(o.ACorrect) {
|
|
toSerialize["a_correct"] = o.ACorrect
|
|
}
|
|
if !IsNil(o.B) {
|
|
toSerialize["b"] = o.B
|
|
}
|
|
if !IsNil(o.BCorrect) {
|
|
toSerialize["b_correct"] = o.BCorrect
|
|
}
|
|
if !IsNil(o.Benchmark) {
|
|
toSerialize["benchmark"] = o.Benchmark
|
|
}
|
|
if !IsNil(o.McnemarP) {
|
|
toSerialize["mcnemar_p"] = o.McnemarP
|
|
}
|
|
if !IsNil(o.NCommon) {
|
|
toSerialize["n_common"] = o.NCommon
|
|
}
|
|
if !IsNil(o.NetAMinusB) {
|
|
toSerialize["net_a_minus_b"] = o.NetAMinusB
|
|
}
|
|
if !IsNil(o.RescueAOverB) {
|
|
toSerialize["rescue_a_over_b"] = o.RescueAOverB
|
|
}
|
|
if !IsNil(o.RescueBOverA) {
|
|
toSerialize["rescue_b_over_a"] = o.RescueBOverA
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BenchmarkPairing) UnmarshalJSON(data []byte) (err error) {
|
|
varBenchmarkPairing := _BenchmarkPairing{}
|
|
|
|
err = json.Unmarshal(data, &varBenchmarkPairing)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BenchmarkPairing(varBenchmarkPairing)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "a")
|
|
delete(additionalProperties, "a_correct")
|
|
delete(additionalProperties, "b")
|
|
delete(additionalProperties, "b_correct")
|
|
delete(additionalProperties, "benchmark")
|
|
delete(additionalProperties, "mcnemar_p")
|
|
delete(additionalProperties, "n_common")
|
|
delete(additionalProperties, "net_a_minus_b")
|
|
delete(additionalProperties, "rescue_a_over_b")
|
|
delete(additionalProperties, "rescue_b_over_a")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBenchmarkPairing struct {
|
|
value *BenchmarkPairing
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBenchmarkPairing) Get() *BenchmarkPairing {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBenchmarkPairing) Set(val *BenchmarkPairing) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBenchmarkPairing) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBenchmarkPairing) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBenchmarkPairing(val *BenchmarkPairing) *NullableBenchmarkPairing {
|
|
return &NullableBenchmarkPairing{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBenchmarkPairing) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBenchmarkPairing) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|