/* 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 CreateInstancePayload type satisfies the MappedNullable interface at compile time var _ MappedNullable = &CreateInstancePayload{} /* types and functions for description */ // isNotNullableString type CreateInstancePayloadGetDescriptionAttributeType = *string func getCreateInstancePayloadGetDescriptionAttributeTypeOk(arg CreateInstancePayloadGetDescriptionAttributeType) (ret CreateInstancePayloadGetDescriptionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateInstancePayloadGetDescriptionAttributeType(arg *CreateInstancePayloadGetDescriptionAttributeType, val CreateInstancePayloadGetDescriptionRetType) { *arg = &val } type CreateInstancePayloadGetDescriptionArgType = string type CreateInstancePayloadGetDescriptionRetType = string /* types and functions for displayName */ // isNotNullableString type CreateInstancePayloadGetDisplayNameAttributeType = *string func getCreateInstancePayloadGetDisplayNameAttributeTypeOk(arg CreateInstancePayloadGetDisplayNameAttributeType) (ret CreateInstancePayloadGetDisplayNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateInstancePayloadGetDisplayNameAttributeType(arg *CreateInstancePayloadGetDisplayNameAttributeType, val CreateInstancePayloadGetDisplayNameRetType) { *arg = &val } type CreateInstancePayloadGetDisplayNameArgType = string type CreateInstancePayloadGetDisplayNameRetType = string /* types and functions for planId */ // isNotNullableString type CreateInstancePayloadGetPlanIdAttributeType = *string func getCreateInstancePayloadGetPlanIdAttributeTypeOk(arg CreateInstancePayloadGetPlanIdAttributeType) (ret CreateInstancePayloadGetPlanIdRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setCreateInstancePayloadGetPlanIdAttributeType(arg *CreateInstancePayloadGetPlanIdAttributeType, val CreateInstancePayloadGetPlanIdRetType) { *arg = &val } type CreateInstancePayloadGetPlanIdArgType = string type CreateInstancePayloadGetPlanIdRetType = string // CreateInstancePayload struct for CreateInstancePayload type CreateInstancePayload struct { // A user chosen description to distinguish multiple instances. Description CreateInstancePayloadGetDescriptionAttributeType `json:"description,omitempty"` // The displayed name to distinguish multiple instances. // REQUIRED DisplayName CreateInstancePayloadGetDisplayNameAttributeType `json:"displayName" required:"true"` // Service Plan configures the size of the Instance. // REQUIRED PlanId CreateInstancePayloadGetPlanIdAttributeType `json:"planId" required:"true"` } type _CreateInstancePayload CreateInstancePayload // NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(displayName CreateInstancePayloadGetDisplayNameArgType, planId CreateInstancePayloadGetPlanIdArgType) *CreateInstancePayload { this := CreateInstancePayload{} setCreateInstancePayloadGetDisplayNameAttributeType(&this.DisplayName, displayName) setCreateInstancePayloadGetPlanIdAttributeType(&this.PlanId, planId) return &this } // NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { this := CreateInstancePayload{} return &this } // GetDescription returns the Description field value if set, zero value otherwise. func (o *CreateInstancePayload) GetDescription() (res CreateInstancePayloadGetDescriptionRetType) { 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 *CreateInstancePayload) GetDescriptionOk() (ret CreateInstancePayloadGetDescriptionRetType, ok bool) { return getCreateInstancePayloadGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. func (o *CreateInstancePayload) HasDescription() bool { _, ok := o.GetDescriptionOk() return ok } // SetDescription gets a reference to the given string and assigns it to the Description field. func (o *CreateInstancePayload) SetDescription(v CreateInstancePayloadGetDescriptionRetType) { setCreateInstancePayloadGetDescriptionAttributeType(&o.Description, v) } // GetDisplayName returns the DisplayName field value func (o *CreateInstancePayload) GetDisplayName() (ret CreateInstancePayloadGetDisplayNameRetType) { ret, _ = o.GetDisplayNameOk() return ret } // GetDisplayNameOk returns a tuple with the DisplayName field value // and a boolean to check if the value has been set. func (o *CreateInstancePayload) GetDisplayNameOk() (ret CreateInstancePayloadGetDisplayNameRetType, ok bool) { return getCreateInstancePayloadGetDisplayNameAttributeTypeOk(o.DisplayName) } // SetDisplayName sets field value func (o *CreateInstancePayload) SetDisplayName(v CreateInstancePayloadGetDisplayNameRetType) { setCreateInstancePayloadGetDisplayNameAttributeType(&o.DisplayName, v) } // GetPlanId returns the PlanId field value func (o *CreateInstancePayload) GetPlanId() (ret CreateInstancePayloadGetPlanIdRetType) { ret, _ = o.GetPlanIdOk() return ret } // GetPlanIdOk returns a tuple with the PlanId field value // and a boolean to check if the value has been set. func (o *CreateInstancePayload) GetPlanIdOk() (ret CreateInstancePayloadGetPlanIdRetType, ok bool) { return getCreateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId) } // SetPlanId sets field value func (o *CreateInstancePayload) SetPlanId(v CreateInstancePayloadGetPlanIdRetType) { setCreateInstancePayloadGetPlanIdAttributeType(&o.PlanId, v) } func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstancePayloadGetDescriptionAttributeTypeOk(o.Description); ok { toSerialize["Description"] = val } if val, ok := getCreateInstancePayloadGetDisplayNameAttributeTypeOk(o.DisplayName); ok { toSerialize["DisplayName"] = val } if val, ok := getCreateInstancePayloadGetPlanIdAttributeTypeOk(o.PlanId); ok { toSerialize["PlanId"] = val } return toSerialize, nil } type NullableCreateInstancePayload struct { value *CreateInstancePayload isSet bool } func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { return v.value } func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { v.value = val v.isSet = true } func (v NullableCreateInstancePayload) IsSet() bool { return v.isSet } func (v *NullableCreateInstancePayload) Unset() { v.value = nil v.isSet = false } func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { return &NullableCreateInstancePayload{value: val, isSet: true} } func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }