Files
sdk/model_eval_evaluator_view.go

345 lines
9.1 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 EvalEvaluatorView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalEvaluatorView{}
// EvalEvaluatorView struct for EvalEvaluatorView
type EvalEvaluatorView struct {
// CreatedAt is when the judge was first defined.
CreatedAt *string `json:"createdAt,omitempty"`
// Criteria is the written standard the judge applies.
Criteria *string `json:"criteria,omitempty"`
// Model is the model that does the grading.
Model *string `json:"model,omitempty"`
// Name is the judge's org-unique handle.
Name *string `json:"name,omitempty"`
// ScoreName is the name the resulting scores are filed under.
ScoreName *string `json:"scoreName,omitempty"`
// UpdatedAt is when it last changed.
UpdatedAt *string `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalEvaluatorView EvalEvaluatorView
// NewEvalEvaluatorView instantiates a new EvalEvaluatorView 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 NewEvalEvaluatorView() *EvalEvaluatorView {
this := EvalEvaluatorView{}
return &this
}
// NewEvalEvaluatorViewWithDefaults instantiates a new EvalEvaluatorView 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 NewEvalEvaluatorViewWithDefaults() *EvalEvaluatorView {
this := EvalEvaluatorView{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *EvalEvaluatorView) 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 *EvalEvaluatorView) 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 *EvalEvaluatorView) 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 *EvalEvaluatorView) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetCriteria returns the Criteria field value if set, zero value otherwise.
func (o *EvalEvaluatorView) GetCriteria() string {
if o == nil || IsNil(o.Criteria) {
var ret string
return ret
}
return *o.Criteria
}
// GetCriteriaOk returns a tuple with the Criteria field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalEvaluatorView) GetCriteriaOk() (*string, bool) {
if o == nil || IsNil(o.Criteria) {
return nil, false
}
return o.Criteria, true
}
// HasCriteria returns a boolean if a field has been set.
func (o *EvalEvaluatorView) HasCriteria() bool {
if o != nil && !IsNil(o.Criteria) {
return true
}
return false
}
// SetCriteria gets a reference to the given string and assigns it to the Criteria field.
func (o *EvalEvaluatorView) SetCriteria(v string) {
o.Criteria = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *EvalEvaluatorView) 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 *EvalEvaluatorView) 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 *EvalEvaluatorView) 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 *EvalEvaluatorView) SetModel(v string) {
o.Model = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *EvalEvaluatorView) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalEvaluatorView) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *EvalEvaluatorView) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *EvalEvaluatorView) SetName(v string) {
o.Name = &v
}
// GetScoreName returns the ScoreName field value if set, zero value otherwise.
func (o *EvalEvaluatorView) GetScoreName() string {
if o == nil || IsNil(o.ScoreName) {
var ret string
return ret
}
return *o.ScoreName
}
// GetScoreNameOk returns a tuple with the ScoreName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalEvaluatorView) GetScoreNameOk() (*string, bool) {
if o == nil || IsNil(o.ScoreName) {
return nil, false
}
return o.ScoreName, true
}
// HasScoreName returns a boolean if a field has been set.
func (o *EvalEvaluatorView) HasScoreName() bool {
if o != nil && !IsNil(o.ScoreName) {
return true
}
return false
}
// SetScoreName gets a reference to the given string and assigns it to the ScoreName field.
func (o *EvalEvaluatorView) SetScoreName(v string) {
o.ScoreName = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *EvalEvaluatorView) 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 *EvalEvaluatorView) 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 *EvalEvaluatorView) 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 *EvalEvaluatorView) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o EvalEvaluatorView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalEvaluatorView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Criteria) {
toSerialize["criteria"] = o.Criteria
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.ScoreName) {
toSerialize["scoreName"] = o.ScoreName
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EvalEvaluatorView) UnmarshalJSON(data []byte) (err error) {
varEvalEvaluatorView := _EvalEvaluatorView{}
err = json.Unmarshal(data, &varEvalEvaluatorView)
if err != nil {
return err
}
*o = EvalEvaluatorView(varEvalEvaluatorView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "criteria")
delete(additionalProperties, "model")
delete(additionalProperties, "name")
delete(additionalProperties, "scoreName")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalEvaluatorView struct {
value *EvalEvaluatorView
isSet bool
}
func (v NullableEvalEvaluatorView) Get() *EvalEvaluatorView {
return v.value
}
func (v *NullableEvalEvaluatorView) Set(val *EvalEvaluatorView) {
v.value = val
v.isSet = true
}
func (v NullableEvalEvaluatorView) IsSet() bool {
return v.isSet
}
func (v *NullableEvalEvaluatorView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalEvaluatorView(val *EvalEvaluatorView) *NullableEvalEvaluatorView {
return &NullableEvalEvaluatorView{value: val, isSet: true}
}
func (v NullableEvalEvaluatorView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalEvaluatorView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}