Files
sdk/model_eval_dataset_view.go

345 lines
9.3 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 EvalDatasetView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &EvalDatasetView{}
// EvalDatasetView struct for EvalDatasetView
type EvalDatasetView struct {
// CreatedAt is when the name was first written, kept across later edits.
CreatedAt *string `json:"createdAt,omitempty"`
// Description is free text the org wrote about what this set measures.
Description *string `json:"description,omitempty"`
// Items is how many examples the set holds. It is filled only by the single read — a listing does not count, so it is absent there rather than zero.
Items *int64 `json:"items,omitempty"`
// Metadata is the free-form object stored with the set, echoed back verbatim.
Metadata map[string]interface{} `json:"metadata,omitempty"`
// Name is the dataset's org-unique handle and the segment that addresses it.
Name *string `json:"name,omitempty"`
// UpdatedAt is when the description or metadata last changed.
UpdatedAt *string `json:"updatedAt,omitempty"`
AdditionalProperties map[string]interface{}
}
type _EvalDatasetView EvalDatasetView
// NewEvalDatasetView instantiates a new EvalDatasetView 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 NewEvalDatasetView() *EvalDatasetView {
this := EvalDatasetView{}
return &this
}
// NewEvalDatasetViewWithDefaults instantiates a new EvalDatasetView 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 NewEvalDatasetViewWithDefaults() *EvalDatasetView {
this := EvalDatasetView{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) SetCreatedAt(v string) {
o.CreatedAt = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *EvalDatasetView) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *EvalDatasetView) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *EvalDatasetView) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *EvalDatasetView) SetDescription(v string) {
o.Description = &v
}
// GetItems returns the Items field value if set, zero value otherwise.
func (o *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) SetItems(v int64) {
o.Items = &v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) SetMetadata(v map[string]interface{}) {
o.Metadata = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) SetName(v string) {
o.Name = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) 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 *EvalDatasetView) SetUpdatedAt(v string) {
o.UpdatedAt = &v
}
func (o EvalDatasetView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o EvalDatasetView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Items) {
toSerialize["items"] = o.Items
}
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
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 *EvalDatasetView) UnmarshalJSON(data []byte) (err error) {
varEvalDatasetView := _EvalDatasetView{}
err = json.Unmarshal(data, &varEvalDatasetView)
if err != nil {
return err
}
*o = EvalDatasetView(varEvalDatasetView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "description")
delete(additionalProperties, "items")
delete(additionalProperties, "metadata")
delete(additionalProperties, "name")
delete(additionalProperties, "updatedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableEvalDatasetView struct {
value *EvalDatasetView
isSet bool
}
func (v NullableEvalDatasetView) Get() *EvalDatasetView {
return v.value
}
func (v *NullableEvalDatasetView) Set(val *EvalDatasetView) {
v.value = val
v.isSet = true
}
func (v NullableEvalDatasetView) IsSet() bool {
return v.isSet
}
func (v *NullableEvalDatasetView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableEvalDatasetView(val *EvalDatasetView) *NullableEvalDatasetView {
return &NullableEvalDatasetView{value: val, isSet: true}
}
func (v NullableEvalDatasetView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableEvalDatasetView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}