mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
563 lines
14 KiB
Go
563 lines
14 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 Correction type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Correction{}
|
|
|
|
// Correction struct for Correction
|
|
type Correction struct {
|
|
// Answer is the right answer; Base what Kai answered.
|
|
Answer *string `json:"answer,omitempty"`
|
|
At *int64 `json:"at,omitempty"`
|
|
Base *string `json:"base,omitempty"`
|
|
By *string `json:"by,omitempty"`
|
|
Cohort *string `json:"cohort,omitempty"`
|
|
Decision *string `json:"decision,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
Labels []string `json:"labels,omitempty"`
|
|
Note *string `json:"note,omitempty"`
|
|
Question *string `json:"question,omitempty"`
|
|
// State is captured when the decision's state is held and the correction can teach, missing when the decision was made with capture off.
|
|
State *string `json:"state,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Correction Correction
|
|
|
|
// NewCorrection instantiates a new Correction 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 NewCorrection() *Correction {
|
|
this := Correction{}
|
|
return &this
|
|
}
|
|
|
|
// NewCorrectionWithDefaults instantiates a new Correction 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 NewCorrectionWithDefaults() *Correction {
|
|
this := Correction{}
|
|
return &this
|
|
}
|
|
|
|
// GetAnswer returns the Answer field value if set, zero value otherwise.
|
|
func (o *Correction) GetAnswer() string {
|
|
if o == nil || IsNil(o.Answer) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Answer
|
|
}
|
|
|
|
// GetAnswerOk returns a tuple with the Answer field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetAnswerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Answer) {
|
|
return nil, false
|
|
}
|
|
return o.Answer, true
|
|
}
|
|
|
|
// HasAnswer returns a boolean if a field has been set.
|
|
func (o *Correction) HasAnswer() bool {
|
|
if o != nil && !IsNil(o.Answer) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAnswer gets a reference to the given string and assigns it to the Answer field.
|
|
func (o *Correction) SetAnswer(v string) {
|
|
o.Answer = &v
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *Correction) 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 *Correction) 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 *Correction) 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 *Correction) SetAt(v int64) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetBase returns the Base field value if set, zero value otherwise.
|
|
func (o *Correction) GetBase() string {
|
|
if o == nil || IsNil(o.Base) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Base
|
|
}
|
|
|
|
// GetBaseOk returns a tuple with the Base field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetBaseOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Base) {
|
|
return nil, false
|
|
}
|
|
return o.Base, true
|
|
}
|
|
|
|
// HasBase returns a boolean if a field has been set.
|
|
func (o *Correction) HasBase() bool {
|
|
if o != nil && !IsNil(o.Base) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBase gets a reference to the given string and assigns it to the Base field.
|
|
func (o *Correction) SetBase(v string) {
|
|
o.Base = &v
|
|
}
|
|
|
|
// GetBy returns the By field value if set, zero value otherwise.
|
|
func (o *Correction) 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 *Correction) 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 *Correction) 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 *Correction) SetBy(v string) {
|
|
o.By = &v
|
|
}
|
|
|
|
// GetCohort returns the Cohort field value if set, zero value otherwise.
|
|
func (o *Correction) GetCohort() string {
|
|
if o == nil || IsNil(o.Cohort) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Cohort
|
|
}
|
|
|
|
// GetCohortOk returns a tuple with the Cohort field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetCohortOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Cohort) {
|
|
return nil, false
|
|
}
|
|
return o.Cohort, true
|
|
}
|
|
|
|
// HasCohort returns a boolean if a field has been set.
|
|
func (o *Correction) HasCohort() bool {
|
|
if o != nil && !IsNil(o.Cohort) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCohort gets a reference to the given string and assigns it to the Cohort field.
|
|
func (o *Correction) SetCohort(v string) {
|
|
o.Cohort = &v
|
|
}
|
|
|
|
// GetDecision returns the Decision field value if set, zero value otherwise.
|
|
func (o *Correction) GetDecision() string {
|
|
if o == nil || IsNil(o.Decision) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Decision
|
|
}
|
|
|
|
// GetDecisionOk returns a tuple with the Decision field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetDecisionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Decision) {
|
|
return nil, false
|
|
}
|
|
return o.Decision, true
|
|
}
|
|
|
|
// HasDecision returns a boolean if a field has been set.
|
|
func (o *Correction) HasDecision() bool {
|
|
if o != nil && !IsNil(o.Decision) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDecision gets a reference to the given string and assigns it to the Decision field.
|
|
func (o *Correction) SetDecision(v string) {
|
|
o.Decision = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *Correction) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *Correction) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *Correction) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *Correction) 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 *Correction) 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 *Correction) 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 *Correction) SetLabels(v []string) {
|
|
o.Labels = v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *Correction) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *Correction) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *Correction) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetQuestion returns the Question field value if set, zero value otherwise.
|
|
func (o *Correction) GetQuestion() string {
|
|
if o == nil || IsNil(o.Question) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Question
|
|
}
|
|
|
|
// GetQuestionOk returns a tuple with the Question field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetQuestionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Question) {
|
|
return nil, false
|
|
}
|
|
return o.Question, true
|
|
}
|
|
|
|
// HasQuestion returns a boolean if a field has been set.
|
|
func (o *Correction) HasQuestion() bool {
|
|
if o != nil && !IsNil(o.Question) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetQuestion gets a reference to the given string and assigns it to the Question field.
|
|
func (o *Correction) SetQuestion(v string) {
|
|
o.Question = &v
|
|
}
|
|
|
|
// GetState returns the State field value if set, zero value otherwise.
|
|
func (o *Correction) GetState() string {
|
|
if o == nil || IsNil(o.State) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.State
|
|
}
|
|
|
|
// GetStateOk returns a tuple with the State field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Correction) GetStateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.State) {
|
|
return nil, false
|
|
}
|
|
return o.State, true
|
|
}
|
|
|
|
// HasState returns a boolean if a field has been set.
|
|
func (o *Correction) HasState() bool {
|
|
if o != nil && !IsNil(o.State) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetState gets a reference to the given string and assigns it to the State field.
|
|
func (o *Correction) SetState(v string) {
|
|
o.State = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *Correction) 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 *Correction) 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 *Correction) 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 *Correction) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o Correction) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Correction) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Answer) {
|
|
toSerialize["answer"] = o.Answer
|
|
}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Base) {
|
|
toSerialize["base"] = o.Base
|
|
}
|
|
if !IsNil(o.By) {
|
|
toSerialize["by"] = o.By
|
|
}
|
|
if !IsNil(o.Cohort) {
|
|
toSerialize["cohort"] = o.Cohort
|
|
}
|
|
if !IsNil(o.Decision) {
|
|
toSerialize["decision"] = o.Decision
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Labels) {
|
|
toSerialize["labels"] = o.Labels
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Question) {
|
|
toSerialize["question"] = o.Question
|
|
}
|
|
if !IsNil(o.State) {
|
|
toSerialize["state"] = o.State
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Correction) UnmarshalJSON(data []byte) (err error) {
|
|
varCorrection := _Correction{}
|
|
|
|
err = json.Unmarshal(data, &varCorrection)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Correction(varCorrection)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "answer")
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "base")
|
|
delete(additionalProperties, "by")
|
|
delete(additionalProperties, "cohort")
|
|
delete(additionalProperties, "decision")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "labels")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "question")
|
|
delete(additionalProperties, "state")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCorrection struct {
|
|
value *Correction
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCorrection) Get() *Correction {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCorrection) Set(val *Correction) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCorrection) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCorrection) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCorrection(val *Correction) *NullableCorrection {
|
|
return &NullableCorrection{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCorrection) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCorrection) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|