Files
sdk/model_ai_decisions_routing.go

413 lines
11 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 AiDecisionsRouting type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AiDecisionsRouting{}
// AiDecisionsRouting struct for AiDecisionsRouting
type AiDecisionsRouting struct {
Backend *string `json:"backend,omitempty"`
Calibration *string `json:"calibration,omitempty"`
Checkpoint *string `json:"checkpoint,omitempty"`
Device *string `json:"device,omitempty"`
Reason *string `json:"reason,omitempty"`
Revision *string `json:"revision,omitempty"`
Sha256 *string `json:"sha256,omitempty"`
Upstream *string `json:"upstream,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AiDecisionsRouting AiDecisionsRouting
// NewAiDecisionsRouting instantiates a new AiDecisionsRouting 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 NewAiDecisionsRouting() *AiDecisionsRouting {
this := AiDecisionsRouting{}
return &this
}
// NewAiDecisionsRoutingWithDefaults instantiates a new AiDecisionsRouting 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 NewAiDecisionsRoutingWithDefaults() *AiDecisionsRouting {
this := AiDecisionsRouting{}
return &this
}
// GetBackend returns the Backend field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetBackend() string {
if o == nil || IsNil(o.Backend) {
var ret string
return ret
}
return *o.Backend
}
// GetBackendOk returns a tuple with the Backend field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetBackendOk() (*string, bool) {
if o == nil || IsNil(o.Backend) {
return nil, false
}
return o.Backend, true
}
// HasBackend returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasBackend() bool {
if o != nil && !IsNil(o.Backend) {
return true
}
return false
}
// SetBackend gets a reference to the given string and assigns it to the Backend field.
func (o *AiDecisionsRouting) SetBackend(v string) {
o.Backend = &v
}
// GetCalibration returns the Calibration field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetCalibration() string {
if o == nil || IsNil(o.Calibration) {
var ret string
return ret
}
return *o.Calibration
}
// GetCalibrationOk returns a tuple with the Calibration field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetCalibrationOk() (*string, bool) {
if o == nil || IsNil(o.Calibration) {
return nil, false
}
return o.Calibration, true
}
// HasCalibration returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasCalibration() bool {
if o != nil && !IsNil(o.Calibration) {
return true
}
return false
}
// SetCalibration gets a reference to the given string and assigns it to the Calibration field.
func (o *AiDecisionsRouting) SetCalibration(v string) {
o.Calibration = &v
}
// GetCheckpoint returns the Checkpoint field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetCheckpoint() string {
if o == nil || IsNil(o.Checkpoint) {
var ret string
return ret
}
return *o.Checkpoint
}
// GetCheckpointOk returns a tuple with the Checkpoint field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetCheckpointOk() (*string, bool) {
if o == nil || IsNil(o.Checkpoint) {
return nil, false
}
return o.Checkpoint, true
}
// HasCheckpoint returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasCheckpoint() bool {
if o != nil && !IsNil(o.Checkpoint) {
return true
}
return false
}
// SetCheckpoint gets a reference to the given string and assigns it to the Checkpoint field.
func (o *AiDecisionsRouting) SetCheckpoint(v string) {
o.Checkpoint = &v
}
// GetDevice returns the Device field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetDevice() string {
if o == nil || IsNil(o.Device) {
var ret string
return ret
}
return *o.Device
}
// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetDeviceOk() (*string, bool) {
if o == nil || IsNil(o.Device) {
return nil, false
}
return o.Device, true
}
// HasDevice returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasDevice() bool {
if o != nil && !IsNil(o.Device) {
return true
}
return false
}
// SetDevice gets a reference to the given string and assigns it to the Device field.
func (o *AiDecisionsRouting) SetDevice(v string) {
o.Device = &v
}
// GetReason returns the Reason field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetReason() string {
if o == nil || IsNil(o.Reason) {
var ret string
return ret
}
return *o.Reason
}
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetReasonOk() (*string, bool) {
if o == nil || IsNil(o.Reason) {
return nil, false
}
return o.Reason, true
}
// HasReason returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasReason() bool {
if o != nil && !IsNil(o.Reason) {
return true
}
return false
}
// SetReason gets a reference to the given string and assigns it to the Reason field.
func (o *AiDecisionsRouting) SetReason(v string) {
o.Reason = &v
}
// GetRevision returns the Revision field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetRevision() string {
if o == nil || IsNil(o.Revision) {
var ret string
return ret
}
return *o.Revision
}
// GetRevisionOk returns a tuple with the Revision field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetRevisionOk() (*string, bool) {
if o == nil || IsNil(o.Revision) {
return nil, false
}
return o.Revision, true
}
// HasRevision returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasRevision() bool {
if o != nil && !IsNil(o.Revision) {
return true
}
return false
}
// SetRevision gets a reference to the given string and assigns it to the Revision field.
func (o *AiDecisionsRouting) SetRevision(v string) {
o.Revision = &v
}
// GetSha256 returns the Sha256 field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetSha256() string {
if o == nil || IsNil(o.Sha256) {
var ret string
return ret
}
return *o.Sha256
}
// GetSha256Ok returns a tuple with the Sha256 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetSha256Ok() (*string, bool) {
if o == nil || IsNil(o.Sha256) {
return nil, false
}
return o.Sha256, true
}
// HasSha256 returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasSha256() bool {
if o != nil && !IsNil(o.Sha256) {
return true
}
return false
}
// SetSha256 gets a reference to the given string and assigns it to the Sha256 field.
func (o *AiDecisionsRouting) SetSha256(v string) {
o.Sha256 = &v
}
// GetUpstream returns the Upstream field value if set, zero value otherwise.
func (o *AiDecisionsRouting) GetUpstream() string {
if o == nil || IsNil(o.Upstream) {
var ret string
return ret
}
return *o.Upstream
}
// GetUpstreamOk returns a tuple with the Upstream field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiDecisionsRouting) GetUpstreamOk() (*string, bool) {
if o == nil || IsNil(o.Upstream) {
return nil, false
}
return o.Upstream, true
}
// HasUpstream returns a boolean if a field has been set.
func (o *AiDecisionsRouting) HasUpstream() bool {
if o != nil && !IsNil(o.Upstream) {
return true
}
return false
}
// SetUpstream gets a reference to the given string and assigns it to the Upstream field.
func (o *AiDecisionsRouting) SetUpstream(v string) {
o.Upstream = &v
}
func (o AiDecisionsRouting) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AiDecisionsRouting) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Backend) {
toSerialize["backend"] = o.Backend
}
if !IsNil(o.Calibration) {
toSerialize["calibration"] = o.Calibration
}
if !IsNil(o.Checkpoint) {
toSerialize["checkpoint"] = o.Checkpoint
}
if !IsNil(o.Device) {
toSerialize["device"] = o.Device
}
if !IsNil(o.Reason) {
toSerialize["reason"] = o.Reason
}
if !IsNil(o.Revision) {
toSerialize["revision"] = o.Revision
}
if !IsNil(o.Sha256) {
toSerialize["sha256"] = o.Sha256
}
if !IsNil(o.Upstream) {
toSerialize["upstream"] = o.Upstream
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AiDecisionsRouting) UnmarshalJSON(data []byte) (err error) {
varAiDecisionsRouting := _AiDecisionsRouting{}
err = json.Unmarshal(data, &varAiDecisionsRouting)
if err != nil {
return err
}
*o = AiDecisionsRouting(varAiDecisionsRouting)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "backend")
delete(additionalProperties, "calibration")
delete(additionalProperties, "checkpoint")
delete(additionalProperties, "device")
delete(additionalProperties, "reason")
delete(additionalProperties, "revision")
delete(additionalProperties, "sha256")
delete(additionalProperties, "upstream")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAiDecisionsRouting struct {
value *AiDecisionsRouting
isSet bool
}
func (v NullableAiDecisionsRouting) Get() *AiDecisionsRouting {
return v.value
}
func (v *NullableAiDecisionsRouting) Set(val *AiDecisionsRouting) {
v.value = val
v.isSet = true
}
func (v NullableAiDecisionsRouting) IsSet() bool {
return v.isSet
}
func (v *NullableAiDecisionsRouting) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAiDecisionsRouting(val *AiDecisionsRouting) *NullableAiDecisionsRouting {
return &NullableAiDecisionsRouting{value: val, isSet: true}
}
func (v NullableAiDecisionsRouting) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAiDecisionsRouting) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}