Files
stack/components/fctl/membershipclient/model_stack_reachability.go
2024-03-15 12:02:55 +00:00

157 lines
4.2 KiB
Go

/*
Membership API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 0.1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package membershipclient
import (
"encoding/json"
"time"
)
// checks if the StackReachability type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StackReachability{}
// StackReachability struct for StackReachability
type StackReachability struct {
// Stack is reachable through Stargate
Reachable bool `json:"reachable"`
// Last time the stack was reachable
LastReachableUpdate *time.Time `json:"lastReachableUpdate,omitempty"`
}
// NewStackReachability instantiates a new StackReachability 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 NewStackReachability(reachable bool) *StackReachability {
this := StackReachability{}
this.Reachable = reachable
return &this
}
// NewStackReachabilityWithDefaults instantiates a new StackReachability 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 NewStackReachabilityWithDefaults() *StackReachability {
this := StackReachability{}
return &this
}
// GetReachable returns the Reachable field value
func (o *StackReachability) GetReachable() bool {
if o == nil {
var ret bool
return ret
}
return o.Reachable
}
// GetReachableOk returns a tuple with the Reachable field value
// and a boolean to check if the value has been set.
func (o *StackReachability) GetReachableOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Reachable, true
}
// SetReachable sets field value
func (o *StackReachability) SetReachable(v bool) {
o.Reachable = v
}
// GetLastReachableUpdate returns the LastReachableUpdate field value if set, zero value otherwise.
func (o *StackReachability) GetLastReachableUpdate() time.Time {
if o == nil || IsNil(o.LastReachableUpdate) {
var ret time.Time
return ret
}
return *o.LastReachableUpdate
}
// GetLastReachableUpdateOk returns a tuple with the LastReachableUpdate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StackReachability) GetLastReachableUpdateOk() (*time.Time, bool) {
if o == nil || IsNil(o.LastReachableUpdate) {
return nil, false
}
return o.LastReachableUpdate, true
}
// HasLastReachableUpdate returns a boolean if a field has been set.
func (o *StackReachability) HasLastReachableUpdate() bool {
if o != nil && !IsNil(o.LastReachableUpdate) {
return true
}
return false
}
// SetLastReachableUpdate gets a reference to the given time.Time and assigns it to the LastReachableUpdate field.
func (o *StackReachability) SetLastReachableUpdate(v time.Time) {
o.LastReachableUpdate = &v
}
func (o StackReachability) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StackReachability) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["reachable"] = o.Reachable
if !IsNil(o.LastReachableUpdate) {
toSerialize["lastReachableUpdate"] = o.LastReachableUpdate
}
return toSerialize, nil
}
type NullableStackReachability struct {
value *StackReachability
isSet bool
}
func (v NullableStackReachability) Get() *StackReachability {
return v.value
}
func (v *NullableStackReachability) Set(val *StackReachability) {
v.value = val
v.isSet = true
}
func (v NullableStackReachability) IsSet() bool {
return v.isSet
}
func (v *NullableStackReachability) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStackReachability(val *StackReachability) *NullableStackReachability {
return &NullableStackReachability{value: val, isSet: true}
}
func (v NullableStackReachability) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStackReachability) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}