Files
sdk/model_ai_decision_sides.go

193 lines
5.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 AiDecisionSides type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AiDecisionSides{}
// AiDecisionSides struct for AiDecisionSides
type AiDecisionSides struct {
False interface{} `json:"false,omitempty"`
True interface{} `json:"true,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AiDecisionSides AiDecisionSides
// NewAiDecisionSides instantiates a new AiDecisionSides 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 NewAiDecisionSides() *AiDecisionSides {
this := AiDecisionSides{}
return &this
}
// NewAiDecisionSidesWithDefaults instantiates a new AiDecisionSides 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 NewAiDecisionSidesWithDefaults() *AiDecisionSides {
this := AiDecisionSides{}
return &this
}
// GetFalse returns the False field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AiDecisionSides) GetFalse() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.False
}
// GetFalseOk returns a tuple with the False 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 *AiDecisionSides) GetFalseOk() (*interface{}, bool) {
if o == nil || IsNil(o.False) {
return nil, false
}
return &o.False, true
}
// HasFalse returns a boolean if a field has been set.
func (o *AiDecisionSides) HasFalse() bool {
if o != nil && !IsNil(o.False) {
return true
}
return false
}
// SetFalse gets a reference to the given interface{} and assigns it to the False field.
func (o *AiDecisionSides) SetFalse(v interface{}) {
o.False = v
}
// GetTrue returns the True field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AiDecisionSides) GetTrue() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.True
}
// GetTrueOk returns a tuple with the True 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 *AiDecisionSides) GetTrueOk() (*interface{}, bool) {
if o == nil || IsNil(o.True) {
return nil, false
}
return &o.True, true
}
// HasTrue returns a boolean if a field has been set.
func (o *AiDecisionSides) HasTrue() bool {
if o != nil && !IsNil(o.True) {
return true
}
return false
}
// SetTrue gets a reference to the given interface{} and assigns it to the True field.
func (o *AiDecisionSides) SetTrue(v interface{}) {
o.True = v
}
func (o AiDecisionSides) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AiDecisionSides) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if o.False != nil {
toSerialize["false"] = o.False
}
if o.True != nil {
toSerialize["true"] = o.True
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AiDecisionSides) UnmarshalJSON(data []byte) (err error) {
varAiDecisionSides := _AiDecisionSides{}
err = json.Unmarshal(data, &varAiDecisionSides)
if err != nil {
return err
}
*o = AiDecisionSides(varAiDecisionSides)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "false")
delete(additionalProperties, "true")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAiDecisionSides struct {
value *AiDecisionSides
isSet bool
}
func (v NullableAiDecisionSides) Get() *AiDecisionSides {
return v.value
}
func (v *NullableAiDecisionSides) Set(val *AiDecisionSides) {
v.value = val
v.isSet = true
}
func (v NullableAiDecisionSides) IsSet() bool {
return v.isSet
}
func (v *NullableAiDecisionSides) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAiDecisionSides(val *AiDecisionSides) *NullableAiDecisionSides {
return &NullableAiDecisionSides{value: val, isSet: true}
}
func (v NullableAiDecisionSides) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAiDecisionSides) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}