Files
sdk/model_eval_evaluator_list.go

155 lines
4.0 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 EvalEvaluatorList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalEvaluatorList{}
// EvalEvaluatorList struct for EvalEvaluatorList
type EvalEvaluatorList struct {
// Data is the caller org's judges, bounded by limit.
Data []EvalEvaluatorView `json:"data,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalEvaluatorList EvalEvaluatorList
// NewEvalEvaluatorList instantiates a new EvalEvaluatorList 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 NewEvalEvaluatorList() *EvalEvaluatorList {
this := EvalEvaluatorList{}
return &this
}
// NewEvalEvaluatorListWithDefaults instantiates a new EvalEvaluatorList 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 NewEvalEvaluatorListWithDefaults() *EvalEvaluatorList {
this := EvalEvaluatorList{}
return &this
}
// GetData returns the Data field value if set, zero value otherwise.
func (o *EvalEvaluatorList) GetData() []EvalEvaluatorView {
if o == nil || IsNil(o.Data) {
var ret []EvalEvaluatorView
return ret
}
return o.Data
}
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalEvaluatorList) GetDataOk() ([]EvalEvaluatorView, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *EvalEvaluatorList) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given []EvalEvaluatorView and assigns it to the Data field.
func (o *EvalEvaluatorList) SetData(v []EvalEvaluatorView) {
o.Data = v
}
func (o EvalEvaluatorList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalEvaluatorList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Data) {
toSerialize["data"] = o.Data
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EvalEvaluatorList) UnmarshalJSON(data []byte) (err error) {
varEvalEvaluatorList := _EvalEvaluatorList{}
err = json.Unmarshal(data, &varEvalEvaluatorList)
if err != nil {
return err
}
*o = EvalEvaluatorList(varEvalEvaluatorList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "data")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalEvaluatorList struct {
value *EvalEvaluatorList
isSet bool
}
func (v NullableEvalEvaluatorList) Get() *EvalEvaluatorList {
return v.value
}
func (v *NullableEvalEvaluatorList) Set(val *EvalEvaluatorList) {
v.value = val
v.isSet = true
}
func (v NullableEvalEvaluatorList) IsSet() bool {
return v.isSet
}
func (v *NullableEvalEvaluatorList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalEvaluatorList(val *EvalEvaluatorList) *NullableEvalEvaluatorList {
return &NullableEvalEvaluatorList{value: val, isSet: true}
}
func (v NullableEvalEvaluatorList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalEvaluatorList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}