Files
sdk/model_deploy_argo_resource_status.go

383 lines
11 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 DeployArgoResourceStatus type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoResourceStatus{}
// DeployArgoResourceStatus struct for DeployArgoResourceStatus
type DeployArgoResourceStatus struct {
// Group is the object's API group: empty for the core group (Pod, Service, ConfigMap), otherwise apps, networking.k8s.io, autoscaling or policy — and hanzo.ai for the App CR itself.
Group *string `json:"group,omitempty"`
// Health is this object's own health, derived from its live state by the same rule the resource tree uses.
Health *DeployArgoHealth `json:"health,omitempty"`
// Kind is the object kind — App, Deployment, ReplicaSet, Pod, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget, ConfigMap. Never Secret: the walk that produces these does not visit them.
Kind *string `json:"kind,omitempty"`
// Name is the object's metadata.name.
Name *string `json:"name,omitempty"`
// Namespace is the namespace the object was found in — the same one for every entry of an application, since the walk is confined to it.
Namespace *string `json:"namespace,omitempty"`
// Status is the APPLICATION's sync verdict repeated on every row, not a per-object one. The operator owns these children, so no child has a desired state of its own to compare against.
Status *string `json:"status,omitempty"`
// Version is the object's API version as the live object reports it: v1 for every kind here except the HorizontalPodAutoscaler, which is autoscaling/v2.
Version *string `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoResourceStatus DeployArgoResourceStatus
// NewDeployArgoResourceStatus instantiates a new DeployArgoResourceStatus 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 NewDeployArgoResourceStatus() *DeployArgoResourceStatus {
this := DeployArgoResourceStatus{}
return &this
}
// NewDeployArgoResourceStatusWithDefaults instantiates a new DeployArgoResourceStatus 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 NewDeployArgoResourceStatusWithDefaults() *DeployArgoResourceStatus {
this := DeployArgoResourceStatus{}
return &this
}
// GetGroup returns the Group field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) GetGroup() string {
if o == nil || IsNil(o.Group) {
var ret string
return ret
}
return *o.Group
}
// GetGroupOk returns a tuple with the Group field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoResourceStatus) GetGroupOk() (*string, bool) {
if o == nil || IsNil(o.Group) {
return nil, false
}
return o.Group, true
}
// HasGroup returns a boolean if a field has been set.
func (o *DeployArgoResourceStatus) HasGroup() bool {
if o != nil && !IsNil(o.Group) {
return true
}
return false
}
// SetGroup gets a reference to the given string and assigns it to the Group field.
func (o *DeployArgoResourceStatus) SetGroup(v string) {
o.Group = &v
}
// GetHealth returns the Health field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) SetHealth(v DeployArgoHealth) {
o.Health = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoResourceStatus) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *DeployArgoResourceStatus) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *DeployArgoResourceStatus) SetKind(v string) {
o.Kind = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoResourceStatus) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *DeployArgoResourceStatus) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *DeployArgoResourceStatus) SetName(v string) {
o.Name = &v
}
// GetNamespace returns the Namespace field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) GetNamespace() string {
if o == nil || IsNil(o.Namespace) {
var ret string
return ret
}
return *o.Namespace
}
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoResourceStatus) GetNamespaceOk() (*string, bool) {
if o == nil || IsNil(o.Namespace) {
return nil, false
}
return o.Namespace, true
}
// HasNamespace returns a boolean if a field has been set.
func (o *DeployArgoResourceStatus) HasNamespace() bool {
if o != nil && !IsNil(o.Namespace) {
return true
}
return false
}
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
func (o *DeployArgoResourceStatus) SetNamespace(v string) {
o.Namespace = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) SetStatus(v string) {
o.Status = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) 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 *DeployArgoResourceStatus) SetVersion(v string) {
o.Version = &v
}
func (o DeployArgoResourceStatus) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoResourceStatus) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Group) {
toSerialize["group"] = o.Group
}
if !IsNil(o.Health) {
toSerialize["health"] = o.Health
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Namespace) {
toSerialize["namespace"] = o.Namespace
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoResourceStatus) UnmarshalJSON(data []byte) (err error) {
varDeployArgoResourceStatus := _DeployArgoResourceStatus{}
err = json.Unmarshal(data, &varDeployArgoResourceStatus)
if err != nil {
return err
}
*o = DeployArgoResourceStatus(varDeployArgoResourceStatus)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "group")
delete(additionalProperties, "health")
delete(additionalProperties, "kind")
delete(additionalProperties, "name")
delete(additionalProperties, "namespace")
delete(additionalProperties, "status")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoResourceStatus struct {
value *DeployArgoResourceStatus
isSet bool
}
func (v NullableDeployArgoResourceStatus) Get() *DeployArgoResourceStatus {
return v.value
}
func (v *NullableDeployArgoResourceStatus) Set(val *DeployArgoResourceStatus) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoResourceStatus) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoResourceStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoResourceStatus(val *DeployArgoResourceStatus) *NullableDeployArgoResourceStatus {
return &NullableDeployArgoResourceStatus{value: val, isSet: true}
}
func (v NullableDeployArgoResourceStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoResourceStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}