mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.8 KiB
Go
307 lines
8.8 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 DeployArgoStatus type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployArgoStatus{}
|
|
|
|
// DeployArgoStatus struct for DeployArgoStatus
|
|
type DeployArgoStatus struct {
|
|
// Health is the application's reconciled health.
|
|
Health *DeployArgoHealth `json:"health,omitempty"`
|
|
// ReconciledAt is when the desired state was last compared against the cluster, RFC 3339. Empty for an App CR — the projection derives its verdict at read time and nothing records a comparison — and CD's own status.reconciledAt for a CD row.
|
|
ReconciledAt *string `json:"reconciledAt,omitempty"`
|
|
// Resources are the objects the application owns. EMPTY on the list — filling it would walk the cluster once per row — and populated only by the read of ONE application, which is what makes that the detail view.
|
|
Resources []DeployArgoResourceStatus `json:"resources,omitempty"`
|
|
// Summary is the small aggregate the list column renders: the images.
|
|
Summary *DeployArgoSummary `json:"summary,omitempty"`
|
|
// Sync is the declared-versus-running verdict and what it was reached against.
|
|
Sync *DeployArgoSyncStatus `json:"sync,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeployArgoStatus DeployArgoStatus
|
|
|
|
// NewDeployArgoStatus instantiates a new DeployArgoStatus 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 NewDeployArgoStatus() *DeployArgoStatus {
|
|
this := DeployArgoStatus{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployArgoStatusWithDefaults instantiates a new DeployArgoStatus 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 NewDeployArgoStatusWithDefaults() *DeployArgoStatus {
|
|
this := DeployArgoStatus{}
|
|
return &this
|
|
}
|
|
|
|
// GetHealth returns the Health field value if set, zero value otherwise.
|
|
func (o *DeployArgoStatus) GetHealth() DeployArgoHealth {
|
|
if o == nil || IsNil(o.Health) {
|
|
var ret DeployArgoHealth
|
|
return ret
|
|
}
|
|
return *o.Health
|
|
}
|
|
|
|
// GetHealthOk returns a tuple with the Health field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoStatus) GetHealthOk() (*DeployArgoHealth, bool) {
|
|
if o == nil || IsNil(o.Health) {
|
|
return nil, false
|
|
}
|
|
return o.Health, true
|
|
}
|
|
|
|
// HasHealth returns a boolean if a field has been set.
|
|
func (o *DeployArgoStatus) HasHealth() bool {
|
|
if o != nil && !IsNil(o.Health) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHealth gets a reference to the given DeployArgoHealth and assigns it to the Health field.
|
|
func (o *DeployArgoStatus) SetHealth(v DeployArgoHealth) {
|
|
o.Health = &v
|
|
}
|
|
|
|
// GetReconciledAt returns the ReconciledAt field value if set, zero value otherwise.
|
|
func (o *DeployArgoStatus) GetReconciledAt() string {
|
|
if o == nil || IsNil(o.ReconciledAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ReconciledAt
|
|
}
|
|
|
|
// GetReconciledAtOk returns a tuple with the ReconciledAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoStatus) GetReconciledAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ReconciledAt) {
|
|
return nil, false
|
|
}
|
|
return o.ReconciledAt, true
|
|
}
|
|
|
|
// HasReconciledAt returns a boolean if a field has been set.
|
|
func (o *DeployArgoStatus) HasReconciledAt() bool {
|
|
if o != nil && !IsNil(o.ReconciledAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReconciledAt gets a reference to the given string and assigns it to the ReconciledAt field.
|
|
func (o *DeployArgoStatus) SetReconciledAt(v string) {
|
|
o.ReconciledAt = &v
|
|
}
|
|
|
|
// GetResources returns the Resources field value if set, zero value otherwise.
|
|
func (o *DeployArgoStatus) GetResources() []DeployArgoResourceStatus {
|
|
if o == nil || IsNil(o.Resources) {
|
|
var ret []DeployArgoResourceStatus
|
|
return ret
|
|
}
|
|
return o.Resources
|
|
}
|
|
|
|
// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoStatus) GetResourcesOk() ([]DeployArgoResourceStatus, bool) {
|
|
if o == nil || IsNil(o.Resources) {
|
|
return nil, false
|
|
}
|
|
return o.Resources, true
|
|
}
|
|
|
|
// HasResources returns a boolean if a field has been set.
|
|
func (o *DeployArgoStatus) HasResources() bool {
|
|
if o != nil && !IsNil(o.Resources) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResources gets a reference to the given []DeployArgoResourceStatus and assigns it to the Resources field.
|
|
func (o *DeployArgoStatus) SetResources(v []DeployArgoResourceStatus) {
|
|
o.Resources = v
|
|
}
|
|
|
|
// GetSummary returns the Summary field value if set, zero value otherwise.
|
|
func (o *DeployArgoStatus) GetSummary() DeployArgoSummary {
|
|
if o == nil || IsNil(o.Summary) {
|
|
var ret DeployArgoSummary
|
|
return ret
|
|
}
|
|
return *o.Summary
|
|
}
|
|
|
|
// GetSummaryOk returns a tuple with the Summary field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoStatus) GetSummaryOk() (*DeployArgoSummary, bool) {
|
|
if o == nil || IsNil(o.Summary) {
|
|
return nil, false
|
|
}
|
|
return o.Summary, true
|
|
}
|
|
|
|
// HasSummary returns a boolean if a field has been set.
|
|
func (o *DeployArgoStatus) HasSummary() bool {
|
|
if o != nil && !IsNil(o.Summary) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSummary gets a reference to the given DeployArgoSummary and assigns it to the Summary field.
|
|
func (o *DeployArgoStatus) SetSummary(v DeployArgoSummary) {
|
|
o.Summary = &v
|
|
}
|
|
|
|
// GetSync returns the Sync field value if set, zero value otherwise.
|
|
func (o *DeployArgoStatus) GetSync() DeployArgoSyncStatus {
|
|
if o == nil || IsNil(o.Sync) {
|
|
var ret DeployArgoSyncStatus
|
|
return ret
|
|
}
|
|
return *o.Sync
|
|
}
|
|
|
|
// GetSyncOk returns a tuple with the Sync field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoStatus) GetSyncOk() (*DeployArgoSyncStatus, bool) {
|
|
if o == nil || IsNil(o.Sync) {
|
|
return nil, false
|
|
}
|
|
return o.Sync, true
|
|
}
|
|
|
|
// HasSync returns a boolean if a field has been set.
|
|
func (o *DeployArgoStatus) HasSync() bool {
|
|
if o != nil && !IsNil(o.Sync) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSync gets a reference to the given DeployArgoSyncStatus and assigns it to the Sync field.
|
|
func (o *DeployArgoStatus) SetSync(v DeployArgoSyncStatus) {
|
|
o.Sync = &v
|
|
}
|
|
|
|
func (o DeployArgoStatus) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployArgoStatus) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Health) {
|
|
toSerialize["health"] = o.Health
|
|
}
|
|
if !IsNil(o.ReconciledAt) {
|
|
toSerialize["reconciledAt"] = o.ReconciledAt
|
|
}
|
|
if !IsNil(o.Resources) {
|
|
toSerialize["resources"] = o.Resources
|
|
}
|
|
if !IsNil(o.Summary) {
|
|
toSerialize["summary"] = o.Summary
|
|
}
|
|
if !IsNil(o.Sync) {
|
|
toSerialize["sync"] = o.Sync
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeployArgoStatus) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployArgoStatus := _DeployArgoStatus{}
|
|
|
|
err = json.Unmarshal(data, &varDeployArgoStatus)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployArgoStatus(varDeployArgoStatus)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "health")
|
|
delete(additionalProperties, "reconciledAt")
|
|
delete(additionalProperties, "resources")
|
|
delete(additionalProperties, "summary")
|
|
delete(additionalProperties, "sync")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeployArgoStatus struct {
|
|
value *DeployArgoStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployArgoStatus) Get() *DeployArgoStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployArgoStatus) Set(val *DeployArgoStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployArgoStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployArgoStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployArgoStatus(val *DeployArgoStatus) *NullableDeployArgoStatus {
|
|
return &NullableDeployArgoStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployArgoStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployArgoStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|