Files
sdk/model_deploy_argo_cluster.go

269 lines
7.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 DeployArgoCluster type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoCluster{}
// DeployArgoCluster struct for DeployArgoCluster
type DeployArgoCluster struct {
// ConnectionState is whether the destination is reachable.
ConnectionState *DeployArgoConnectionState `json:"connectionState,omitempty"`
// Info is the connection state again plus the count of applications targeting this destination.
Info *DeployArgoClusterInfo `json:"info,omitempty"`
// Name is what the Destination column shows: \"in-cluster\" for this cluster, otherwise whatever spec.destination.name declares, falling back to the server URL when it declares none.
Name *string `json:"name,omitempty"`
// Server is the destination's API URL, and the key the list is deduplicated by. https://kubernetes.default.svc is this cluster.
Server *string `json:"server,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoCluster DeployArgoCluster
// NewDeployArgoCluster instantiates a new DeployArgoCluster 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 NewDeployArgoCluster() *DeployArgoCluster {
this := DeployArgoCluster{}
return &this
}
// NewDeployArgoClusterWithDefaults instantiates a new DeployArgoCluster 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 NewDeployArgoClusterWithDefaults() *DeployArgoCluster {
this := DeployArgoCluster{}
return &this
}
// GetConnectionState returns the ConnectionState field value if set, zero value otherwise.
func (o *DeployArgoCluster) GetConnectionState() DeployArgoConnectionState {
if o == nil || IsNil(o.ConnectionState) {
var ret DeployArgoConnectionState
return ret
}
return *o.ConnectionState
}
// GetConnectionStateOk returns a tuple with the ConnectionState field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoCluster) GetConnectionStateOk() (*DeployArgoConnectionState, bool) {
if o == nil || IsNil(o.ConnectionState) {
return nil, false
}
return o.ConnectionState, true
}
// HasConnectionState returns a boolean if a field has been set.
func (o *DeployArgoCluster) HasConnectionState() bool {
if o != nil && !IsNil(o.ConnectionState) {
return true
}
return false
}
// SetConnectionState gets a reference to the given DeployArgoConnectionState and assigns it to the ConnectionState field.
func (o *DeployArgoCluster) SetConnectionState(v DeployArgoConnectionState) {
o.ConnectionState = &v
}
// GetInfo returns the Info field value if set, zero value otherwise.
func (o *DeployArgoCluster) GetInfo() DeployArgoClusterInfo {
if o == nil || IsNil(o.Info) {
var ret DeployArgoClusterInfo
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 *DeployArgoCluster) GetInfoOk() (*DeployArgoClusterInfo, 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 *DeployArgoCluster) HasInfo() bool {
if o != nil && !IsNil(o.Info) {
return true
}
return false
}
// SetInfo gets a reference to the given DeployArgoClusterInfo and assigns it to the Info field.
func (o *DeployArgoCluster) SetInfo(v DeployArgoClusterInfo) {
o.Info = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *DeployArgoCluster) 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 *DeployArgoCluster) 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 *DeployArgoCluster) 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 *DeployArgoCluster) SetName(v string) {
o.Name = &v
}
// GetServer returns the Server field value if set, zero value otherwise.
func (o *DeployArgoCluster) 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 *DeployArgoCluster) 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 *DeployArgoCluster) 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 *DeployArgoCluster) SetServer(v string) {
o.Server = &v
}
func (o DeployArgoCluster) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoCluster) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ConnectionState) {
toSerialize["connectionState"] = o.ConnectionState
}
if !IsNil(o.Info) {
toSerialize["info"] = o.Info
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Server) {
toSerialize["server"] = o.Server
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoCluster) UnmarshalJSON(data []byte) (err error) {
varDeployArgoCluster := _DeployArgoCluster{}
err = json.Unmarshal(data, &varDeployArgoCluster)
if err != nil {
return err
}
*o = DeployArgoCluster(varDeployArgoCluster)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "connectionState")
delete(additionalProperties, "info")
delete(additionalProperties, "name")
delete(additionalProperties, "server")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoCluster struct {
value *DeployArgoCluster
isSet bool
}
func (v NullableDeployArgoCluster) Get() *DeployArgoCluster {
return v.value
}
func (v *NullableDeployArgoCluster) Set(val *DeployArgoCluster) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoCluster) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoCluster) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoCluster(val *DeployArgoCluster) *NullableDeployArgoCluster {
return &NullableDeployArgoCluster{value: val, isSet: true}
}
func (v NullableDeployArgoCluster) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoCluster) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}