Files
sdk/model_deploy_argo_destination.go

231 lines
6.5 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 DeployArgoDestination type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoDestination{}
// DeployArgoDestination struct for DeployArgoDestination
type DeployArgoDestination struct {
// ArgoCD allows a destination by cluster name; omitted for the in-cluster projection.
Name *string `json:"name,omitempty"`
// Namespace is where in that cluster the workload lands. \"*\" on a project's destination fence means any namespace.
Namespace *string `json:"namespace,omitempty"`
// Server is the cluster API URL the application reconciles into. Everything this plane projects lands in the cluster it runs in, so it is https://kubernetes.default.svc — except on a project's destination fence, where \"*\" means any cluster.
Server *string `json:"server,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoDestination DeployArgoDestination
// NewDeployArgoDestination instantiates a new DeployArgoDestination 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 NewDeployArgoDestination() *DeployArgoDestination {
this := DeployArgoDestination{}
return &this
}
// NewDeployArgoDestinationWithDefaults instantiates a new DeployArgoDestination 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 NewDeployArgoDestinationWithDefaults() *DeployArgoDestination {
this := DeployArgoDestination{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DeployArgoDestination) 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 *DeployArgoDestination) 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 *DeployArgoDestination) 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 *DeployArgoDestination) SetName(v string) {
o.Name = &v
}
// GetNamespace returns the Namespace field value if set, zero value otherwise.
func (o *DeployArgoDestination) 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 *DeployArgoDestination) 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 *DeployArgoDestination) 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 *DeployArgoDestination) SetNamespace(v string) {
o.Namespace = &v
}
// GetServer returns the Server field value if set, zero value otherwise.
func (o *DeployArgoDestination) GetServer() string {
if o == nil || IsNil(o.Server) {
var ret string
return ret
}
return *o.Server
}
// GetServerOk returns a tuple with the Server field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoDestination) GetServerOk() (*string, bool) {
if o == nil || IsNil(o.Server) {
return nil, false
}
return o.Server, true
}
// HasServer returns a boolean if a field has been set.
func (o *DeployArgoDestination) HasServer() bool {
if o != nil && !IsNil(o.Server) {
return true
}
return false
}
// SetServer gets a reference to the given string and assigns it to the Server field.
func (o *DeployArgoDestination) SetServer(v string) {
o.Server = &v
}
func (o DeployArgoDestination) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoDestination) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Namespace) {
toSerialize["namespace"] = o.Namespace
}
if !IsNil(o.Server) {
toSerialize["server"] = o.Server
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoDestination) UnmarshalJSON(data []byte) (err error) {
varDeployArgoDestination := _DeployArgoDestination{}
err = json.Unmarshal(data, &varDeployArgoDestination)
if err != nil {
return err
}
*o = DeployArgoDestination(varDeployArgoDestination)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "namespace")
delete(additionalProperties, "server")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoDestination struct {
value *DeployArgoDestination
isSet bool
}
func (v NullableDeployArgoDestination) Get() *DeployArgoDestination {
return v.value
}
func (v *NullableDeployArgoDestination) Set(val *DeployArgoDestination) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoDestination) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoDestination) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoDestination(val *DeployArgoDestination) *NullableDeployArgoDestination {
return &NullableDeployArgoDestination{value: val, isSet: true}
}
func (v NullableDeployArgoDestination) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoDestination) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}