Files
sdk/model_eval_run_record.go

459 lines
12 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 EvalRunRecord type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalRunRecord{}
// EvalRunRecord struct for EvalRunRecord
type EvalRunRecord struct {
// AvgScore is the mean over the scored examples.
AvgScore *float64 `json:"avgScore,omitempty"`
// CreatedAt is when the run first landed.
CreatedAt *string `json:"createdAt,omitempty"`
// Dataset is the set that was scored.
Dataset *string `json:"dataset,omitempty"`
// Items is how many examples were attempted.
Items *int64 `json:"items,omitempty"`
// JudgeModel is the model that graded.
JudgeModel *string `json:"judgeModel,omitempty"`
// Model is the model under test.
Model *string `json:"model,omitempty"`
// RunName is the run's label.
RunName *string `json:"runName,omitempty"`
// Scored is how many produced a real score.
Scored *int64 `json:"scored,omitempty"`
// UpdatedAt is when the record last changed.
UpdatedAt *string `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalRunRecord EvalRunRecord
// NewEvalRunRecord instantiates a new EvalRunRecord 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 NewEvalRunRecord() *EvalRunRecord {
this := EvalRunRecord{}
return &this
}
// NewEvalRunRecordWithDefaults instantiates a new EvalRunRecord 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 NewEvalRunRecordWithDefaults() *EvalRunRecord {
this := EvalRunRecord{}
return &this
}
// GetAvgScore returns the AvgScore field value if set, zero value otherwise.
func (o *EvalRunRecord) GetAvgScore() float64 {
if o == nil || IsNil(o.AvgScore) {
var ret float64
return ret
}
return *o.AvgScore
}
// GetAvgScoreOk returns a tuple with the AvgScore field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetAvgScoreOk() (*float64, bool) {
if o == nil || IsNil(o.AvgScore) {
return nil, false
}
return o.AvgScore, true
}
// HasAvgScore returns a boolean if a field has been set.
func (o *EvalRunRecord) HasAvgScore() bool {
if o != nil && !IsNil(o.AvgScore) {
return true
}
return false
}
// SetAvgScore gets a reference to the given float64 and assigns it to the AvgScore field.
func (o *EvalRunRecord) SetAvgScore(v float64) {
o.AvgScore = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *EvalRunRecord) GetCreatedAt() string {
if o == nil || IsNil(o.CreatedAt) {
var ret string
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetCreatedAtOk() (*string, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *EvalRunRecord) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
func (o *EvalRunRecord) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetDataset returns the Dataset field value if set, zero value otherwise.
func (o *EvalRunRecord) GetDataset() string {
if o == nil || IsNil(o.Dataset) {
var ret string
return ret
}
return *o.Dataset
}
// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetDatasetOk() (*string, bool) {
if o == nil || IsNil(o.Dataset) {
return nil, false
}
return o.Dataset, true
}
// HasDataset returns a boolean if a field has been set.
func (o *EvalRunRecord) HasDataset() bool {
if o != nil && !IsNil(o.Dataset) {
return true
}
return false
}
// SetDataset gets a reference to the given string and assigns it to the Dataset field.
func (o *EvalRunRecord) SetDataset(v string) {
o.Dataset = &v
}
// GetItems returns the Items field value if set, zero value otherwise.
func (o *EvalRunRecord) 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 *EvalRunRecord) 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 *EvalRunRecord) 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 *EvalRunRecord) SetItems(v int64) {
o.Items = &v
}
// GetJudgeModel returns the JudgeModel field value if set, zero value otherwise.
func (o *EvalRunRecord) GetJudgeModel() string {
if o == nil || IsNil(o.JudgeModel) {
var ret string
return ret
}
return *o.JudgeModel
}
// GetJudgeModelOk returns a tuple with the JudgeModel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetJudgeModelOk() (*string, bool) {
if o == nil || IsNil(o.JudgeModel) {
return nil, false
}
return o.JudgeModel, true
}
// HasJudgeModel returns a boolean if a field has been set.
func (o *EvalRunRecord) HasJudgeModel() bool {
if o != nil && !IsNil(o.JudgeModel) {
return true
}
return false
}
// SetJudgeModel gets a reference to the given string and assigns it to the JudgeModel field.
func (o *EvalRunRecord) SetJudgeModel(v string) {
o.JudgeModel = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *EvalRunRecord) 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 *EvalRunRecord) 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 *EvalRunRecord) 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 *EvalRunRecord) SetModel(v string) {
o.Model = &v
}
// GetRunName returns the RunName field value if set, zero value otherwise.
func (o *EvalRunRecord) GetRunName() string {
if o == nil || IsNil(o.RunName) {
var ret string
return ret
}
return *o.RunName
}
// GetRunNameOk returns a tuple with the RunName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetRunNameOk() (*string, bool) {
if o == nil || IsNil(o.RunName) {
return nil, false
}
return o.RunName, true
}
// HasRunName returns a boolean if a field has been set.
func (o *EvalRunRecord) HasRunName() bool {
if o != nil && !IsNil(o.RunName) {
return true
}
return false
}
// SetRunName gets a reference to the given string and assigns it to the RunName field.
func (o *EvalRunRecord) SetRunName(v string) {
o.RunName = &v
}
// GetScored returns the Scored field value if set, zero value otherwise.
func (o *EvalRunRecord) GetScored() int64 {
if o == nil || IsNil(o.Scored) {
var ret int64
return ret
}
return *o.Scored
}
// GetScoredOk returns a tuple with the Scored field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetScoredOk() (*int64, bool) {
if o == nil || IsNil(o.Scored) {
return nil, false
}
return o.Scored, true
}
// HasScored returns a boolean if a field has been set.
func (o *EvalRunRecord) HasScored() bool {
if o != nil && !IsNil(o.Scored) {
return true
}
return false
}
// SetScored gets a reference to the given int64 and assigns it to the Scored field.
func (o *EvalRunRecord) SetScored(v int64) {
o.Scored = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *EvalRunRecord) GetUpdatedAt() string {
if o == nil || IsNil(o.UpdatedAt) {
var ret string
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalRunRecord) GetUpdatedAtOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *EvalRunRecord) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
func (o *EvalRunRecord) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o EvalRunRecord) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalRunRecord) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AvgScore) {
toSerialize["avgScore"] = o.AvgScore
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Dataset) {
toSerialize["dataset"] = o.Dataset
}
if !IsNil(o.Items) {
toSerialize["items"] = o.Items
}
if !IsNil(o.JudgeModel) {
toSerialize["judgeModel"] = o.JudgeModel
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.RunName) {
toSerialize["runName"] = o.RunName
}
if !IsNil(o.Scored) {
toSerialize["scored"] = o.Scored
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EvalRunRecord) UnmarshalJSON(data []byte) (err error) {
varEvalRunRecord := _EvalRunRecord{}
err = json.Unmarshal(data, &varEvalRunRecord)
if err != nil {
return err
}
*o = EvalRunRecord(varEvalRunRecord)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "avgScore")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "dataset")
delete(additionalProperties, "items")
delete(additionalProperties, "judgeModel")
delete(additionalProperties, "model")
delete(additionalProperties, "runName")
delete(additionalProperties, "scored")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalRunRecord struct {
value *EvalRunRecord
isSet bool
}
func (v NullableEvalRunRecord) Get() *EvalRunRecord {
return v.value
}
func (v *NullableEvalRunRecord) Set(val *EvalRunRecord) {
v.value = val
v.isSet = true
}
func (v NullableEvalRunRecord) IsSet() bool {
return v.isSet
}
func (v *NullableEvalRunRecord) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalRunRecord(val *EvalRunRecord) *NullableEvalRunRecord {
return &NullableEvalRunRecord{value: val, isSet: true}
}
func (v NullableEvalRunRecord) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalRunRecord) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}