Files
sdk/model_train_version.go

607 lines
16 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 TrainVersion type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrainVersion{}
// TrainVersion struct for TrainVersion
type TrainVersion struct {
At *int64 `json:"at,omitempty"`
// BaseSHA256 is Kai's weights it was taught over.
BaseSha256 *string `json:"base_sha256,omitempty"`
By *string `json:"by,omitempty"`
// Bytes is its artifact's size.
Bytes *int64 `json:"bytes,omitempty"`
// Corrections are the corrections it was taught from.
Corrections []string `json:"corrections,omitempty"`
Evaluation interface{} `json:"evaluation,omitempty"`
// Form is calibration, head or pair; Rank its place, 1 the smallest.
Form *string `json:"form,omitempty"`
// Passed says its evaluation passed the gate: it is publishable.
Passed *bool `json:"passed,omitempty"`
// Questions are the question keys it answers.
Questions []string `json:"questions,omitempty"`
Rank *int64 `json:"rank,omitempty"`
// Representation is what it reads of Kai (the weights, tokenizer, layout and pooling, hashed): the only Kai it serves on, whatever the release.
Representation *string `json:"representation,omitempty"`
// SHA256 is its artifact's: the tar the decision service installs.
Sha256 *string `json:"sha256,omitempty"`
Version *int64 `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrainVersion TrainVersion
// NewTrainVersion instantiates a new TrainVersion 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 NewTrainVersion() *TrainVersion {
this := TrainVersion{}
return &this
}
// NewTrainVersionWithDefaults instantiates a new TrainVersion 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 NewTrainVersionWithDefaults() *TrainVersion {
this := TrainVersion{}
return &this
}
// GetAt returns the At field value if set, zero value otherwise.
func (o *TrainVersion) GetAt() int64 {
if o == nil || IsNil(o.At) {
var ret int64
return ret
}
return *o.At
}
// GetAtOk returns a tuple with the At field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetAtOk() (*int64, bool) {
if o == nil || IsNil(o.At) {
return nil, false
}
return o.At, true
}
// HasAt returns a boolean if a field has been set.
func (o *TrainVersion) HasAt() bool {
if o != nil && !IsNil(o.At) {
return true
}
return false
}
// SetAt gets a reference to the given int64 and assigns it to the At field.
func (o *TrainVersion) SetAt(v int64) {
o.At = &v
}
// GetBaseSha256 returns the BaseSha256 field value if set, zero value otherwise.
func (o *TrainVersion) GetBaseSha256() string {
if o == nil || IsNil(o.BaseSha256) {
var ret string
return ret
}
return *o.BaseSha256
}
// GetBaseSha256Ok returns a tuple with the BaseSha256 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetBaseSha256Ok() (*string, bool) {
if o == nil || IsNil(o.BaseSha256) {
return nil, false
}
return o.BaseSha256, true
}
// HasBaseSha256 returns a boolean if a field has been set.
func (o *TrainVersion) HasBaseSha256() bool {
if o != nil && !IsNil(o.BaseSha256) {
return true
}
return false
}
// SetBaseSha256 gets a reference to the given string and assigns it to the BaseSha256 field.
func (o *TrainVersion) SetBaseSha256(v string) {
o.BaseSha256 = &v
}
// GetBy returns the By field value if set, zero value otherwise.
func (o *TrainVersion) GetBy() string {
if o == nil || IsNil(o.By) {
var ret string
return ret
}
return *o.By
}
// GetByOk returns a tuple with the By field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetByOk() (*string, bool) {
if o == nil || IsNil(o.By) {
return nil, false
}
return o.By, true
}
// HasBy returns a boolean if a field has been set.
func (o *TrainVersion) HasBy() bool {
if o != nil && !IsNil(o.By) {
return true
}
return false
}
// SetBy gets a reference to the given string and assigns it to the By field.
func (o *TrainVersion) SetBy(v string) {
o.By = &v
}
// GetBytes returns the Bytes field value if set, zero value otherwise.
func (o *TrainVersion) GetBytes() int64 {
if o == nil || IsNil(o.Bytes) {
var ret int64
return ret
}
return *o.Bytes
}
// GetBytesOk returns a tuple with the Bytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetBytesOk() (*int64, bool) {
if o == nil || IsNil(o.Bytes) {
return nil, false
}
return o.Bytes, true
}
// HasBytes returns a boolean if a field has been set.
func (o *TrainVersion) HasBytes() bool {
if o != nil && !IsNil(o.Bytes) {
return true
}
return false
}
// SetBytes gets a reference to the given int64 and assigns it to the Bytes field.
func (o *TrainVersion) SetBytes(v int64) {
o.Bytes = &v
}
// GetCorrections returns the Corrections field value if set, zero value otherwise.
func (o *TrainVersion) GetCorrections() []string {
if o == nil || IsNil(o.Corrections) {
var ret []string
return ret
}
return o.Corrections
}
// GetCorrectionsOk returns a tuple with the Corrections field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetCorrectionsOk() ([]string, bool) {
if o == nil || IsNil(o.Corrections) {
return nil, false
}
return o.Corrections, true
}
// HasCorrections returns a boolean if a field has been set.
func (o *TrainVersion) HasCorrections() bool {
if o != nil && !IsNil(o.Corrections) {
return true
}
return false
}
// SetCorrections gets a reference to the given []string and assigns it to the Corrections field.
func (o *TrainVersion) SetCorrections(v []string) {
o.Corrections = v
}
// GetEvaluation returns the Evaluation field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *TrainVersion) GetEvaluation() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Evaluation
}
// GetEvaluationOk returns a tuple with the Evaluation 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 *TrainVersion) GetEvaluationOk() (*interface{}, bool) {
if o == nil || IsNil(o.Evaluation) {
return nil, false
}
return &o.Evaluation, true
}
// HasEvaluation returns a boolean if a field has been set.
func (o *TrainVersion) HasEvaluation() bool {
if o != nil && !IsNil(o.Evaluation) {
return true
}
return false
}
// SetEvaluation gets a reference to the given interface{} and assigns it to the Evaluation field.
func (o *TrainVersion) SetEvaluation(v interface{}) {
o.Evaluation = v
}
// GetForm returns the Form field value if set, zero value otherwise.
func (o *TrainVersion) GetForm() string {
if o == nil || IsNil(o.Form) {
var ret string
return ret
}
return *o.Form
}
// GetFormOk returns a tuple with the Form field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetFormOk() (*string, bool) {
if o == nil || IsNil(o.Form) {
return nil, false
}
return o.Form, true
}
// HasForm returns a boolean if a field has been set.
func (o *TrainVersion) HasForm() bool {
if o != nil && !IsNil(o.Form) {
return true
}
return false
}
// SetForm gets a reference to the given string and assigns it to the Form field.
func (o *TrainVersion) SetForm(v string) {
o.Form = &v
}
// GetPassed returns the Passed field value if set, zero value otherwise.
func (o *TrainVersion) GetPassed() bool {
if o == nil || IsNil(o.Passed) {
var ret bool
return ret
}
return *o.Passed
}
// GetPassedOk returns a tuple with the Passed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetPassedOk() (*bool, bool) {
if o == nil || IsNil(o.Passed) {
return nil, false
}
return o.Passed, true
}
// HasPassed returns a boolean if a field has been set.
func (o *TrainVersion) HasPassed() bool {
if o != nil && !IsNil(o.Passed) {
return true
}
return false
}
// SetPassed gets a reference to the given bool and assigns it to the Passed field.
func (o *TrainVersion) SetPassed(v bool) {
o.Passed = &v
}
// GetQuestions returns the Questions field value if set, zero value otherwise.
func (o *TrainVersion) GetQuestions() []string {
if o == nil || IsNil(o.Questions) {
var ret []string
return ret
}
return o.Questions
}
// GetQuestionsOk returns a tuple with the Questions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetQuestionsOk() ([]string, bool) {
if o == nil || IsNil(o.Questions) {
return nil, false
}
return o.Questions, true
}
// HasQuestions returns a boolean if a field has been set.
func (o *TrainVersion) HasQuestions() bool {
if o != nil && !IsNil(o.Questions) {
return true
}
return false
}
// SetQuestions gets a reference to the given []string and assigns it to the Questions field.
func (o *TrainVersion) SetQuestions(v []string) {
o.Questions = v
}
// GetRank returns the Rank field value if set, zero value otherwise.
func (o *TrainVersion) GetRank() int64 {
if o == nil || IsNil(o.Rank) {
var ret int64
return ret
}
return *o.Rank
}
// GetRankOk returns a tuple with the Rank field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetRankOk() (*int64, bool) {
if o == nil || IsNil(o.Rank) {
return nil, false
}
return o.Rank, true
}
// HasRank returns a boolean if a field has been set.
func (o *TrainVersion) HasRank() bool {
if o != nil && !IsNil(o.Rank) {
return true
}
return false
}
// SetRank gets a reference to the given int64 and assigns it to the Rank field.
func (o *TrainVersion) SetRank(v int64) {
o.Rank = &v
}
// GetRepresentation returns the Representation field value if set, zero value otherwise.
func (o *TrainVersion) GetRepresentation() string {
if o == nil || IsNil(o.Representation) {
var ret string
return ret
}
return *o.Representation
}
// GetRepresentationOk returns a tuple with the Representation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetRepresentationOk() (*string, bool) {
if o == nil || IsNil(o.Representation) {
return nil, false
}
return o.Representation, true
}
// HasRepresentation returns a boolean if a field has been set.
func (o *TrainVersion) HasRepresentation() bool {
if o != nil && !IsNil(o.Representation) {
return true
}
return false
}
// SetRepresentation gets a reference to the given string and assigns it to the Representation field.
func (o *TrainVersion) SetRepresentation(v string) {
o.Representation = &v
}
// GetSha256 returns the Sha256 field value if set, zero value otherwise.
func (o *TrainVersion) GetSha256() string {
if o == nil || IsNil(o.Sha256) {
var ret string
return ret
}
return *o.Sha256
}
// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetSha256Ok() (*string, bool) {
if o == nil || IsNil(o.Sha256) {
return nil, false
}
return o.Sha256, true
}
// HasSha256 returns a boolean if a field has been set.
func (o *TrainVersion) HasSha256() bool {
if o != nil && !IsNil(o.Sha256) {
return true
}
return false
}
// SetSha256 gets a reference to the given string and assigns it to the Sha256 field.
func (o *TrainVersion) SetSha256(v string) {
o.Sha256 = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *TrainVersion) GetVersion() int64 {
if o == nil || IsNil(o.Version) {
var ret int64
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrainVersion) GetVersionOk() (*int64, bool) {
if o == nil || IsNil(o.Version) {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *TrainVersion) HasVersion() bool {
if o != nil && !IsNil(o.Version) {
return true
}
return false
}
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
func (o *TrainVersion) SetVersion(v int64) {
o.Version = &v
}
func (o TrainVersion) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrainVersion) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.At) {
toSerialize["at"] = o.At
}
if !IsNil(o.BaseSha256) {
toSerialize["base_sha256"] = o.BaseSha256
}
if !IsNil(o.By) {
toSerialize["by"] = o.By
}
if !IsNil(o.Bytes) {
toSerialize["bytes"] = o.Bytes
}
if !IsNil(o.Corrections) {
toSerialize["corrections"] = o.Corrections
}
if o.Evaluation != nil {
toSerialize["evaluation"] = o.Evaluation
}
if !IsNil(o.Form) {
toSerialize["form"] = o.Form
}
if !IsNil(o.Passed) {
toSerialize["passed"] = o.Passed
}
if !IsNil(o.Questions) {
toSerialize["questions"] = o.Questions
}
if !IsNil(o.Rank) {
toSerialize["rank"] = o.Rank
}
if !IsNil(o.Representation) {
toSerialize["representation"] = o.Representation
}
if !IsNil(o.Sha256) {
toSerialize["sha256"] = o.Sha256
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrainVersion) UnmarshalJSON(data []byte) (err error) {
varTrainVersion := _TrainVersion{}
err = json.Unmarshal(data, &varTrainVersion)
if err != nil {
return err
}
*o = TrainVersion(varTrainVersion)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "at")
delete(additionalProperties, "base_sha256")
delete(additionalProperties, "by")
delete(additionalProperties, "bytes")
delete(additionalProperties, "corrections")
delete(additionalProperties, "evaluation")
delete(additionalProperties, "form")
delete(additionalProperties, "passed")
delete(additionalProperties, "questions")
delete(additionalProperties, "rank")
delete(additionalProperties, "representation")
delete(additionalProperties, "sha256")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrainVersion struct {
value *TrainVersion
isSet bool
}
func (v NullableTrainVersion) Get() *TrainVersion {
return v.value
}
func (v *NullableTrainVersion) Set(val *TrainVersion) {
v.value = val
v.isSet = true
}
func (v NullableTrainVersion) IsSet() bool {
return v.isSet
}
func (v *NullableTrainVersion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrainVersion(val *TrainVersion) *NullableTrainVersion {
return &NullableTrainVersion{value: val, isSet: true}
}
func (v NullableTrainVersion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrainVersion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}