mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.2 KiB
Go
193 lines
5.2 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 EngineEngineStatus type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EngineEngineStatus{}
|
|
|
|
// EngineEngineStatus struct for EngineEngineStatus
|
|
type EngineEngineStatus struct {
|
|
// Reachable is true when the engine answered its health probe.
|
|
Reachable *bool `json:"reachable,omitempty"`
|
|
// Revision is the engine build's git revision, present only when reachable (the server's own build identity — it publishes no semver).
|
|
Revision *string `json:"revision,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EngineEngineStatus EngineEngineStatus
|
|
|
|
// NewEngineEngineStatus instantiates a new EngineEngineStatus 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 NewEngineEngineStatus() *EngineEngineStatus {
|
|
this := EngineEngineStatus{}
|
|
return &this
|
|
}
|
|
|
|
// NewEngineEngineStatusWithDefaults instantiates a new EngineEngineStatus 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 NewEngineEngineStatusWithDefaults() *EngineEngineStatus {
|
|
this := EngineEngineStatus{}
|
|
return &this
|
|
}
|
|
|
|
// GetReachable returns the Reachable field value if set, zero value otherwise.
|
|
func (o *EngineEngineStatus) 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 *EngineEngineStatus) 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 *EngineEngineStatus) 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 *EngineEngineStatus) SetReachable(v bool) {
|
|
o.Reachable = &v
|
|
}
|
|
|
|
// GetRevision returns the Revision field value if set, zero value otherwise.
|
|
func (o *EngineEngineStatus) 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 *EngineEngineStatus) 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 *EngineEngineStatus) 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 *EngineEngineStatus) SetRevision(v string) {
|
|
o.Revision = &v
|
|
}
|
|
|
|
func (o EngineEngineStatus) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EngineEngineStatus) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Reachable) {
|
|
toSerialize["reachable"] = o.Reachable
|
|
}
|
|
if !IsNil(o.Revision) {
|
|
toSerialize["revision"] = o.Revision
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EngineEngineStatus) UnmarshalJSON(data []byte) (err error) {
|
|
varEngineEngineStatus := _EngineEngineStatus{}
|
|
|
|
err = json.Unmarshal(data, &varEngineEngineStatus)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EngineEngineStatus(varEngineEngineStatus)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "reachable")
|
|
delete(additionalProperties, "revision")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEngineEngineStatus struct {
|
|
value *EngineEngineStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEngineEngineStatus) Get() *EngineEngineStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEngineEngineStatus) Set(val *EngineEngineStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEngineEngineStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEngineEngineStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEngineEngineStatus(val *EngineEngineStatus) *NullableEngineEngineStatus {
|
|
return &NullableEngineEngineStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEngineEngineStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEngineEngineStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|