Files
sdk/model_ai_routing_probe.go

339 lines
8.3 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 AiRoutingProbe type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AiRoutingProbe{}
// AiRoutingProbe struct for AiRoutingProbe
type AiRoutingProbe struct {
Arm *string `json:"arm,omitempty"`
Failover *string `json:"failover,omitempty"`
Ms *int32 `json:"ms,omitempty"`
Reply *string `json:"reply,omitempty"`
Sku *string `json:"sku,omitempty"`
Status *int32 `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AiRoutingProbe AiRoutingProbe
// NewAiRoutingProbe instantiates a new AiRoutingProbe 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 NewAiRoutingProbe() *AiRoutingProbe {
this := AiRoutingProbe{}
return &this
}
// NewAiRoutingProbeWithDefaults instantiates a new AiRoutingProbe 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 NewAiRoutingProbeWithDefaults() *AiRoutingProbe {
this := AiRoutingProbe{}
return &this
}
// GetArm returns the Arm field value if set, zero value otherwise.
func (o *AiRoutingProbe) GetArm() string {
if o == nil || IsNil(o.Arm) {
var ret string
return ret
}
return *o.Arm
}
// GetArmOk returns a tuple with the Arm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiRoutingProbe) GetArmOk() (*string, bool) {
if o == nil || IsNil(o.Arm) {
return nil, false
}
return o.Arm, true
}
// HasArm returns a boolean if a field has been set.
func (o *AiRoutingProbe) HasArm() bool {
if o != nil && !IsNil(o.Arm) {
return true
}
return false
}
// SetArm gets a reference to the given string and assigns it to the Arm field.
func (o *AiRoutingProbe) SetArm(v string) {
o.Arm = &v
}
// GetFailover returns the Failover field value if set, zero value otherwise.
func (o *AiRoutingProbe) GetFailover() string {
if o == nil || IsNil(o.Failover) {
var ret string
return ret
}
return *o.Failover
}
// GetFailoverOk returns a tuple with the Failover field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiRoutingProbe) GetFailoverOk() (*string, bool) {
if o == nil || IsNil(o.Failover) {
return nil, false
}
return o.Failover, true
}
// HasFailover returns a boolean if a field has been set.
func (o *AiRoutingProbe) HasFailover() bool {
if o != nil && !IsNil(o.Failover) {
return true
}
return false
}
// SetFailover gets a reference to the given string and assigns it to the Failover field.
func (o *AiRoutingProbe) SetFailover(v string) {
o.Failover = &v
}
// GetMs returns the Ms field value if set, zero value otherwise.
func (o *AiRoutingProbe) GetMs() int32 {
if o == nil || IsNil(o.Ms) {
var ret int32
return ret
}
return *o.Ms
}
// GetMsOk returns a tuple with the Ms field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiRoutingProbe) GetMsOk() (*int32, bool) {
if o == nil || IsNil(o.Ms) {
return nil, false
}
return o.Ms, true
}
// HasMs returns a boolean if a field has been set.
func (o *AiRoutingProbe) HasMs() bool {
if o != nil && !IsNil(o.Ms) {
return true
}
return false
}
// SetMs gets a reference to the given int32 and assigns it to the Ms field.
func (o *AiRoutingProbe) SetMs(v int32) {
o.Ms = &v
}
// GetReply returns the Reply field value if set, zero value otherwise.
func (o *AiRoutingProbe) GetReply() string {
if o == nil || IsNil(o.Reply) {
var ret string
return ret
}
return *o.Reply
}
// GetReplyOk returns a tuple with the Reply field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiRoutingProbe) GetReplyOk() (*string, bool) {
if o == nil || IsNil(o.Reply) {
return nil, false
}
return o.Reply, true
}
// HasReply returns a boolean if a field has been set.
func (o *AiRoutingProbe) HasReply() bool {
if o != nil && !IsNil(o.Reply) {
return true
}
return false
}
// SetReply gets a reference to the given string and assigns it to the Reply field.
func (o *AiRoutingProbe) SetReply(v string) {
o.Reply = &v
}
// GetSku returns the Sku field value if set, zero value otherwise.
func (o *AiRoutingProbe) GetSku() string {
if o == nil || IsNil(o.Sku) {
var ret string
return ret
}
return *o.Sku
}
// GetSkuOk returns a tuple with the Sku field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiRoutingProbe) GetSkuOk() (*string, bool) {
if o == nil || IsNil(o.Sku) {
return nil, false
}
return o.Sku, true
}
// HasSku returns a boolean if a field has been set.
func (o *AiRoutingProbe) HasSku() bool {
if o != nil && !IsNil(o.Sku) {
return true
}
return false
}
// SetSku gets a reference to the given string and assigns it to the Sku field.
func (o *AiRoutingProbe) SetSku(v string) {
o.Sku = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *AiRoutingProbe) GetStatus() int32 {
if o == nil || IsNil(o.Status) {
var ret int32
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiRoutingProbe) GetStatusOk() (*int32, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *AiRoutingProbe) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given int32 and assigns it to the Status field.
func (o *AiRoutingProbe) SetStatus(v int32) {
o.Status = &v
}
func (o AiRoutingProbe) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AiRoutingProbe) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Arm) {
toSerialize["arm"] = o.Arm
}
if !IsNil(o.Failover) {
toSerialize["failover"] = o.Failover
}
if !IsNil(o.Ms) {
toSerialize["ms"] = o.Ms
}
if !IsNil(o.Reply) {
toSerialize["reply"] = o.Reply
}
if !IsNil(o.Sku) {
toSerialize["sku"] = o.Sku
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AiRoutingProbe) UnmarshalJSON(data []byte) (err error) {
varAiRoutingProbe := _AiRoutingProbe{}
err = json.Unmarshal(data, &varAiRoutingProbe)
if err != nil {
return err
}
*o = AiRoutingProbe(varAiRoutingProbe)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "arm")
delete(additionalProperties, "failover")
delete(additionalProperties, "ms")
delete(additionalProperties, "reply")
delete(additionalProperties, "sku")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAiRoutingProbe struct {
value *AiRoutingProbe
isSet bool
}
func (v NullableAiRoutingProbe) Get() *AiRoutingProbe {
return v.value
}
func (v *NullableAiRoutingProbe) Set(val *AiRoutingProbe) {
v.value = val
v.isSet = true
}
func (v NullableAiRoutingProbe) IsSet() bool {
return v.isSet
}
func (v *NullableAiRoutingProbe) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAiRoutingProbe(val *AiRoutingProbe) *NullableAiRoutingProbe {
return &NullableAiRoutingProbe{value: val, isSet: true}
}
func (v NullableAiRoutingProbe) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAiRoutingProbe) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}