mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.2 KiB
Go
269 lines
7.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 DeployDeployHealth type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployDeployHealth{}
|
|
|
|
// DeployDeployHealth struct for DeployDeployHealth
|
|
type DeployDeployHealth struct {
|
|
// CRD reports whether the App custom resource is served and listable. Absent when the apiserver was unreachable, because then it is unknown rather than false.
|
|
Crd *bool `json:"crd,omitempty"`
|
|
// K8s reports whether the Kubernetes API is reachable. Absent when the probe did not get far enough to find out.
|
|
K8s *bool `json:"k8s,omitempty"`
|
|
// Service names the subsystem answering, so a probe response is attributable when several are collected together.
|
|
Service *string `json:"service,omitempty"`
|
|
// Status is `ok` when this deployment can serve the delivery plane, and `degraded` otherwise. It agrees with the HTTP status by construction — see StatusCode.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeployDeployHealth DeployDeployHealth
|
|
|
|
// NewDeployDeployHealth instantiates a new DeployDeployHealth 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 NewDeployDeployHealth() *DeployDeployHealth {
|
|
this := DeployDeployHealth{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployDeployHealthWithDefaults instantiates a new DeployDeployHealth 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 NewDeployDeployHealthWithDefaults() *DeployDeployHealth {
|
|
this := DeployDeployHealth{}
|
|
return &this
|
|
}
|
|
|
|
// GetCrd returns the Crd field value if set, zero value otherwise.
|
|
func (o *DeployDeployHealth) GetCrd() bool {
|
|
if o == nil || IsNil(o.Crd) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Crd
|
|
}
|
|
|
|
// GetCrdOk returns a tuple with the Crd field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployDeployHealth) GetCrdOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Crd) {
|
|
return nil, false
|
|
}
|
|
return o.Crd, true
|
|
}
|
|
|
|
// HasCrd returns a boolean if a field has been set.
|
|
func (o *DeployDeployHealth) HasCrd() bool {
|
|
if o != nil && !IsNil(o.Crd) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCrd gets a reference to the given bool and assigns it to the Crd field.
|
|
func (o *DeployDeployHealth) SetCrd(v bool) {
|
|
o.Crd = &v
|
|
}
|
|
|
|
// GetK8s returns the K8s field value if set, zero value otherwise.
|
|
func (o *DeployDeployHealth) GetK8s() bool {
|
|
if o == nil || IsNil(o.K8s) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.K8s
|
|
}
|
|
|
|
// GetK8sOk returns a tuple with the K8s field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployDeployHealth) GetK8sOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.K8s) {
|
|
return nil, false
|
|
}
|
|
return o.K8s, true
|
|
}
|
|
|
|
// HasK8s returns a boolean if a field has been set.
|
|
func (o *DeployDeployHealth) HasK8s() bool {
|
|
if o != nil && !IsNil(o.K8s) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetK8s gets a reference to the given bool and assigns it to the K8s field.
|
|
func (o *DeployDeployHealth) SetK8s(v bool) {
|
|
o.K8s = &v
|
|
}
|
|
|
|
// GetService returns the Service field value if set, zero value otherwise.
|
|
func (o *DeployDeployHealth) GetService() string {
|
|
if o == nil || IsNil(o.Service) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Service
|
|
}
|
|
|
|
// GetServiceOk returns a tuple with the Service field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployDeployHealth) GetServiceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Service) {
|
|
return nil, false
|
|
}
|
|
return o.Service, true
|
|
}
|
|
|
|
// HasService returns a boolean if a field has been set.
|
|
func (o *DeployDeployHealth) HasService() bool {
|
|
if o != nil && !IsNil(o.Service) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetService gets a reference to the given string and assigns it to the Service field.
|
|
func (o *DeployDeployHealth) SetService(v string) {
|
|
o.Service = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *DeployDeployHealth) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
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 *DeployDeployHealth) GetStatusOk() (*string, 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 *DeployDeployHealth) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *DeployDeployHealth) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o DeployDeployHealth) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployDeployHealth) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Crd) {
|
|
toSerialize["crd"] = o.Crd
|
|
}
|
|
if !IsNil(o.K8s) {
|
|
toSerialize["k8s"] = o.K8s
|
|
}
|
|
if !IsNil(o.Service) {
|
|
toSerialize["service"] = o.Service
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeployDeployHealth) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployDeployHealth := _DeployDeployHealth{}
|
|
|
|
err = json.Unmarshal(data, &varDeployDeployHealth)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployDeployHealth(varDeployDeployHealth)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "crd")
|
|
delete(additionalProperties, "k8s")
|
|
delete(additionalProperties, "service")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeployDeployHealth struct {
|
|
value *DeployDeployHealth
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployDeployHealth) Get() *DeployDeployHealth {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployDeployHealth) Set(val *DeployDeployHealth) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployDeployHealth) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployDeployHealth) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployDeployHealth(val *DeployDeployHealth) *NullableDeployDeployHealth {
|
|
return &NullableDeployDeployHealth{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployDeployHealth) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployDeployHealth) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|