Files
sdk/model_deploy_argo_meta.go

307 lines
8.9 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 DeployArgoMeta type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoMeta{}
// DeployArgoMeta struct for DeployArgoMeta
type DeployArgoMeta struct {
// CreationTimestamp is when the source object was created, RFC 3339 to the second. Empty for a synthesized project.
CreationTimestamp *string `json:"creationTimestamp,omitempty"`
// Labels are the labels this projection puts on the row, not the source object's full label set. An application projected from an App CR carries hanzo.ai/instance (its name), hanzo.ai/env (main, test or dev, from the namespace it was read from) and hanzo.ai/org when the CR declares a tenant. A Hanzo CD Application carries the CR's own labels verbatim. A project reflected from IAM carries hanzo.ai/org alone.
Labels map[string]string `json:"labels,omitempty"`
// Name is the projected object's name: the App CR's metadata.name for an application, the CD Application's name for a CD row, and the IAM project name for a project.
Name *string `json:"name,omitempty"`
// Namespace is the namespace the source object was read from — the tenant or platform namespace for an App CR, CD's controller namespace for a CD row. Empty for a project synthesized here, which lives in no namespace.
Namespace *string `json:"namespace,omitempty"`
// UID is the k8s metadata.uid of the source object, which is what the SPA keys a row on across refreshes. Empty for a synthesized project — there is no object to take one from.
Uid *string `json:"uid,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoMeta DeployArgoMeta
// NewDeployArgoMeta instantiates a new DeployArgoMeta 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 NewDeployArgoMeta() *DeployArgoMeta {
this := DeployArgoMeta{}
return &this
}
// NewDeployArgoMetaWithDefaults instantiates a new DeployArgoMeta 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 NewDeployArgoMetaWithDefaults() *DeployArgoMeta {
this := DeployArgoMeta{}
return &this
}
// GetCreationTimestamp returns the CreationTimestamp field value if set, zero value otherwise.
func (o *DeployArgoMeta) GetCreationTimestamp() string {
if o == nil || IsNil(o.CreationTimestamp) {
var ret string
return ret
}
return *o.CreationTimestamp
}
// GetCreationTimestampOk returns a tuple with the CreationTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoMeta) GetCreationTimestampOk() (*string, bool) {
if o == nil || IsNil(o.CreationTimestamp) {
return nil, false
}
return o.CreationTimestamp, true
}
// HasCreationTimestamp returns a boolean if a field has been set.
func (o *DeployArgoMeta) HasCreationTimestamp() bool {
if o != nil && !IsNil(o.CreationTimestamp) {
return true
}
return false
}
// SetCreationTimestamp gets a reference to the given string and assigns it to the CreationTimestamp field.
func (o *DeployArgoMeta) SetCreationTimestamp(v string) {
o.CreationTimestamp = &v
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *DeployArgoMeta) GetLabels() map[string]string {
if o == nil || IsNil(o.Labels) {
var ret map[string]string
return ret
}
return o.Labels
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoMeta) GetLabelsOk() (map[string]string, bool) {
if o == nil || IsNil(o.Labels) {
return map[string]string{}, false
}
return o.Labels, true
}
// HasLabels returns a boolean if a field has been set.
func (o *DeployArgoMeta) HasLabels() bool {
if o != nil && !IsNil(o.Labels) {
return true
}
return false
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *DeployArgoMeta) SetLabels(v map[string]string) {
o.Labels = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DeployArgoMeta) 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 *DeployArgoMeta) 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 *DeployArgoMeta) 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 *DeployArgoMeta) SetName(v string) {
o.Name = &v
}
// GetNamespace returns the Namespace field value if set, zero value otherwise.
func (o *DeployArgoMeta) 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 *DeployArgoMeta) 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 *DeployArgoMeta) 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 *DeployArgoMeta) SetNamespace(v string) {
o.Namespace = &v
}
// GetUid returns the Uid field value if set, zero value otherwise.
func (o *DeployArgoMeta) 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 *DeployArgoMeta) 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 *DeployArgoMeta) 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 *DeployArgoMeta) SetUid(v string) {
o.Uid = &v
}
func (o DeployArgoMeta) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoMeta) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreationTimestamp) {
toSerialize["creationTimestamp"] = o.CreationTimestamp
}
if !IsNil(o.Labels) {
toSerialize["labels"] = o.Labels
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Namespace) {
toSerialize["namespace"] = o.Namespace
}
if !IsNil(o.Uid) {
toSerialize["uid"] = o.Uid
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoMeta) UnmarshalJSON(data []byte) (err error) {
varDeployArgoMeta := _DeployArgoMeta{}
err = json.Unmarshal(data, &varDeployArgoMeta)
if err != nil {
return err
}
*o = DeployArgoMeta(varDeployArgoMeta)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "creationTimestamp")
delete(additionalProperties, "labels")
delete(additionalProperties, "name")
delete(additionalProperties, "namespace")
delete(additionalProperties, "uid")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoMeta struct {
value *DeployArgoMeta
isSet bool
}
func (v NullableDeployArgoMeta) Get() *DeployArgoMeta {
return v.value
}
func (v *NullableDeployArgoMeta) Set(val *DeployArgoMeta) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoMeta) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoMeta) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoMeta(val *DeployArgoMeta) *NullableDeployArgoMeta {
return &NullableDeployArgoMeta{value: val, isSet: true}
}
func (v NullableDeployArgoMeta) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoMeta) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}