Files

593 lines
14 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 Stack type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Stack{}
// Stack struct for Stack
type Stack struct {
// Stack name
Name string `json:"name"`
Metadata map[string]string `json:"metadata"`
// Supported only with agent version >= v0.7.0
Version *string `json:"version,omitempty"`
Status string `json:"status"`
State string `json:"state"`
ExpectedStatus string `json:"expectedStatus"`
LastStateUpdate time.Time `json:"lastStateUpdate"`
LastExpectedStatusUpdate time.Time `json:"lastExpectedStatusUpdate"`
LastStatusUpdate time.Time `json:"lastStatusUpdate"`
// Stack ID
Id string `json:"id"`
// Organization ID
OrganizationId string `json:"organizationId"`
// Base stack uri
Uri string `json:"uri"`
// The region where the stack is installed
RegionID string `json:"regionID"`
StargateEnabled bool `json:"stargateEnabled"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
DisabledAt *time.Time `json:"disabledAt,omitempty"`
}
// NewStack instantiates a new Stack 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 NewStack(name string, metadata map[string]string, status string, state string, expectedStatus string, lastStateUpdate time.Time, lastExpectedStatusUpdate time.Time, lastStatusUpdate time.Time, id string, organizationId string, uri string, regionID string, stargateEnabled bool) *Stack {
this := Stack{}
this.Name = name
this.Metadata = metadata
this.Status = status
this.State = state
this.ExpectedStatus = expectedStatus
this.LastStateUpdate = lastStateUpdate
this.LastExpectedStatusUpdate = lastExpectedStatusUpdate
this.LastStatusUpdate = lastStatusUpdate
this.Id = id
this.OrganizationId = organizationId
this.Uri = uri
this.RegionID = regionID
this.StargateEnabled = stargateEnabled
return &this
}
// NewStackWithDefaults instantiates a new Stack 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 NewStackWithDefaults() *Stack {
this := Stack{}
return &this
}
// GetName returns the Name field value
func (o *Stack) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *Stack) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *Stack) SetName(v string) {
o.Name = v
}
// GetMetadata returns the Metadata field value
func (o *Stack) GetMetadata() map[string]string {
if o == nil {
var ret map[string]string
return ret
}
return o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value
// and a boolean to check if the value has been set.
func (o *Stack) GetMetadataOk() (*map[string]string, bool) {
if o == nil {
return nil, false
}
return &o.Metadata, true
}
// SetMetadata sets field value
func (o *Stack) SetMetadata(v map[string]string) {
o.Metadata = v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *Stack) GetVersion() string {
if o == nil || IsNil(o.Version) {
var ret string
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stack) GetVersionOk() (*string, bool) {
if o == nil || IsNil(o.Version) {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *Stack) HasVersion() bool {
if o != nil && !IsNil(o.Version) {
return true
}
return false
}
// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *Stack) SetVersion(v string) {
o.Version = &v
}
// GetStatus returns the Status field value
func (o *Stack) GetStatus() string {
if o == nil {
var ret string
return ret
}
return o.Status
}
// GetStatusOk returns a tuple with the Status field value
// and a boolean to check if the value has been set.
func (o *Stack) GetStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Status, true
}
// SetStatus sets field value
func (o *Stack) SetStatus(v string) {
o.Status = v
}
// GetState returns the State field value
func (o *Stack) GetState() string {
if o == nil {
var ret string
return ret
}
return o.State
}
// GetStateOk returns a tuple with the State field value
// and a boolean to check if the value has been set.
func (o *Stack) GetStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.State, true
}
// SetState sets field value
func (o *Stack) SetState(v string) {
o.State = v
}
// GetExpectedStatus returns the ExpectedStatus field value
func (o *Stack) GetExpectedStatus() string {
if o == nil {
var ret string
return ret
}
return o.ExpectedStatus
}
// GetExpectedStatusOk returns a tuple with the ExpectedStatus field value
// and a boolean to check if the value has been set.
func (o *Stack) GetExpectedStatusOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ExpectedStatus, true
}
// SetExpectedStatus sets field value
func (o *Stack) SetExpectedStatus(v string) {
o.ExpectedStatus = v
}
// GetLastStateUpdate returns the LastStateUpdate field value
func (o *Stack) GetLastStateUpdate() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.LastStateUpdate
}
// GetLastStateUpdateOk returns a tuple with the LastStateUpdate field value
// and a boolean to check if the value has been set.
func (o *Stack) GetLastStateUpdateOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.LastStateUpdate, true
}
// SetLastStateUpdate sets field value
func (o *Stack) SetLastStateUpdate(v time.Time) {
o.LastStateUpdate = v
}
// GetLastExpectedStatusUpdate returns the LastExpectedStatusUpdate field value
func (o *Stack) GetLastExpectedStatusUpdate() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.LastExpectedStatusUpdate
}
// GetLastExpectedStatusUpdateOk returns a tuple with the LastExpectedStatusUpdate field value
// and a boolean to check if the value has been set.
func (o *Stack) GetLastExpectedStatusUpdateOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.LastExpectedStatusUpdate, true
}
// SetLastExpectedStatusUpdate sets field value
func (o *Stack) SetLastExpectedStatusUpdate(v time.Time) {
o.LastExpectedStatusUpdate = v
}
// GetLastStatusUpdate returns the LastStatusUpdate field value
func (o *Stack) GetLastStatusUpdate() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.LastStatusUpdate
}
// GetLastStatusUpdateOk returns a tuple with the LastStatusUpdate field value
// and a boolean to check if the value has been set.
func (o *Stack) GetLastStatusUpdateOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.LastStatusUpdate, true
}
// SetLastStatusUpdate sets field value
func (o *Stack) SetLastStatusUpdate(v time.Time) {
o.LastStatusUpdate = v
}
// GetId returns the Id field value
func (o *Stack) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *Stack) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *Stack) SetId(v string) {
o.Id = v
}
// GetOrganizationId returns the OrganizationId field value
func (o *Stack) GetOrganizationId() string {
if o == nil {
var ret string
return ret
}
return o.OrganizationId
}
// GetOrganizationIdOk returns a tuple with the OrganizationId field value
// and a boolean to check if the value has been set.
func (o *Stack) GetOrganizationIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OrganizationId, true
}
// SetOrganizationId sets field value
func (o *Stack) SetOrganizationId(v string) {
o.OrganizationId = v
}
// GetUri returns the Uri field value
func (o *Stack) GetUri() string {
if o == nil {
var ret string
return ret
}
return o.Uri
}
// GetUriOk returns a tuple with the Uri field value
// and a boolean to check if the value has been set.
func (o *Stack) GetUriOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Uri, true
}
// SetUri sets field value
func (o *Stack) SetUri(v string) {
o.Uri = v
}
// GetRegionID returns the RegionID field value
func (o *Stack) GetRegionID() string {
if o == nil {
var ret string
return ret
}
return o.RegionID
}
// GetRegionIDOk returns a tuple with the RegionID field value
// and a boolean to check if the value has been set.
func (o *Stack) GetRegionIDOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.RegionID, true
}
// SetRegionID sets field value
func (o *Stack) SetRegionID(v string) {
o.RegionID = v
}
// GetStargateEnabled returns the StargateEnabled field value
func (o *Stack) GetStargateEnabled() bool {
if o == nil {
var ret bool
return ret
}
return o.StargateEnabled
}
// GetStargateEnabledOk returns a tuple with the StargateEnabled field value
// and a boolean to check if the value has been set.
func (o *Stack) GetStargateEnabledOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.StargateEnabled, true
}
// SetStargateEnabled sets field value
func (o *Stack) SetStargateEnabled(v bool) {
o.StargateEnabled = v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Stack) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stack) GetCreatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Stack) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *Stack) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise.
func (o *Stack) GetDeletedAt() time.Time {
if o == nil || IsNil(o.DeletedAt) {
var ret time.Time
return ret
}
return *o.DeletedAt
}
// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stack) GetDeletedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.DeletedAt) {
return nil, false
}
return o.DeletedAt, true
}
// HasDeletedAt returns a boolean if a field has been set.
func (o *Stack) HasDeletedAt() bool {
if o != nil && !IsNil(o.DeletedAt) {
return true
}
return false
}
// SetDeletedAt gets a reference to the given time.Time and assigns it to the DeletedAt field.
func (o *Stack) SetDeletedAt(v time.Time) {
o.DeletedAt = &v
}
// GetDisabledAt returns the DisabledAt field value if set, zero value otherwise.
func (o *Stack) GetDisabledAt() time.Time {
if o == nil || IsNil(o.DisabledAt) {
var ret time.Time
return ret
}
return *o.DisabledAt
}
// GetDisabledAtOk returns a tuple with the DisabledAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Stack) GetDisabledAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.DisabledAt) {
return nil, false
}
return o.DisabledAt, true
}
// HasDisabledAt returns a boolean if a field has been set.
func (o *Stack) HasDisabledAt() bool {
if o != nil && !IsNil(o.DisabledAt) {
return true
}
return false
}
// SetDisabledAt gets a reference to the given time.Time and assigns it to the DisabledAt field.
func (o *Stack) SetDisabledAt(v time.Time) {
o.DisabledAt = &v
}
func (o Stack) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Stack) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
toSerialize["metadata"] = o.Metadata
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
toSerialize["status"] = o.Status
toSerialize["state"] = o.State
toSerialize["expectedStatus"] = o.ExpectedStatus
toSerialize["lastStateUpdate"] = o.LastStateUpdate
toSerialize["lastExpectedStatusUpdate"] = o.LastExpectedStatusUpdate
toSerialize["lastStatusUpdate"] = o.LastStatusUpdate
toSerialize["id"] = o.Id
toSerialize["organizationId"] = o.OrganizationId
toSerialize["uri"] = o.Uri
toSerialize["regionID"] = o.RegionID
toSerialize["stargateEnabled"] = o.StargateEnabled
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.DeletedAt) {
toSerialize["deletedAt"] = o.DeletedAt
}
if !IsNil(o.DisabledAt) {
toSerialize["disabledAt"] = o.DisabledAt
}
return toSerialize, nil
}
type NullableStack struct {
value *Stack
isSet bool
}
func (v NullableStack) Get() *Stack {
return v.value
}
func (v *NullableStack) Set(val *Stack) {
v.value = val
v.isSet = true
}
func (v NullableStack) IsSet() bool {
return v.isSet
}
func (v *NullableStack) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStack(val *Stack) *NullableStack {
return &NullableStack{value: val, isSet: true}
}
func (v NullableStack) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStack) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}