Files
sdk/model_deploy_argo_cluster_info.go

231 lines
7.2 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 DeployArgoClusterInfo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoClusterInfo{}
// DeployArgoClusterInfo struct for DeployArgoClusterInfo
type DeployArgoClusterInfo struct {
// ApplicationsCount is how many of THE CALLER'S applications reconcile into this cluster, so a tenant sees its own count and a SuperAdmin the fleet's. It is zero for the in-cluster destination when the caller owns nothing, since that destination is listed whether or not anything targets it.
ApplicationsCount *int64 `json:"applicationsCount,omitempty"`
// ConnectionState repeats the cluster's own connection state, which is where ArgoCD's UI reads it from on this object.
ConnectionState *DeployArgoConnectionState `json:"connectionState,omitempty"`
// ServerVersion is the kubernetes version of the destination. Always absent: nothing here queries the API server for it.
ServerVersion *string `json:"serverVersion,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoClusterInfo DeployArgoClusterInfo
// NewDeployArgoClusterInfo instantiates a new DeployArgoClusterInfo 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 NewDeployArgoClusterInfo() *DeployArgoClusterInfo {
this := DeployArgoClusterInfo{}
return &this
}
// NewDeployArgoClusterInfoWithDefaults instantiates a new DeployArgoClusterInfo 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 NewDeployArgoClusterInfoWithDefaults() *DeployArgoClusterInfo {
this := DeployArgoClusterInfo{}
return &this
}
// GetApplicationsCount returns the ApplicationsCount field value if set, zero value otherwise.
func (o *DeployArgoClusterInfo) GetApplicationsCount() int64 {
if o == nil || IsNil(o.ApplicationsCount) {
var ret int64
return ret
}
return *o.ApplicationsCount
}
// GetApplicationsCountOk returns a tuple with the ApplicationsCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoClusterInfo) GetApplicationsCountOk() (*int64, bool) {
if o == nil || IsNil(o.ApplicationsCount) {
return nil, false
}
return o.ApplicationsCount, true
}
// HasApplicationsCount returns a boolean if a field has been set.
func (o *DeployArgoClusterInfo) HasApplicationsCount() bool {
if o != nil && !IsNil(o.ApplicationsCount) {
return true
}
return false
}
// SetApplicationsCount gets a reference to the given int64 and assigns it to the ApplicationsCount field.
func (o *DeployArgoClusterInfo) SetApplicationsCount(v int64) {
o.ApplicationsCount = &v
}
// GetConnectionState returns the ConnectionState field value if set, zero value otherwise.
func (o *DeployArgoClusterInfo) 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 *DeployArgoClusterInfo) 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 *DeployArgoClusterInfo) 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 *DeployArgoClusterInfo) SetConnectionState(v DeployArgoConnectionState) {
o.ConnectionState = &v
}
// GetServerVersion returns the ServerVersion field value if set, zero value otherwise.
func (o *DeployArgoClusterInfo) GetServerVersion() string {
if o == nil || IsNil(o.ServerVersion) {
var ret string
return ret
}
return *o.ServerVersion
}
// GetServerVersionOk returns a tuple with the ServerVersion field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoClusterInfo) GetServerVersionOk() (*string, bool) {
if o == nil || IsNil(o.ServerVersion) {
return nil, false
}
return o.ServerVersion, true
}
// HasServerVersion returns a boolean if a field has been set.
func (o *DeployArgoClusterInfo) HasServerVersion() bool {
if o != nil && !IsNil(o.ServerVersion) {
return true
}
return false
}
// SetServerVersion gets a reference to the given string and assigns it to the ServerVersion field.
func (o *DeployArgoClusterInfo) SetServerVersion(v string) {
o.ServerVersion = &v
}
func (o DeployArgoClusterInfo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoClusterInfo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ApplicationsCount) {
toSerialize["applicationsCount"] = o.ApplicationsCount
}
if !IsNil(o.ConnectionState) {
toSerialize["connectionState"] = o.ConnectionState
}
if !IsNil(o.ServerVersion) {
toSerialize["serverVersion"] = o.ServerVersion
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoClusterInfo) UnmarshalJSON(data []byte) (err error) {
varDeployArgoClusterInfo := _DeployArgoClusterInfo{}
err = json.Unmarshal(data, &varDeployArgoClusterInfo)
if err != nil {
return err
}
*o = DeployArgoClusterInfo(varDeployArgoClusterInfo)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "applicationsCount")
delete(additionalProperties, "connectionState")
delete(additionalProperties, "serverVersion")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoClusterInfo struct {
value *DeployArgoClusterInfo
isSet bool
}
func (v NullableDeployArgoClusterInfo) Get() *DeployArgoClusterInfo {
return v.value
}
func (v *NullableDeployArgoClusterInfo) Set(val *DeployArgoClusterInfo) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoClusterInfo) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoClusterInfo) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoClusterInfo(val *DeployArgoClusterInfo) *NullableDeployArgoClusterInfo {
return &NullableDeployArgoClusterInfo{value: val, isSet: true}
}
func (v NullableDeployArgoClusterInfo) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoClusterInfo) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}