mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
210 lines
5.2 KiB
Go
210 lines
5.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"
|
|
)
|
|
|
|
// checks if the CreateStackRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateStackRequest{}
|
|
|
|
// CreateStackRequest struct for CreateStackRequest
|
|
type CreateStackRequest 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"`
|
|
RegionID string `json:"regionID"`
|
|
}
|
|
|
|
// NewCreateStackRequest instantiates a new CreateStackRequest 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 NewCreateStackRequest(name string, metadata map[string]string, regionID string) *CreateStackRequest {
|
|
this := CreateStackRequest{}
|
|
this.Name = name
|
|
this.Metadata = metadata
|
|
this.RegionID = regionID
|
|
return &this
|
|
}
|
|
|
|
// NewCreateStackRequestWithDefaults instantiates a new CreateStackRequest 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 NewCreateStackRequestWithDefaults() *CreateStackRequest {
|
|
this := CreateStackRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *CreateStackRequest) 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 *CreateStackRequest) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *CreateStackRequest) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value
|
|
func (o *CreateStackRequest) 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 *CreateStackRequest) GetMetadataOk() (*map[string]string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Metadata, true
|
|
}
|
|
|
|
// SetMetadata sets field value
|
|
func (o *CreateStackRequest) SetMetadata(v map[string]string) {
|
|
o.Metadata = v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *CreateStackRequest) 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 *CreateStackRequest) 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 *CreateStackRequest) 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 *CreateStackRequest) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetRegionID returns the RegionID field value
|
|
func (o *CreateStackRequest) 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 *CreateStackRequest) GetRegionIDOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.RegionID, true
|
|
}
|
|
|
|
// SetRegionID sets field value
|
|
func (o *CreateStackRequest) SetRegionID(v string) {
|
|
o.RegionID = v
|
|
}
|
|
|
|
func (o CreateStackRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CreateStackRequest) 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["regionID"] = o.RegionID
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreateStackRequest struct {
|
|
value *CreateStackRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreateStackRequest) Get() *CreateStackRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreateStackRequest) Set(val *CreateStackRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreateStackRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreateStackRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreateStackRequest(val *CreateStackRequest) *NullableCreateStackRequest {
|
|
return &NullableCreateStackRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreateStackRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreateStackRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|