mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.7 KiB
Go
345 lines
9.7 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 DeployArgoResourceRef type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DeployArgoResourceRef{}
|
|
|
|
// DeployArgoResourceRef struct for DeployArgoResourceRef
|
|
type DeployArgoResourceRef 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 at the root.
|
|
Group *string `json:"group,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"`
|
|
// 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 _DeployArgoResourceRef DeployArgoResourceRef
|
|
|
|
// NewDeployArgoResourceRef instantiates a new DeployArgoResourceRef 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 NewDeployArgoResourceRef() *DeployArgoResourceRef {
|
|
this := DeployArgoResourceRef{}
|
|
return &this
|
|
}
|
|
|
|
// NewDeployArgoResourceRefWithDefaults instantiates a new DeployArgoResourceRef 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 NewDeployArgoResourceRefWithDefaults() *DeployArgoResourceRef {
|
|
this := DeployArgoResourceRef{}
|
|
return &this
|
|
}
|
|
|
|
// GetGroup returns the Group field value if set, zero value otherwise.
|
|
func (o *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) SetGroup(v string) {
|
|
o.Group = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
|
func (o *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) SetNamespace(v string) {
|
|
o.Namespace = &v
|
|
}
|
|
|
|
// GetUid returns the Uid field value if set, zero value otherwise.
|
|
func (o *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) SetUid(v string) {
|
|
o.Uid = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) 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 *DeployArgoResourceRef) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o DeployArgoResourceRef) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DeployArgoResourceRef) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Group) {
|
|
toSerialize["group"] = o.Group
|
|
}
|
|
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.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 *DeployArgoResourceRef) UnmarshalJSON(data []byte) (err error) {
|
|
varDeployArgoResourceRef := _DeployArgoResourceRef{}
|
|
|
|
err = json.Unmarshal(data, &varDeployArgoResourceRef)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DeployArgoResourceRef(varDeployArgoResourceRef)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "group")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "namespace")
|
|
delete(additionalProperties, "uid")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDeployArgoResourceRef struct {
|
|
value *DeployArgoResourceRef
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDeployArgoResourceRef) Get() *DeployArgoResourceRef {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDeployArgoResourceRef) Set(val *DeployArgoResourceRef) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDeployArgoResourceRef) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDeployArgoResourceRef) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDeployArgoResourceRef(val *DeployArgoResourceRef) *NullableDeployArgoResourceRef {
|
|
return &NullableDeployArgoResourceRef{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDeployArgoResourceRef) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDeployArgoResourceRef) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|