mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
5.2 KiB
Go
191 lines
5.2 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 TrainCorrectionsOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TrainCorrectionsOut{}
|
|
|
|
// TrainCorrectionsOut struct for TrainCorrectionsOut
|
|
type TrainCorrectionsOut struct {
|
|
Data []TrainCorrection `json:"data,omitempty"`
|
|
Questions []TrainCorrectionGroup `json:"questions,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TrainCorrectionsOut TrainCorrectionsOut
|
|
|
|
// NewTrainCorrectionsOut instantiates a new TrainCorrectionsOut 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 NewTrainCorrectionsOut() *TrainCorrectionsOut {
|
|
this := TrainCorrectionsOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewTrainCorrectionsOutWithDefaults instantiates a new TrainCorrectionsOut 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 NewTrainCorrectionsOutWithDefaults() *TrainCorrectionsOut {
|
|
this := TrainCorrectionsOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetData returns the Data field value if set, zero value otherwise.
|
|
func (o *TrainCorrectionsOut) GetData() []TrainCorrection {
|
|
if o == nil || IsNil(o.Data) {
|
|
var ret []TrainCorrection
|
|
return ret
|
|
}
|
|
return o.Data
|
|
}
|
|
|
|
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainCorrectionsOut) GetDataOk() ([]TrainCorrection, bool) {
|
|
if o == nil || IsNil(o.Data) {
|
|
return nil, false
|
|
}
|
|
return o.Data, true
|
|
}
|
|
|
|
// HasData returns a boolean if a field has been set.
|
|
func (o *TrainCorrectionsOut) HasData() bool {
|
|
if o != nil && !IsNil(o.Data) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetData gets a reference to the given []TrainCorrection and assigns it to the Data field.
|
|
func (o *TrainCorrectionsOut) SetData(v []TrainCorrection) {
|
|
o.Data = v
|
|
}
|
|
|
|
// GetQuestions returns the Questions field value if set, zero value otherwise.
|
|
func (o *TrainCorrectionsOut) GetQuestions() []TrainCorrectionGroup {
|
|
if o == nil || IsNil(o.Questions) {
|
|
var ret []TrainCorrectionGroup
|
|
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 *TrainCorrectionsOut) GetQuestionsOk() ([]TrainCorrectionGroup, 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 *TrainCorrectionsOut) HasQuestions() bool {
|
|
if o != nil && !IsNil(o.Questions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetQuestions gets a reference to the given []TrainCorrectionGroup and assigns it to the Questions field.
|
|
func (o *TrainCorrectionsOut) SetQuestions(v []TrainCorrectionGroup) {
|
|
o.Questions = v
|
|
}
|
|
|
|
func (o TrainCorrectionsOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TrainCorrectionsOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Data) {
|
|
toSerialize["data"] = o.Data
|
|
}
|
|
if !IsNil(o.Questions) {
|
|
toSerialize["questions"] = o.Questions
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TrainCorrectionsOut) UnmarshalJSON(data []byte) (err error) {
|
|
varTrainCorrectionsOut := _TrainCorrectionsOut{}
|
|
|
|
err = json.Unmarshal(data, &varTrainCorrectionsOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TrainCorrectionsOut(varTrainCorrectionsOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "data")
|
|
delete(additionalProperties, "questions")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTrainCorrectionsOut struct {
|
|
value *TrainCorrectionsOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTrainCorrectionsOut) Get() *TrainCorrectionsOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTrainCorrectionsOut) Set(val *TrainCorrectionsOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTrainCorrectionsOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTrainCorrectionsOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTrainCorrectionsOut(val *TrainCorrectionsOut) *NullableTrainCorrectionsOut {
|
|
return &NullableTrainCorrectionsOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTrainCorrectionsOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTrainCorrectionsOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|