mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.4 KiB
Go
231 lines
6.4 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 DeployArgoTree type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployArgoTree{}
|
|
|
|
// DeployArgoTree struct for DeployArgoTree
|
|
type DeployArgoTree struct {
|
|
// Hosts is ArgoCD's per-node machine inventory. Always empty: this plane projects applications and serves no cluster-node view.
|
|
Hosts []interface{} `json:"hosts,omitempty"`
|
|
// Nodes is the FLAT node list, root first: the App CR, then the objects the operator owns, then their ReplicaSets and Pods. The hierarchy is in ParentRefs, not in the ordering.
|
|
Nodes []DeployArgoNode `json:"nodes,omitempty"`
|
|
// OrphanedNodes are objects in the namespace belonging to no application. Always empty: this walk reaches an object only THROUGH ownership from the App CR, so it can never hold one that is orphaned.
|
|
OrphanedNodes []DeployArgoNode `json:"orphanedNodes,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DeployArgoTree DeployArgoTree
|
|
|
|
// NewDeployArgoTree instantiates a new DeployArgoTree 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 NewDeployArgoTree() *DeployArgoTree {
|
|
this := DeployArgoTree{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployArgoTreeWithDefaults instantiates a new DeployArgoTree 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 NewDeployArgoTreeWithDefaults() *DeployArgoTree {
|
|
this := DeployArgoTree{}
|
|
return &this
|
|
}
|
|
|
|
// GetHosts returns the Hosts field value if set, zero value otherwise.
|
|
func (o *DeployArgoTree) GetHosts() []interface{} {
|
|
if o == nil || IsNil(o.Hosts) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Hosts
|
|
}
|
|
|
|
// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoTree) GetHostsOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Hosts) {
|
|
return nil, false
|
|
}
|
|
return o.Hosts, true
|
|
}
|
|
|
|
// HasHosts returns a boolean if a field has been set.
|
|
func (o *DeployArgoTree) HasHosts() bool {
|
|
if o != nil && !IsNil(o.Hosts) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHosts gets a reference to the given []interface{} and assigns it to the Hosts field.
|
|
func (o *DeployArgoTree) SetHosts(v []interface{}) {
|
|
o.Hosts = v
|
|
}
|
|
|
|
// GetNodes returns the Nodes field value if set, zero value otherwise.
|
|
func (o *DeployArgoTree) GetNodes() []DeployArgoNode {
|
|
if o == nil || IsNil(o.Nodes) {
|
|
var ret []DeployArgoNode
|
|
return ret
|
|
}
|
|
return o.Nodes
|
|
}
|
|
|
|
// GetNodesOk returns a tuple with the Nodes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoTree) GetNodesOk() ([]DeployArgoNode, bool) {
|
|
if o == nil || IsNil(o.Nodes) {
|
|
return nil, false
|
|
}
|
|
return o.Nodes, true
|
|
}
|
|
|
|
// HasNodes returns a boolean if a field has been set.
|
|
func (o *DeployArgoTree) HasNodes() bool {
|
|
if o != nil && !IsNil(o.Nodes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNodes gets a reference to the given []DeployArgoNode and assigns it to the Nodes field.
|
|
func (o *DeployArgoTree) SetNodes(v []DeployArgoNode) {
|
|
o.Nodes = v
|
|
}
|
|
|
|
// GetOrphanedNodes returns the OrphanedNodes field value if set, zero value otherwise.
|
|
func (o *DeployArgoTree) GetOrphanedNodes() []DeployArgoNode {
|
|
if o == nil || IsNil(o.OrphanedNodes) {
|
|
var ret []DeployArgoNode
|
|
return ret
|
|
}
|
|
return o.OrphanedNodes
|
|
}
|
|
|
|
// GetOrphanedNodesOk returns a tuple with the OrphanedNodes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DeployArgoTree) GetOrphanedNodesOk() ([]DeployArgoNode, bool) {
|
|
if o == nil || IsNil(o.OrphanedNodes) {
|
|
return nil, false
|
|
}
|
|
return o.OrphanedNodes, true
|
|
}
|
|
|
|
// HasOrphanedNodes returns a boolean if a field has been set.
|
|
func (o *DeployArgoTree) HasOrphanedNodes() bool {
|
|
if o != nil && !IsNil(o.OrphanedNodes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrphanedNodes gets a reference to the given []DeployArgoNode and assigns it to the OrphanedNodes field.
|
|
func (o *DeployArgoTree) SetOrphanedNodes(v []DeployArgoNode) {
|
|
o.OrphanedNodes = v
|
|
}
|
|
|
|
func (o DeployArgoTree) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployArgoTree) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Hosts) {
|
|
toSerialize["hosts"] = o.Hosts
|
|
}
|
|
if !IsNil(o.Nodes) {
|
|
toSerialize["nodes"] = o.Nodes
|
|
}
|
|
if !IsNil(o.OrphanedNodes) {
|
|
toSerialize["orphanedNodes"] = o.OrphanedNodes
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DeployArgoTree) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployArgoTree := _DeployArgoTree{}
|
|
|
|
err = json.Unmarshal(data, &varDeployArgoTree)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployArgoTree(varDeployArgoTree)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "hosts")
|
|
delete(additionalProperties, "nodes")
|
|
delete(additionalProperties, "orphanedNodes")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeployArgoTree struct {
|
|
value *DeployArgoTree
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployArgoTree) Get() *DeployArgoTree {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployArgoTree) Set(val *DeployArgoTree) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployArgoTree) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployArgoTree) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployArgoTree(val *DeployArgoTree) *NullableDeployArgoTree {
|
|
return &NullableDeployArgoTree{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployArgoTree) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployArgoTree) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|