Files
sdk/model_eval_score_config_view.go

383 lines
10 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 EvalScoreConfigView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalScoreConfigView{}
// EvalScoreConfigView struct for EvalScoreConfigView
type EvalScoreConfigView struct {
// Categories is the closed set of labels a CATEGORICAL score may carry.
Categories []string `json:"categories,omitempty"`
// CreatedAt is when the rubric was first declared.
CreatedAt *string `json:"createdAt,omitempty"`
// DataType is NUMERIC, CATEGORICAL or BOOLEAN, and is authoritative — a score recorded under this name cannot claim a different one.
DataType *string `json:"dataType,omitempty"`
// MaxValue is the inclusive ceiling a NUMERIC score must stay under, absent when unbounded.
MaxValue *float64 `json:"maxValue,omitempty"`
// MinValue is the inclusive floor a NUMERIC score must clear, absent when unbounded.
MinValue *float64 `json:"minValue,omitempty"`
// Name is the score name this rubric governs.
Name *string `json:"name,omitempty"`
// UpdatedAt is when it last changed.
UpdatedAt *string `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalScoreConfigView EvalScoreConfigView
// NewEvalScoreConfigView instantiates a new EvalScoreConfigView 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 NewEvalScoreConfigView() *EvalScoreConfigView {
this := EvalScoreConfigView{}
return &this
}
// NewEvalScoreConfigViewWithDefaults instantiates a new EvalScoreConfigView 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 NewEvalScoreConfigViewWithDefaults() *EvalScoreConfigView {
this := EvalScoreConfigView{}
return &this
}
// GetCategories returns the Categories field value if set, zero value otherwise.
func (o *EvalScoreConfigView) GetCategories() []string {
if o == nil || IsNil(o.Categories) {
var ret []string
return ret
}
return o.Categories
}
// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalScoreConfigView) GetCategoriesOk() ([]string, bool) {
if o == nil || IsNil(o.Categories) {
return nil, false
}
return o.Categories, true
}
// HasCategories returns a boolean if a field has been set.
func (o *EvalScoreConfigView) HasCategories() bool {
if o != nil && !IsNil(o.Categories) {
return true
}
return false
}
// SetCategories gets a reference to the given []string and assigns it to the Categories field.
func (o *EvalScoreConfigView) SetCategories(v []string) {
o.Categories = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *EvalScoreConfigView) 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 *EvalScoreConfigView) 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 *EvalScoreConfigView) 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 *EvalScoreConfigView) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetDataType returns the DataType field value if set, zero value otherwise.
func (o *EvalScoreConfigView) GetDataType() string {
if o == nil || IsNil(o.DataType) {
var ret string
return ret
}
return *o.DataType
}
// GetDataTypeOk returns a tuple with the DataType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalScoreConfigView) GetDataTypeOk() (*string, bool) {
if o == nil || IsNil(o.DataType) {
return nil, false
}
return o.DataType, true
}
// HasDataType returns a boolean if a field has been set.
func (o *EvalScoreConfigView) HasDataType() bool {
if o != nil && !IsNil(o.DataType) {
return true
}
return false
}
// SetDataType gets a reference to the given string and assigns it to the DataType field.
func (o *EvalScoreConfigView) SetDataType(v string) {
o.DataType = &v
}
// GetMaxValue returns the MaxValue field value if set, zero value otherwise.
func (o *EvalScoreConfigView) GetMaxValue() float64 {
if o == nil || IsNil(o.MaxValue) {
var ret float64
return ret
}
return *o.MaxValue
}
// GetMaxValueOk returns a tuple with the MaxValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalScoreConfigView) GetMaxValueOk() (*float64, bool) {
if o == nil || IsNil(o.MaxValue) {
return nil, false
}
return o.MaxValue, true
}
// HasMaxValue returns a boolean if a field has been set.
func (o *EvalScoreConfigView) HasMaxValue() bool {
if o != nil && !IsNil(o.MaxValue) {
return true
}
return false
}
// SetMaxValue gets a reference to the given float64 and assigns it to the MaxValue field.
func (o *EvalScoreConfigView) SetMaxValue(v float64) {
o.MaxValue = &v
}
// GetMinValue returns the MinValue field value if set, zero value otherwise.
func (o *EvalScoreConfigView) GetMinValue() float64 {
if o == nil || IsNil(o.MinValue) {
var ret float64
return ret
}
return *o.MinValue
}
// GetMinValueOk returns a tuple with the MinValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalScoreConfigView) GetMinValueOk() (*float64, bool) {
if o == nil || IsNil(o.MinValue) {
return nil, false
}
return o.MinValue, true
}
// HasMinValue returns a boolean if a field has been set.
func (o *EvalScoreConfigView) HasMinValue() bool {
if o != nil && !IsNil(o.MinValue) {
return true
}
return false
}
// SetMinValue gets a reference to the given float64 and assigns it to the MinValue field.
func (o *EvalScoreConfigView) SetMinValue(v float64) {
o.MinValue = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *EvalScoreConfigView) 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 *EvalScoreConfigView) 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 *EvalScoreConfigView) 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 *EvalScoreConfigView) SetName(v string) {
o.Name = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *EvalScoreConfigView) 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 *EvalScoreConfigView) 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 *EvalScoreConfigView) 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 *EvalScoreConfigView) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o EvalScoreConfigView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalScoreConfigView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Categories) {
toSerialize["categories"] = o.Categories
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.DataType) {
toSerialize["dataType"] = o.DataType
}
if !IsNil(o.MaxValue) {
toSerialize["maxValue"] = o.MaxValue
}
if !IsNil(o.MinValue) {
toSerialize["minValue"] = o.MinValue
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *EvalScoreConfigView) UnmarshalJSON(data []byte) (err error) {
varEvalScoreConfigView := _EvalScoreConfigView{}
err = json.Unmarshal(data, &varEvalScoreConfigView)
if err != nil {
return err
}
*o = EvalScoreConfigView(varEvalScoreConfigView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "categories")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "dataType")
delete(additionalProperties, "maxValue")
delete(additionalProperties, "minValue")
delete(additionalProperties, "name")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalScoreConfigView struct {
value *EvalScoreConfigView
isSet bool
}
func (v NullableEvalScoreConfigView) Get() *EvalScoreConfigView {
return v.value
}
func (v *NullableEvalScoreConfigView) Set(val *EvalScoreConfigView) {
v.value = val
v.isSet = true
}
func (v NullableEvalScoreConfigView) IsSet() bool {
return v.isSet
}
func (v *NullableEvalScoreConfigView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalScoreConfigView(val *EvalScoreConfigView) *NullableEvalScoreConfigView {
return &NullableEvalScoreConfigView{value: val, isSet: true}
}
func (v NullableEvalScoreConfigView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalScoreConfigView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}