mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.6 KiB
Go
193 lines
4.6 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 TrainOutput type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TrainOutput{}
|
|
|
|
// TrainOutput struct for TrainOutput
|
|
type TrainOutput struct {
|
|
// Kind is checkpoint, lora, capability, basis or merged.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Name labels it.
|
|
Name *string `json:"name,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TrainOutput TrainOutput
|
|
|
|
// NewTrainOutput instantiates a new TrainOutput 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 NewTrainOutput() *TrainOutput {
|
|
this := TrainOutput{}
|
|
return &this
|
|
}
|
|
|
|
// NewTrainOutputWithDefaults instantiates a new TrainOutput 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 NewTrainOutputWithDefaults() *TrainOutput {
|
|
this := TrainOutput{}
|
|
return &this
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *TrainOutput) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainOutput) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *TrainOutput) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *TrainOutput) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *TrainOutput) 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 *TrainOutput) 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 *TrainOutput) 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 *TrainOutput) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o TrainOutput) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TrainOutput) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TrainOutput) UnmarshalJSON(data []byte) (err error) {
|
|
varTrainOutput := _TrainOutput{}
|
|
|
|
err = json.Unmarshal(data, &varTrainOutput)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TrainOutput(varTrainOutput)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTrainOutput struct {
|
|
value *TrainOutput
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTrainOutput) Get() *TrainOutput {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTrainOutput) Set(val *TrainOutput) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTrainOutput) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTrainOutput) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTrainOutput(val *TrainOutput) *NullableTrainOutput {
|
|
return &NullableTrainOutput{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTrainOutput) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTrainOutput) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|