mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
265 lines
7.0 KiB
Go
265 lines
7.0 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 TrainCorrectionGroup type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TrainCorrectionGroup{}
|
|
|
|
// TrainCorrectionGroup struct for TrainCorrectionGroup
|
|
type TrainCorrectionGroup struct {
|
|
Corrections *int64 `json:"corrections,omitempty"`
|
|
Key *string `json:"key,omitempty"`
|
|
Labels []string `json:"labels,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TrainCorrectionGroup TrainCorrectionGroup
|
|
|
|
// NewTrainCorrectionGroup instantiates a new TrainCorrectionGroup 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 NewTrainCorrectionGroup() *TrainCorrectionGroup {
|
|
this := TrainCorrectionGroup{}
|
|
return &this
|
|
}
|
|
|
|
// NewTrainCorrectionGroupWithDefaults instantiates a new TrainCorrectionGroup 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 NewTrainCorrectionGroupWithDefaults() *TrainCorrectionGroup {
|
|
this := TrainCorrectionGroup{}
|
|
return &this
|
|
}
|
|
|
|
// GetCorrections returns the Corrections field value if set, zero value otherwise.
|
|
func (o *TrainCorrectionGroup) GetCorrections() int64 {
|
|
if o == nil || IsNil(o.Corrections) {
|
|
var ret int64
|
|
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 *TrainCorrectionGroup) GetCorrectionsOk() (*int64, 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 *TrainCorrectionGroup) HasCorrections() bool {
|
|
if o != nil && !IsNil(o.Corrections) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCorrections gets a reference to the given int64 and assigns it to the Corrections field.
|
|
func (o *TrainCorrectionGroup) SetCorrections(v int64) {
|
|
o.Corrections = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *TrainCorrectionGroup) GetKey() string {
|
|
if o == nil || IsNil(o.Key) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Key
|
|
}
|
|
|
|
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainCorrectionGroup) GetKeyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Key) {
|
|
return nil, false
|
|
}
|
|
return o.Key, true
|
|
}
|
|
|
|
// HasKey returns a boolean if a field has been set.
|
|
func (o *TrainCorrectionGroup) HasKey() bool {
|
|
if o != nil && !IsNil(o.Key) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKey gets a reference to the given string and assigns it to the Key field.
|
|
func (o *TrainCorrectionGroup) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *TrainCorrectionGroup) GetLabels() []string {
|
|
if o == nil || IsNil(o.Labels) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Labels
|
|
}
|
|
|
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainCorrectionGroup) GetLabelsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Labels) {
|
|
return nil, false
|
|
}
|
|
return o.Labels, true
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *TrainCorrectionGroup) HasLabels() bool {
|
|
if o != nil && !IsNil(o.Labels) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabels gets a reference to the given []string and assigns it to the Labels field.
|
|
func (o *TrainCorrectionGroup) SetLabels(v []string) {
|
|
o.Labels = v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *TrainCorrectionGroup) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainCorrectionGroup) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *TrainCorrectionGroup) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *TrainCorrectionGroup) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o TrainCorrectionGroup) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TrainCorrectionGroup) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Corrections) {
|
|
toSerialize["corrections"] = o.Corrections
|
|
}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if !IsNil(o.Labels) {
|
|
toSerialize["labels"] = o.Labels
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TrainCorrectionGroup) UnmarshalJSON(data []byte) (err error) {
|
|
varTrainCorrectionGroup := _TrainCorrectionGroup{}
|
|
|
|
err = json.Unmarshal(data, &varTrainCorrectionGroup)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TrainCorrectionGroup(varTrainCorrectionGroup)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "corrections")
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "labels")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTrainCorrectionGroup struct {
|
|
value *TrainCorrectionGroup
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTrainCorrectionGroup) Get() *TrainCorrectionGroup {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTrainCorrectionGroup) Set(val *TrainCorrectionGroup) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTrainCorrectionGroup) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTrainCorrectionGroup) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTrainCorrectionGroup(val *TrainCorrectionGroup) *NullableTrainCorrectionGroup {
|
|
return &NullableTrainCorrectionGroup{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTrainCorrectionGroup) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTrainCorrectionGroup) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|