mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.6 KiB
Go
269 lines
6.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 TrainUploadIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TrainUploadIn{}
|
|
|
|
// TrainUploadIn struct for TrainUploadIn
|
|
type TrainUploadIn struct {
|
|
// Kind is dataset: JSON Lines rows a job reads as `artifact:<sha256>`.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Name labels it.
|
|
Name *string `json:"name,omitempty"`
|
|
// SHA256 is the hex digest of the bytes.
|
|
Sha256 *string `json:"sha256,omitempty"`
|
|
// Size is the byte count.
|
|
Size *int64 `json:"size,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TrainUploadIn TrainUploadIn
|
|
|
|
// NewTrainUploadIn instantiates a new TrainUploadIn 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 NewTrainUploadIn() *TrainUploadIn {
|
|
this := TrainUploadIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewTrainUploadInWithDefaults instantiates a new TrainUploadIn 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 NewTrainUploadInWithDefaults() *TrainUploadIn {
|
|
this := TrainUploadIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *TrainUploadIn) 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 *TrainUploadIn) 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 *TrainUploadIn) 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 *TrainUploadIn) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *TrainUploadIn) 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 *TrainUploadIn) 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 *TrainUploadIn) 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 *TrainUploadIn) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSha256 returns the Sha256 field value if set, zero value otherwise.
|
|
func (o *TrainUploadIn) 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 *TrainUploadIn) 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 *TrainUploadIn) 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 *TrainUploadIn) SetSha256(v string) {
|
|
o.Sha256 = &v
|
|
}
|
|
|
|
// GetSize returns the Size field value if set, zero value otherwise.
|
|
func (o *TrainUploadIn) GetSize() int64 {
|
|
if o == nil || IsNil(o.Size) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Size
|
|
}
|
|
|
|
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainUploadIn) GetSizeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Size) {
|
|
return nil, false
|
|
}
|
|
return o.Size, true
|
|
}
|
|
|
|
// HasSize returns a boolean if a field has been set.
|
|
func (o *TrainUploadIn) HasSize() bool {
|
|
if o != nil && !IsNil(o.Size) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
|
func (o *TrainUploadIn) SetSize(v int64) {
|
|
o.Size = &v
|
|
}
|
|
|
|
func (o TrainUploadIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TrainUploadIn) 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
|
|
}
|
|
if !IsNil(o.Sha256) {
|
|
toSerialize["sha256"] = o.Sha256
|
|
}
|
|
if !IsNil(o.Size) {
|
|
toSerialize["size"] = o.Size
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TrainUploadIn) UnmarshalJSON(data []byte) (err error) {
|
|
varTrainUploadIn := _TrainUploadIn{}
|
|
|
|
err = json.Unmarshal(data, &varTrainUploadIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TrainUploadIn(varTrainUploadIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "sha256")
|
|
delete(additionalProperties, "size")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTrainUploadIn struct {
|
|
value *TrainUploadIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTrainUploadIn) Get() *TrainUploadIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTrainUploadIn) Set(val *TrainUploadIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTrainUploadIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTrainUploadIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTrainUploadIn(val *TrainUploadIn) *NullableTrainUploadIn {
|
|
return &NullableTrainUploadIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTrainUploadIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTrainUploadIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|