mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.2 KiB
Go
307 lines
8.2 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 EvalItemReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EvalItemReq{}
|
|
|
|
// EvalItemReq struct for EvalItemReq
|
|
type EvalItemReq struct {
|
|
ExpectedOutput interface{} `json:"expectedOutput,omitempty"`
|
|
// ID makes the write idempotent — re-posting the same id replaces that example in place. Omit it and one is generated. An id that already exists in a DIFFERENT dataset is 409 rather than a move.
|
|
Id *string `json:"id,omitempty"`
|
|
Input interface{} `json:"input,omitempty"`
|
|
// Metadata is a free-form object stored with the example.
|
|
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
|
// Status is ACTIVE (the default) or ARCHIVED. Only ACTIVE examples are fed to a run, which is how an example is retired without being deleted.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EvalItemReq EvalItemReq
|
|
|
|
// NewEvalItemReq instantiates a new EvalItemReq 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 NewEvalItemReq() *EvalItemReq {
|
|
this := EvalItemReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewEvalItemReqWithDefaults instantiates a new EvalItemReq 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 NewEvalItemReqWithDefaults() *EvalItemReq {
|
|
this := EvalItemReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetExpectedOutput returns the ExpectedOutput field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *EvalItemReq) GetExpectedOutput() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.ExpectedOutput
|
|
}
|
|
|
|
// GetExpectedOutputOk returns a tuple with the ExpectedOutput field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *EvalItemReq) GetExpectedOutputOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.ExpectedOutput) {
|
|
return nil, false
|
|
}
|
|
return &o.ExpectedOutput, true
|
|
}
|
|
|
|
// HasExpectedOutput returns a boolean if a field has been set.
|
|
func (o *EvalItemReq) HasExpectedOutput() bool {
|
|
if o != nil && !IsNil(o.ExpectedOutput) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExpectedOutput gets a reference to the given interface{} and assigns it to the ExpectedOutput field.
|
|
func (o *EvalItemReq) SetExpectedOutput(v interface{}) {
|
|
o.ExpectedOutput = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *EvalItemReq) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalItemReq) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *EvalItemReq) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *EvalItemReq) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetInput returns the Input field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *EvalItemReq) GetInput() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Input
|
|
}
|
|
|
|
// GetInputOk returns a tuple with the Input field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *EvalItemReq) GetInputOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Input) {
|
|
return nil, false
|
|
}
|
|
return &o.Input, true
|
|
}
|
|
|
|
// HasInput returns a boolean if a field has been set.
|
|
func (o *EvalItemReq) HasInput() bool {
|
|
if o != nil && !IsNil(o.Input) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInput gets a reference to the given interface{} and assigns it to the Input field.
|
|
func (o *EvalItemReq) SetInput(v interface{}) {
|
|
o.Input = v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value if set, zero value otherwise.
|
|
func (o *EvalItemReq) GetMetadata() map[string]interface{} {
|
|
if o == nil || IsNil(o.Metadata) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalItemReq) GetMetadataOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Metadata) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Metadata, true
|
|
}
|
|
|
|
// HasMetadata returns a boolean if a field has been set.
|
|
func (o *EvalItemReq) HasMetadata() bool {
|
|
if o != nil && !IsNil(o.Metadata) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field.
|
|
func (o *EvalItemReq) SetMetadata(v map[string]interface{}) {
|
|
o.Metadata = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *EvalItemReq) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalItemReq) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *EvalItemReq) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *EvalItemReq) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o EvalItemReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EvalItemReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.ExpectedOutput != nil {
|
|
toSerialize["expectedOutput"] = o.ExpectedOutput
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if o.Input != nil {
|
|
toSerialize["input"] = o.Input
|
|
}
|
|
if !IsNil(o.Metadata) {
|
|
toSerialize["metadata"] = o.Metadata
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EvalItemReq) UnmarshalJSON(data []byte) (err error) {
|
|
varEvalItemReq := _EvalItemReq{}
|
|
|
|
err = json.Unmarshal(data, &varEvalItemReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EvalItemReq(varEvalItemReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "expectedOutput")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "input")
|
|
delete(additionalProperties, "metadata")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEvalItemReq struct {
|
|
value *EvalItemReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEvalItemReq) Get() *EvalItemReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEvalItemReq) Set(val *EvalItemReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEvalItemReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEvalItemReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEvalItemReq(val *EvalItemReq) *NullableEvalItemReq {
|
|
return &NullableEvalItemReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEvalItemReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEvalItemReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|