Files
sdk/model_ai_decide_in.go

307 lines
8.1 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 AiDecideIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AiDecideIn{}
// AiDecideIn struct for AiDecideIn
type AiDecideIn struct {
// Handle decides over a state this org observed earlier, in place of State and Questions.
Handle *string `json:"handle,omitempty"`
// Model is kai, Kai's versioned id kai-<12 hex>, or Jev by its vendor id (typesafe/jev-1.13, ~typesafe/jev-latest).
Model *string `json:"model,omitempty"`
// Observe holds the state under this id (1 to 128 of A-Z a-z 0-9 . _ -), so a later decision can name it as its Handle.
Observe *string `json:"observe,omitempty"`
// Questions are 1 to 100 named questions, each {\"type\": \"choice\"|\"noul\"|\"score\", \"instructions\"?, \"criteria\"?}; a choice names at least 2 labels and a score at least 1 level. Not sent with a Handle.
Questions map[string]interface{} `json:"questions,omitempty"`
State interface{} `json:"state,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AiDecideIn AiDecideIn
// NewAiDecideIn instantiates a new AiDecideIn 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 NewAiDecideIn() *AiDecideIn {
this := AiDecideIn{}
return &this
}
// NewAiDecideInWithDefaults instantiates a new AiDecideIn 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 NewAiDecideInWithDefaults() *AiDecideIn {
this := AiDecideIn{}
return &this
}
// GetHandle returns the Handle field value if set, zero value otherwise.
func (o *AiDecideIn) GetHandle() string {
if o == nil || IsNil(o.Handle) {
var ret string
return ret
}
return *o.Handle
}
// GetHandleOk returns a tuple with the Handle field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecideIn) GetHandleOk() (*string, bool) {
if o == nil || IsNil(o.Handle) {
return nil, false
}
return o.Handle, true
}
// HasHandle returns a boolean if a field has been set.
func (o *AiDecideIn) HasHandle() bool {
if o != nil && !IsNil(o.Handle) {
return true
}
return false
}
// SetHandle gets a reference to the given string and assigns it to the Handle field.
func (o *AiDecideIn) SetHandle(v string) {
o.Handle = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *AiDecideIn) GetModel() string {
if o == nil || IsNil(o.Model) {
var ret string
return ret
}
return *o.Model
}
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecideIn) GetModelOk() (*string, bool) {
if o == nil || IsNil(o.Model) {
return nil, false
}
return o.Model, true
}
// HasModel returns a boolean if a field has been set.
func (o *AiDecideIn) HasModel() bool {
if o != nil && !IsNil(o.Model) {
return true
}
return false
}
// SetModel gets a reference to the given string and assigns it to the Model field.
func (o *AiDecideIn) SetModel(v string) {
o.Model = &v
}
// GetObserve returns the Observe field value if set, zero value otherwise.
func (o *AiDecideIn) GetObserve() string {
if o == nil || IsNil(o.Observe) {
var ret string
return ret
}
return *o.Observe
}
// GetObserveOk returns a tuple with the Observe field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecideIn) GetObserveOk() (*string, bool) {
if o == nil || IsNil(o.Observe) {
return nil, false
}
return o.Observe, true
}
// HasObserve returns a boolean if a field has been set.
func (o *AiDecideIn) HasObserve() bool {
if o != nil && !IsNil(o.Observe) {
return true
}
return false
}
// SetObserve gets a reference to the given string and assigns it to the Observe field.
func (o *AiDecideIn) SetObserve(v string) {
o.Observe = &v
}
// GetQuestions returns the Questions field value if set, zero value otherwise.
func (o *AiDecideIn) GetQuestions() map[string]interface{} {
if o == nil || IsNil(o.Questions) {
var ret map[string]interface{}
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 *AiDecideIn) GetQuestionsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Questions) {
return map[string]interface{}{}, false
}
return o.Questions, true
}
// HasQuestions returns a boolean if a field has been set.
func (o *AiDecideIn) HasQuestions() bool {
if o != nil && !IsNil(o.Questions) {
return true
}
return false
}
// SetQuestions gets a reference to the given map[string]interface{} and assigns it to the Questions field.
func (o *AiDecideIn) SetQuestions(v map[string]interface{}) {
o.Questions = v
}
// GetState returns the State field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AiDecideIn) GetState() interface{} {
if o == nil {
var ret interface{}
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AiDecideIn) GetStateOk() (*interface{}, 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 *AiDecideIn) HasState() bool {
if o != nil && !IsNil(o.State) {
return true
}
return false
}
// SetState gets a reference to the given interface{} and assigns it to the State field.
func (o *AiDecideIn) SetState(v interface{}) {
o.State = v
}
func (o AiDecideIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AiDecideIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Handle) {
toSerialize["handle"] = o.Handle
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.Observe) {
toSerialize["observe"] = o.Observe
}
if !IsNil(o.Questions) {
toSerialize["questions"] = o.Questions
}
if o.State != nil {
toSerialize["state"] = o.State
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AiDecideIn) UnmarshalJSON(data []byte) (err error) {
varAiDecideIn := _AiDecideIn{}
err = json.Unmarshal(data, &varAiDecideIn)
if err != nil {
return err
}
*o = AiDecideIn(varAiDecideIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "handle")
delete(additionalProperties, "model")
delete(additionalProperties, "observe")
delete(additionalProperties, "questions")
delete(additionalProperties, "state")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAiDecideIn struct {
value *AiDecideIn
isSet bool
}
func (v NullableAiDecideIn) Get() *AiDecideIn {
return v.value
}
func (v *NullableAiDecideIn) Set(val *AiDecideIn) {
v.value = val
v.isSet = true
}
func (v NullableAiDecideIn) IsSet() bool {
return v.isSet
}
func (v *NullableAiDecideIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAiDecideIn(val *AiDecideIn) *NullableAiDecideIn {
return &NullableAiDecideIn{value: val, isSet: true}
}
func (v NullableAiDecideIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAiDecideIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}