Files
stack/components/fctl/membershipclient/model_stack_data.go

155 lines
3.6 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 StackData type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StackData{}
// StackData struct for StackData
type StackData struct {
// Stack name
Name string `json:"name"`
Metadata *map[string]string `json:"metadata,omitempty"`
}
// NewStackData instantiates a new StackData 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 NewStackData(name string) *StackData {
this := StackData{}
this.Name = name
return &this
}
// NewStackDataWithDefaults instantiates a new StackData 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 NewStackDataWithDefaults() *StackData {
this := StackData{}
return &this
}
// GetName returns the Name field value
func (o *StackData) 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 *StackData) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *StackData) SetName(v string) {
o.Name = v
}
// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *StackData) GetMetadata() map[string]string {
if o == nil || IsNil(o.Metadata) {
var ret map[string]string
return ret
}
return *o.Metadata
}
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *StackData) GetMetadataOk() (*map[string]string, bool) {
if o == nil || IsNil(o.Metadata) {
return nil, false
}
return o.Metadata, true
}
// HasMetadata returns a boolean if a field has been set.
func (o *StackData) HasMetadata() bool {
if o != nil && !IsNil(o.Metadata) {
return true
}
return false
}
// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field.
func (o *StackData) SetMetadata(v map[string]string) {
o.Metadata = &v
}
func (o StackData) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o StackData) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["name"] = o.Name
if !IsNil(o.Metadata) {
toSerialize["metadata"] = o.Metadata
}
return toSerialize, nil
}
type NullableStackData struct {
value *StackData
isSet bool
}
func (v NullableStackData) Get() *StackData {
return v.value
}
func (v *NullableStackData) Set(val *StackData) {
v.value = val
v.isSet = true
}
func (v NullableStackData) IsSet() bool {
return v.isSet
}
func (v *NullableStackData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStackData(val *StackData) *NullableStackData {
return &NullableStackData{value: val, isSet: true}
}
func (v NullableStackData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStackData) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}