Files
sdk/model_deploy_argo_connection_state.go

231 lines
6.8 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 DeployArgoConnectionState type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DeployArgoConnectionState{}
// DeployArgoConnectionState struct for DeployArgoConnectionState
type DeployArgoConnectionState struct {
// AttemptedAt is when the connection was last probed. Always absent: nothing is probed, and a fabricated timestamp would claim a check that never ran.
AttemptedAt *string `json:"attemptedAt,omitempty"`
// Message is why a connection failed. Always absent, since none does.
Message *string `json:"message,omitempty"`
// Status is ArgoCD's ConnectionStatus — Successful, Failed or Unknown. Always Successful here: the destination is the cluster this process is already running in, so it is reachable by construction and there is no credential to probe.
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DeployArgoConnectionState DeployArgoConnectionState
// NewDeployArgoConnectionState instantiates a new DeployArgoConnectionState 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 NewDeployArgoConnectionState() *DeployArgoConnectionState {
this := DeployArgoConnectionState{}
return &this
}
// NewDeployArgoConnectionStateWithDefaults instantiates a new DeployArgoConnectionState 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 NewDeployArgoConnectionStateWithDefaults() *DeployArgoConnectionState {
this := DeployArgoConnectionState{}
return &this
}
// GetAttemptedAt returns the AttemptedAt field value if set, zero value otherwise.
func (o *DeployArgoConnectionState) GetAttemptedAt() string {
if o == nil || IsNil(o.AttemptedAt) {
var ret string
return ret
}
return *o.AttemptedAt
}
// GetAttemptedAtOk returns a tuple with the AttemptedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoConnectionState) GetAttemptedAtOk() (*string, bool) {
if o == nil || IsNil(o.AttemptedAt) {
return nil, false
}
return o.AttemptedAt, true
}
// HasAttemptedAt returns a boolean if a field has been set.
func (o *DeployArgoConnectionState) HasAttemptedAt() bool {
if o != nil && !IsNil(o.AttemptedAt) {
return true
}
return false
}
// SetAttemptedAt gets a reference to the given string and assigns it to the AttemptedAt field.
func (o *DeployArgoConnectionState) SetAttemptedAt(v string) {
o.AttemptedAt = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *DeployArgoConnectionState) GetMessage() string {
if o == nil || IsNil(o.Message) {
var ret string
return ret
}
return *o.Message
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoConnectionState) GetMessageOk() (*string, bool) {
if o == nil || IsNil(o.Message) {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *DeployArgoConnectionState) HasMessage() bool {
if o != nil && !IsNil(o.Message) {
return true
}
return false
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *DeployArgoConnectionState) SetMessage(v string) {
o.Message = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *DeployArgoConnectionState) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeployArgoConnectionState) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *DeployArgoConnectionState) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *DeployArgoConnectionState) SetStatus(v string) {
o.Status = &v
}
func (o DeployArgoConnectionState) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DeployArgoConnectionState) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AttemptedAt) {
toSerialize["attemptedAt"] = o.AttemptedAt
}
if !IsNil(o.Message) {
toSerialize["message"] = o.Message
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DeployArgoConnectionState) UnmarshalJSON(data []byte) (err error) {
varDeployArgoConnectionState := _DeployArgoConnectionState{}
err = json.Unmarshal(data, &varDeployArgoConnectionState)
if err != nil {
return err
}
*o = DeployArgoConnectionState(varDeployArgoConnectionState)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "attemptedAt")
delete(additionalProperties, "message")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDeployArgoConnectionState struct {
value *DeployArgoConnectionState
isSet bool
}
func (v NullableDeployArgoConnectionState) Get() *DeployArgoConnectionState {
return v.value
}
func (v *NullableDeployArgoConnectionState) Set(val *DeployArgoConnectionState) {
v.value = val
v.isSet = true
}
func (v NullableDeployArgoConnectionState) IsSet() bool {
return v.isSet
}
func (v *NullableDeployArgoConnectionState) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDeployArgoConnectionState(val *DeployArgoConnectionState) *NullableDeployArgoConnectionState {
return &NullableDeployArgoConnectionState{value: val, isSet: true}
}
func (v NullableDeployArgoConnectionState) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDeployArgoConnectionState) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}