mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
573 lines
16 KiB
Go
573 lines
16 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 DeployArgoNode type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployArgoNode{}
|
|
|
|
// DeployArgoNode struct for DeployArgoNode
|
|
type DeployArgoNode struct {
|
|
// CreatedAt is the object's creationTimestamp, RFC 3339 UTC to the second. Absent when the object carries none.
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
// 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 at the root.
|
|
Group *string `json:"group,omitempty"`
|
|
// Health is the node's own derived health. Always present on a node of this tree; a kind with no health signal of its own reports Healthy, since a ConfigMap existing IS its healthy state.
|
|
Health *DeployArgoHealth `json:"health,omitempty"`
|
|
// Images are the container images running on this node. Always absent — the tag travels as the \"Image Tag\" chip in Info instead, which is where the SPA reads it on a node.
|
|
Images []string `json:"images,omitempty"`
|
|
// Info are the chips shown on the node. At most one: the image tag — the RUNNING tag on a Deployment, ReplicaSet or Pod, and the DECLARED tag on the App CR at the root. Absent on a node that carries no image at all.
|
|
Info []DeployArgoInfoItem `json:"info,omitempty"`
|
|
// Kind is the object kind. The root is the App CR; below it come Deployment, ReplicaSet, Pod, Service, Ingress, HorizontalPodAutoscaler, PodDisruptionBudget and ConfigMap. Never Secret — the walk does not visit them, so no materialized environment can reach the tree.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Name is the object's metadata.name.
|
|
Name *string `json:"name,omitempty"`
|
|
// Namespace is the namespace the walk ran in, the same for every node of one tree.
|
|
Namespace *string `json:"namespace,omitempty"`
|
|
// ParentRefs are the node's edges UPWARD, which is how the SPA draws the DAG from this flat list. Exactly one entry where present: a depth-1 object points at the App CR, a ReplicaSet at its Deployment, a Pod at its ReplicaSet (or at the Deployment whose selector matches it, when the ReplicaSet is gone). Absent on the root.
|
|
ParentRefs []DeployArgoResourceRef `json:"parentRefs,omitempty"`
|
|
// ResourceVersion is the k8s version a watch would resume from. Always empty: the tree is rebuilt from live reads on every request, including on every frame of the SSE stream, so there is no revision to resume from.
|
|
ResourceVersion *string `json:"resourceVersion,omitempty"`
|
|
// UID is the object's metadata.uid. Absent on a PARENT reference, which addresses its target by kind and name rather than by identity.
|
|
Uid *string `json:"uid,omitempty"`
|
|
// Version is the object's API version as the live object reports it: v1 for every kind the walk reaches except the HorizontalPodAutoscaler, which is autoscaling/v2.
|
|
Version *string `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeployArgoNode DeployArgoNode
|
|
|
|
// NewDeployArgoNode instantiates a new DeployArgoNode 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 NewDeployArgoNode() *DeployArgoNode {
|
|
this := DeployArgoNode{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployArgoNodeWithDefaults instantiates a new DeployArgoNode 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 NewDeployArgoNodeWithDefaults() *DeployArgoNode {
|
|
this := DeployArgoNode{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) GetCreatedAt() string {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoNode) GetCreatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *DeployArgoNode) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
|
func (o *DeployArgoNode) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetGroup returns the Group field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) SetGroup(v string) {
|
|
o.Group = &v
|
|
}
|
|
|
|
// GetHealth returns the Health field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) SetHealth(v DeployArgoHealth) {
|
|
o.Health = &v
|
|
}
|
|
|
|
// GetImages returns the Images field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) GetImages() []string {
|
|
if o == nil || IsNil(o.Images) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Images
|
|
}
|
|
|
|
// GetImagesOk returns a tuple with the Images field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoNode) GetImagesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Images) {
|
|
return nil, false
|
|
}
|
|
return o.Images, true
|
|
}
|
|
|
|
// HasImages returns a boolean if a field has been set.
|
|
func (o *DeployArgoNode) HasImages() bool {
|
|
if o != nil && !IsNil(o.Images) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetImages gets a reference to the given []string and assigns it to the Images field.
|
|
func (o *DeployArgoNode) SetImages(v []string) {
|
|
o.Images = v
|
|
}
|
|
|
|
// GetInfo returns the Info field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) GetInfo() []DeployArgoInfoItem {
|
|
if o == nil || IsNil(o.Info) {
|
|
var ret []DeployArgoInfoItem
|
|
return ret
|
|
}
|
|
return o.Info
|
|
}
|
|
|
|
// GetInfoOk returns a tuple with the Info field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoNode) GetInfoOk() ([]DeployArgoInfoItem, bool) {
|
|
if o == nil || IsNil(o.Info) {
|
|
return nil, false
|
|
}
|
|
return o.Info, true
|
|
}
|
|
|
|
// HasInfo returns a boolean if a field has been set.
|
|
func (o *DeployArgoNode) HasInfo() bool {
|
|
if o != nil && !IsNil(o.Info) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInfo gets a reference to the given []DeployArgoInfoItem and assigns it to the Info field.
|
|
func (o *DeployArgoNode) SetInfo(v []DeployArgoInfoItem) {
|
|
o.Info = v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) SetNamespace(v string) {
|
|
o.Namespace = &v
|
|
}
|
|
|
|
// GetParentRefs returns the ParentRefs field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) GetParentRefs() []DeployArgoResourceRef {
|
|
if o == nil || IsNil(o.ParentRefs) {
|
|
var ret []DeployArgoResourceRef
|
|
return ret
|
|
}
|
|
return o.ParentRefs
|
|
}
|
|
|
|
// GetParentRefsOk returns a tuple with the ParentRefs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoNode) GetParentRefsOk() ([]DeployArgoResourceRef, bool) {
|
|
if o == nil || IsNil(o.ParentRefs) {
|
|
return nil, false
|
|
}
|
|
return o.ParentRefs, true
|
|
}
|
|
|
|
// HasParentRefs returns a boolean if a field has been set.
|
|
func (o *DeployArgoNode) HasParentRefs() bool {
|
|
if o != nil && !IsNil(o.ParentRefs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParentRefs gets a reference to the given []DeployArgoResourceRef and assigns it to the ParentRefs field.
|
|
func (o *DeployArgoNode) SetParentRefs(v []DeployArgoResourceRef) {
|
|
o.ParentRefs = v
|
|
}
|
|
|
|
// GetResourceVersion returns the ResourceVersion field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) GetResourceVersion() string {
|
|
if o == nil || IsNil(o.ResourceVersion) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ResourceVersion
|
|
}
|
|
|
|
// GetResourceVersionOk returns a tuple with the ResourceVersion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoNode) GetResourceVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ResourceVersion) {
|
|
return nil, false
|
|
}
|
|
return o.ResourceVersion, true
|
|
}
|
|
|
|
// HasResourceVersion returns a boolean if a field has been set.
|
|
func (o *DeployArgoNode) HasResourceVersion() bool {
|
|
if o != nil && !IsNil(o.ResourceVersion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResourceVersion gets a reference to the given string and assigns it to the ResourceVersion field.
|
|
func (o *DeployArgoNode) SetResourceVersion(v string) {
|
|
o.ResourceVersion = &v
|
|
}
|
|
|
|
// GetUid returns the Uid field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) GetUid() string {
|
|
if o == nil || IsNil(o.Uid) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Uid
|
|
}
|
|
|
|
// GetUidOk returns a tuple with the Uid field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoNode) GetUidOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Uid) {
|
|
return nil, false
|
|
}
|
|
return o.Uid, true
|
|
}
|
|
|
|
// HasUid returns a boolean if a field has been set.
|
|
func (o *DeployArgoNode) HasUid() bool {
|
|
if o != nil && !IsNil(o.Uid) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUid gets a reference to the given string and assigns it to the Uid field.
|
|
func (o *DeployArgoNode) SetUid(v string) {
|
|
o.Uid = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) 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 *DeployArgoNode) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o DeployArgoNode) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployArgoNode) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Group) {
|
|
toSerialize["group"] = o.Group
|
|
}
|
|
if !IsNil(o.Health) {
|
|
toSerialize["health"] = o.Health
|
|
}
|
|
if !IsNil(o.Images) {
|
|
toSerialize["images"] = o.Images
|
|
}
|
|
if !IsNil(o.Info) {
|
|
toSerialize["info"] = o.Info
|
|
}
|
|
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.ParentRefs) {
|
|
toSerialize["parentRefs"] = o.ParentRefs
|
|
}
|
|
if !IsNil(o.ResourceVersion) {
|
|
toSerialize["resourceVersion"] = o.ResourceVersion
|
|
}
|
|
if !IsNil(o.Uid) {
|
|
toSerialize["uid"] = o.Uid
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeployArgoNode) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployArgoNode := _DeployArgoNode{}
|
|
|
|
err = json.Unmarshal(data, &varDeployArgoNode)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployArgoNode(varDeployArgoNode)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "group")
|
|
delete(additionalProperties, "health")
|
|
delete(additionalProperties, "images")
|
|
delete(additionalProperties, "info")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "namespace")
|
|
delete(additionalProperties, "parentRefs")
|
|
delete(additionalProperties, "resourceVersion")
|
|
delete(additionalProperties, "uid")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeployArgoNode struct {
|
|
value *DeployArgoNode
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployArgoNode) Get() *DeployArgoNode {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployArgoNode) Set(val *DeployArgoNode) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployArgoNode) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployArgoNode) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployArgoNode(val *DeployArgoNode) *NullableDeployArgoNode {
|
|
return &NullableDeployArgoNode{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployArgoNode) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployArgoNode) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|