mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
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 FlowFlowStatus type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FlowFlowStatus{}
|
|
|
|
// FlowFlowStatus struct for FlowFlowStatus
|
|
type FlowFlowStatus struct {
|
|
// Reachable is true when the flow service answered its health probe.
|
|
Reachable *bool `json:"reachable,omitempty"`
|
|
// Version is the flow service's own version, present only when reachable.
|
|
Version *string `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FlowFlowStatus FlowFlowStatus
|
|
|
|
// NewFlowFlowStatus instantiates a new FlowFlowStatus 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 NewFlowFlowStatus() *FlowFlowStatus {
|
|
this := FlowFlowStatus{}
|
|
return &this
|
|
}
|
|
|
|
// NewFlowFlowStatusWithDefaults instantiates a new FlowFlowStatus 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 NewFlowFlowStatusWithDefaults() *FlowFlowStatus {
|
|
this := FlowFlowStatus{}
|
|
return &this
|
|
}
|
|
|
|
// GetReachable returns the Reachable field value if set, zero value otherwise.
|
|
func (o *FlowFlowStatus) GetReachable() bool {
|
|
if o == nil || IsNil(o.Reachable) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Reachable
|
|
}
|
|
|
|
// GetReachableOk returns a tuple with the Reachable field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowStatus) GetReachableOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Reachable) {
|
|
return nil, false
|
|
}
|
|
return o.Reachable, true
|
|
}
|
|
|
|
// HasReachable returns a boolean if a field has been set.
|
|
func (o *FlowFlowStatus) HasReachable() bool {
|
|
if o != nil && !IsNil(o.Reachable) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReachable gets a reference to the given bool and assigns it to the Reachable field.
|
|
func (o *FlowFlowStatus) SetReachable(v bool) {
|
|
o.Reachable = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *FlowFlowStatus) GetVersion() string {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FlowFlowStatus) GetVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *FlowFlowStatus) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
|
func (o *FlowFlowStatus) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o FlowFlowStatus) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FlowFlowStatus) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Reachable) {
|
|
toSerialize["reachable"] = o.Reachable
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FlowFlowStatus) UnmarshalJSON(data []byte) (err error) {
|
|
varFlowFlowStatus := _FlowFlowStatus{}
|
|
|
|
err = json.Unmarshal(data, &varFlowFlowStatus)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FlowFlowStatus(varFlowFlowStatus)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "reachable")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFlowFlowStatus struct {
|
|
value *FlowFlowStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFlowFlowStatus) Get() *FlowFlowStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFlowFlowStatus) Set(val *FlowFlowStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFlowFlowStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFlowFlowStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFlowFlowStatus(val *FlowFlowStatus) *NullableFlowFlowStatus {
|
|
return &NullableFlowFlowStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFlowFlowStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFlowFlowStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|