Files
sdk/model_deploy_argo_sync_status.go

193 lines
5.6 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 DeployArgoSyncStatus type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoSyncStatus{}
// DeployArgoSyncStatus struct for DeployArgoSyncStatus
type DeployArgoSyncStatus struct {
// Revision is what Status was reached against. For an App CR that is the declared IMAGE TAG, not a commit — the CR is image-pinned. For a CD row it is the commit CD last applied.
Revision *string `json:"revision,omitempty"`
// Status is the ArgoCD sync vocabulary, Capitalized: Synced, OutOfSync or Unknown. For an App CR it compares the tag the CR DECLARES against the tag the cluster's Deployment is RUNNING — equal is Synced, both known and different is OutOfSync, either unknown is Unknown. For a CD row it is CD's own git-versus-cluster verdict.
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoSyncStatus DeployArgoSyncStatus
// NewDeployArgoSyncStatus instantiates a new DeployArgoSyncStatus 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 NewDeployArgoSyncStatus() *DeployArgoSyncStatus {
this := DeployArgoSyncStatus{}
return &this
}
// NewDeployArgoSyncStatusWithDefaults instantiates a new DeployArgoSyncStatus 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 NewDeployArgoSyncStatusWithDefaults() *DeployArgoSyncStatus {
this := DeployArgoSyncStatus{}
return &this
}
// GetRevision returns the Revision field value if set, zero value otherwise.
func (o *DeployArgoSyncStatus) 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 *DeployArgoSyncStatus) 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 *DeployArgoSyncStatus) 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 *DeployArgoSyncStatus) SetRevision(v string) {
o.Revision = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *DeployArgoSyncStatus) 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 *DeployArgoSyncStatus) 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 *DeployArgoSyncStatus) 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 *DeployArgoSyncStatus) SetStatus(v string) {
o.Status = &v
}
func (o DeployArgoSyncStatus) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoSyncStatus) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Revision) {
toSerialize["revision"] = o.Revision
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoSyncStatus) UnmarshalJSON(data []byte) (err error) {
varDeployArgoSyncStatus := _DeployArgoSyncStatus{}
err = json.Unmarshal(data, &varDeployArgoSyncStatus)
if err != nil {
return err
}
*o = DeployArgoSyncStatus(varDeployArgoSyncStatus)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "revision")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoSyncStatus struct {
value *DeployArgoSyncStatus
isSet bool
}
func (v NullableDeployArgoSyncStatus) Get() *DeployArgoSyncStatus {
return v.value
}
func (v *NullableDeployArgoSyncStatus) Set(val *DeployArgoSyncStatus) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoSyncStatus) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoSyncStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoSyncStatus(val *DeployArgoSyncStatus) *NullableDeployArgoSyncStatus {
return &NullableDeployArgoSyncStatus{value: val, isSet: true}
}
func (v NullableDeployArgoSyncStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoSyncStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}