mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
308 lines
7.9 KiB
Go
308 lines
7.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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the BenchmarkRunPoint type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BenchmarkRunPoint{}
|
|
|
|
// BenchmarkRunPoint struct for BenchmarkRunPoint
|
|
type BenchmarkRunPoint struct {
|
|
// At is when the run was recorded.
|
|
At *time.Time `json:"at,omitempty"`
|
|
// Delta is the change in score from the previous run for this model, absent on the first. It is the number the whole surface exists to make visible.
|
|
Delta *float64 `json:"delta,omitempty"`
|
|
// N is how many items the run covered. Two runs are only comparable at the same n, which is why it travels with every point rather than being assumed.
|
|
N *int64 `json:"n,omitempty"`
|
|
// Run is the measurement id these attempts were recorded under.
|
|
Run *string `json:"run,omitempty"`
|
|
// Score is accuracy over the items this run covered, as a percentage.
|
|
Score *float64 `json:"score,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BenchmarkRunPoint BenchmarkRunPoint
|
|
|
|
// NewBenchmarkRunPoint instantiates a new BenchmarkRunPoint 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 NewBenchmarkRunPoint() *BenchmarkRunPoint {
|
|
this := BenchmarkRunPoint{}
|
|
return &this
|
|
}
|
|
|
|
// NewBenchmarkRunPointWithDefaults instantiates a new BenchmarkRunPoint 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 NewBenchmarkRunPointWithDefaults() *BenchmarkRunPoint {
|
|
this := BenchmarkRunPoint{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *BenchmarkRunPoint) GetAt() time.Time {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkRunPoint) GetAtOk() (*time.Time, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *BenchmarkRunPoint) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given time.Time and assigns it to the At field.
|
|
func (o *BenchmarkRunPoint) SetAt(v time.Time) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetDelta returns the Delta field value if set, zero value otherwise.
|
|
func (o *BenchmarkRunPoint) GetDelta() float64 {
|
|
if o == nil || IsNil(o.Delta) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Delta
|
|
}
|
|
|
|
// GetDeltaOk returns a tuple with the Delta field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkRunPoint) GetDeltaOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Delta) {
|
|
return nil, false
|
|
}
|
|
return o.Delta, true
|
|
}
|
|
|
|
// HasDelta returns a boolean if a field has been set.
|
|
func (o *BenchmarkRunPoint) HasDelta() bool {
|
|
if o != nil && !IsNil(o.Delta) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDelta gets a reference to the given float64 and assigns it to the Delta field.
|
|
func (o *BenchmarkRunPoint) SetDelta(v float64) {
|
|
o.Delta = &v
|
|
}
|
|
|
|
// GetN returns the N field value if set, zero value otherwise.
|
|
func (o *BenchmarkRunPoint) GetN() int64 {
|
|
if o == nil || IsNil(o.N) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.N
|
|
}
|
|
|
|
// GetNOk returns a tuple with the N field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkRunPoint) GetNOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.N) {
|
|
return nil, false
|
|
}
|
|
return o.N, true
|
|
}
|
|
|
|
// HasN returns a boolean if a field has been set.
|
|
func (o *BenchmarkRunPoint) HasN() bool {
|
|
if o != nil && !IsNil(o.N) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetN gets a reference to the given int64 and assigns it to the N field.
|
|
func (o *BenchmarkRunPoint) SetN(v int64) {
|
|
o.N = &v
|
|
}
|
|
|
|
// GetRun returns the Run field value if set, zero value otherwise.
|
|
func (o *BenchmarkRunPoint) GetRun() string {
|
|
if o == nil || IsNil(o.Run) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Run
|
|
}
|
|
|
|
// GetRunOk returns a tuple with the Run field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkRunPoint) GetRunOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Run) {
|
|
return nil, false
|
|
}
|
|
return o.Run, true
|
|
}
|
|
|
|
// HasRun returns a boolean if a field has been set.
|
|
func (o *BenchmarkRunPoint) HasRun() bool {
|
|
if o != nil && !IsNil(o.Run) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRun gets a reference to the given string and assigns it to the Run field.
|
|
func (o *BenchmarkRunPoint) SetRun(v string) {
|
|
o.Run = &v
|
|
}
|
|
|
|
// GetScore returns the Score field value if set, zero value otherwise.
|
|
func (o *BenchmarkRunPoint) 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 *BenchmarkRunPoint) 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 *BenchmarkRunPoint) 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 *BenchmarkRunPoint) SetScore(v float64) {
|
|
o.Score = &v
|
|
}
|
|
|
|
func (o BenchmarkRunPoint) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BenchmarkRunPoint) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Delta) {
|
|
toSerialize["delta"] = o.Delta
|
|
}
|
|
if !IsNil(o.N) {
|
|
toSerialize["n"] = o.N
|
|
}
|
|
if !IsNil(o.Run) {
|
|
toSerialize["run"] = o.Run
|
|
}
|
|
if !IsNil(o.Score) {
|
|
toSerialize["score"] = o.Score
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BenchmarkRunPoint) UnmarshalJSON(data []byte) (err error) {
|
|
varBenchmarkRunPoint := _BenchmarkRunPoint{}
|
|
|
|
err = json.Unmarshal(data, &varBenchmarkRunPoint)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BenchmarkRunPoint(varBenchmarkRunPoint)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "delta")
|
|
delete(additionalProperties, "n")
|
|
delete(additionalProperties, "run")
|
|
delete(additionalProperties, "score")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBenchmarkRunPoint struct {
|
|
value *BenchmarkRunPoint
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBenchmarkRunPoint) Get() *BenchmarkRunPoint {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBenchmarkRunPoint) Set(val *BenchmarkRunPoint) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBenchmarkRunPoint) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBenchmarkRunPoint) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBenchmarkRunPoint(val *BenchmarkRunPoint) *NullableBenchmarkRunPoint {
|
|
return &NullableBenchmarkRunPoint{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBenchmarkRunPoint) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBenchmarkRunPoint) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|