mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
11 KiB
Go
421 lines
11 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 BenchmarkClaim type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BenchmarkClaim{}
|
|
|
|
// BenchmarkClaim struct for BenchmarkClaim
|
|
type BenchmarkClaim struct {
|
|
// Benchmark is the canonical test id the claim is about, from /catalog.
|
|
Benchmark *string `json:"benchmark,omitempty"`
|
|
// Evidence are the evidence uris the claim rests on, at most 64.
|
|
Evidence []string `json:"evidence,omitempty"`
|
|
// Model is the system the score is claimed for.
|
|
Model *string `json:"model,omitempty"`
|
|
// Protocol records HOW it was scored — provider-reported, agentic, third-party-leaderboard — so a provider card is never read as a measurement.
|
|
Protocol *string `json:"protocol,omitempty"`
|
|
// Provider is who the claim belongs to — the lab or leaderboard whose number this is.
|
|
Provider *string `json:"provider,omitempty"`
|
|
// Runs are the research run ids the claim rests on, at most 64.
|
|
Runs []string `json:"runs,omitempty"`
|
|
// Score is the reported aggregate, as a percentage.
|
|
Score *float64 `json:"score,omitempty"`
|
|
// Source is the citation the row was read from. Required.
|
|
Source *string `json:"source,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BenchmarkClaim BenchmarkClaim
|
|
|
|
// NewBenchmarkClaim instantiates a new BenchmarkClaim 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 NewBenchmarkClaim() *BenchmarkClaim {
|
|
this := BenchmarkClaim{}
|
|
return &this
|
|
}
|
|
|
|
// NewBenchmarkClaimWithDefaults instantiates a new BenchmarkClaim 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 NewBenchmarkClaimWithDefaults() *BenchmarkClaim {
|
|
this := BenchmarkClaim{}
|
|
return &this
|
|
}
|
|
|
|
// GetBenchmark returns the Benchmark field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) 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 *BenchmarkClaim) 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 *BenchmarkClaim) 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 *BenchmarkClaim) SetBenchmark(v string) {
|
|
o.Benchmark = &v
|
|
}
|
|
|
|
// GetEvidence returns the Evidence field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) GetEvidence() []string {
|
|
if o == nil || IsNil(o.Evidence) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Evidence
|
|
}
|
|
|
|
// GetEvidenceOk returns a tuple with the Evidence field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkClaim) GetEvidenceOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Evidence) {
|
|
return nil, false
|
|
}
|
|
return o.Evidence, true
|
|
}
|
|
|
|
// HasEvidence returns a boolean if a field has been set.
|
|
func (o *BenchmarkClaim) HasEvidence() bool {
|
|
if o != nil && !IsNil(o.Evidence) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvidence gets a reference to the given []string and assigns it to the Evidence field.
|
|
func (o *BenchmarkClaim) SetEvidence(v []string) {
|
|
o.Evidence = v
|
|
}
|
|
|
|
// GetModel returns the Model field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) GetModel() string {
|
|
if o == nil || IsNil(o.Model) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Model
|
|
}
|
|
|
|
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkClaim) GetModelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Model) {
|
|
return nil, false
|
|
}
|
|
return o.Model, true
|
|
}
|
|
|
|
// HasModel returns a boolean if a field has been set.
|
|
func (o *BenchmarkClaim) HasModel() bool {
|
|
if o != nil && !IsNil(o.Model) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModel gets a reference to the given string and assigns it to the Model field.
|
|
func (o *BenchmarkClaim) SetModel(v string) {
|
|
o.Model = &v
|
|
}
|
|
|
|
// GetProtocol returns the Protocol field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) GetProtocol() string {
|
|
if o == nil || IsNil(o.Protocol) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Protocol
|
|
}
|
|
|
|
// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkClaim) GetProtocolOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Protocol) {
|
|
return nil, false
|
|
}
|
|
return o.Protocol, true
|
|
}
|
|
|
|
// HasProtocol returns a boolean if a field has been set.
|
|
func (o *BenchmarkClaim) HasProtocol() bool {
|
|
if o != nil && !IsNil(o.Protocol) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProtocol gets a reference to the given string and assigns it to the Protocol field.
|
|
func (o *BenchmarkClaim) SetProtocol(v string) {
|
|
o.Protocol = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) 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 *BenchmarkClaim) 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 *BenchmarkClaim) 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 *BenchmarkClaim) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetRuns returns the Runs field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) GetRuns() []string {
|
|
if o == nil || IsNil(o.Runs) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Runs
|
|
}
|
|
|
|
// GetRunsOk returns a tuple with the Runs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkClaim) GetRunsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Runs) {
|
|
return nil, false
|
|
}
|
|
return o.Runs, true
|
|
}
|
|
|
|
// HasRuns returns a boolean if a field has been set.
|
|
func (o *BenchmarkClaim) HasRuns() bool {
|
|
if o != nil && !IsNil(o.Runs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRuns gets a reference to the given []string and assigns it to the Runs field.
|
|
func (o *BenchmarkClaim) SetRuns(v []string) {
|
|
o.Runs = v
|
|
}
|
|
|
|
// GetScore returns the Score field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) GetScore() float64 {
|
|
if o == nil || IsNil(o.Score) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Score
|
|
}
|
|
|
|
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkClaim) GetScoreOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Score) {
|
|
return nil, false
|
|
}
|
|
return o.Score, true
|
|
}
|
|
|
|
// HasScore returns a boolean if a field has been set.
|
|
func (o *BenchmarkClaim) HasScore() bool {
|
|
if o != nil && !IsNil(o.Score) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScore gets a reference to the given float64 and assigns it to the Score field.
|
|
func (o *BenchmarkClaim) SetScore(v float64) {
|
|
o.Score = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *BenchmarkClaim) 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 *BenchmarkClaim) 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 *BenchmarkClaim) 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 *BenchmarkClaim) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
func (o BenchmarkClaim) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BenchmarkClaim) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Benchmark) {
|
|
toSerialize["benchmark"] = o.Benchmark
|
|
}
|
|
if !IsNil(o.Evidence) {
|
|
toSerialize["evidence"] = o.Evidence
|
|
}
|
|
if !IsNil(o.Model) {
|
|
toSerialize["model"] = o.Model
|
|
}
|
|
if !IsNil(o.Protocol) {
|
|
toSerialize["protocol"] = o.Protocol
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.Runs) {
|
|
toSerialize["runs"] = o.Runs
|
|
}
|
|
if !IsNil(o.Score) {
|
|
toSerialize["score"] = o.Score
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BenchmarkClaim) UnmarshalJSON(data []byte) (err error) {
|
|
varBenchmarkClaim := _BenchmarkClaim{}
|
|
|
|
err = json.Unmarshal(data, &varBenchmarkClaim)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BenchmarkClaim(varBenchmarkClaim)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "benchmark")
|
|
delete(additionalProperties, "evidence")
|
|
delete(additionalProperties, "model")
|
|
delete(additionalProperties, "protocol")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "runs")
|
|
delete(additionalProperties, "score")
|
|
delete(additionalProperties, "source")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBenchmarkClaim struct {
|
|
value *BenchmarkClaim
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBenchmarkClaim) Get() *BenchmarkClaim {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBenchmarkClaim) Set(val *BenchmarkClaim) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBenchmarkClaim) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBenchmarkClaim) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBenchmarkClaim(val *BenchmarkClaim) *NullableBenchmarkClaim {
|
|
return &NullableBenchmarkClaim{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBenchmarkClaim) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBenchmarkClaim) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|