## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
178 lines
5.8 KiB
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)
|
|
}
|