terraform-provider-stackitp.../pkg/edgebeta/model_update_instance_payload.go

178 lines
5.8 KiB
Go

/*
STACKIT Edge Cloud API
This API provides endpoints for managing STACKIT Edge Cloud instances.
API version: 1beta1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package edgebeta
import (
"encoding/json"
)
// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateInstancePayload{}
/*
types and functions for description
*/
// isNotNullableString
type UpdateInstancePayloadGetDescriptionAttributeType = *string
func getUpdateInstancePayloadGetDescriptionAttributeTypeOk(arg UpdateInstancePayloadGetDescriptionAttributeType) (ret UpdateInstancePayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateInstancePayloadGetDescriptionAttributeType(arg *UpdateInstancePayloadGetDescriptionAttributeType, val UpdateInstancePayloadGetDescriptionRetType) {
*arg = &val
}
type UpdateInstancePayloadGetDescriptionArgType = string
type UpdateInstancePayloadGetDescriptionRetType = string
/*
types and functions for planId
*/
// isNotNullableString
type UpdateInstancePayloadGetPlanIdAttributeType = *string
func getUpdateInstancePayloadGetPlanIdAttributeTypeOk(arg UpdateInstancePayloadGetPlanIdAttributeType) (ret UpdateInstancePayloadGetPlanIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateInstancePayloadGetPlanIdAttributeType(arg *UpdateInstancePayloadGetPlanIdAttributeType, val UpdateInstancePayloadGetPlanIdRetType) {
*arg = &val
}
type UpdateInstancePayloadGetPlanIdArgType = string
type UpdateInstancePayloadGetPlanIdRetType = string
// UpdateInstancePayload struct for UpdateInstancePayload
type UpdateInstancePayload struct {
// A user chosen description to distinguish multiple instances.
Description UpdateInstancePayloadGetDescriptionAttributeType `json:"description,omitempty"`
// Service Plan configures the size of the Instance.
PlanId UpdateInstancePayloadGetPlanIdAttributeType `json:"planId,omitempty"`
}
// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload() *UpdateInstancePayload {
this := UpdateInstancePayload{}
return &this
}
// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload {
this := UpdateInstancePayload{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *UpdateInstancePayload) GetDescription() (res UpdateInstancePayloadGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateInstancePayload) GetDescriptionOk() (ret UpdateInstancePayloadGetDescriptionRetType, ok bool) {
return getUpdateInstancePayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *UpdateInstancePayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *UpdateInstancePayload) SetDescription(v UpdateInstancePayloadGetDescriptionRetType) {
setUpdateInstancePayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetPlanId returns the PlanId field value if set, zero value otherwise.
func (o *UpdateInstancePayload) GetPlanId() (res UpdateInstancePayloadGetPlanIdRetType) {
res, _ = o.GetPlanIdOk()
return
}
// GetPlanIdOk returns a tuple with the PlanId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateInstancePayload) GetPlanIdOk() (ret UpdateInstancePayloadGetPlanIdRetType, ok bool) {
return getUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId)
}
// HasPlanId returns a boolean if a field has been set.
func (o *UpdateInstancePayload) HasPlanId() bool {
_, ok := o.GetPlanIdOk()
return ok
}
// SetPlanId gets a reference to the given string and assigns it to the PlanId field.
func (o *UpdateInstancePayload) SetPlanId(v UpdateInstancePayloadGetPlanIdRetType) {
setUpdateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v)
}
func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateInstancePayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getUpdateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId); ok {
toSerialize["PlanId"] = val
}
return toSerialize, nil
}
type NullableUpdateInstancePayload struct {
value *UpdateInstancePayload
isSet bool
}
func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload {
return v.value
}
func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateInstancePayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateInstancePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload {
return &NullableUpdateInstancePayload{value: val, isSet: true}
}
func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}