terraform-provider-stackitp.../pkg/iaasbeta/model_update_attached_volume_payload.go
2026-01-21 09:07:29 +01:00

226 lines
8.4 KiB
Go

/*
STACKIT IaaS API
This API allows you to create and modify IaaS resources.
API version: 2beta1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package iaasbeta
import (
"encoding/json"
)
// checks if the UpdateAttachedVolumePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateAttachedVolumePayload{}
/*
types and functions for deleteOnTermination
*/
// isBoolean
type UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType = *bool
type UpdateAttachedVolumePayloadgetDeleteOnTerminationArgType = bool
type UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType = bool
func getUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeTypeOk(arg UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType) (ret UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType(arg *UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType, val UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType) {
*arg = &val
}
/*
types and functions for serverId
*/
// isNotNullableString
type UpdateAttachedVolumePayloadGetServerIdAttributeType = *string
func getUpdateAttachedVolumePayloadGetServerIdAttributeTypeOk(arg UpdateAttachedVolumePayloadGetServerIdAttributeType) (ret UpdateAttachedVolumePayloadGetServerIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateAttachedVolumePayloadGetServerIdAttributeType(arg *UpdateAttachedVolumePayloadGetServerIdAttributeType, val UpdateAttachedVolumePayloadGetServerIdRetType) {
*arg = &val
}
type UpdateAttachedVolumePayloadGetServerIdArgType = string
type UpdateAttachedVolumePayloadGetServerIdRetType = string
/*
types and functions for volumeId
*/
// isNotNullableString
type UpdateAttachedVolumePayloadGetVolumeIdAttributeType = *string
func getUpdateAttachedVolumePayloadGetVolumeIdAttributeTypeOk(arg UpdateAttachedVolumePayloadGetVolumeIdAttributeType) (ret UpdateAttachedVolumePayloadGetVolumeIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateAttachedVolumePayloadGetVolumeIdAttributeType(arg *UpdateAttachedVolumePayloadGetVolumeIdAttributeType, val UpdateAttachedVolumePayloadGetVolumeIdRetType) {
*arg = &val
}
type UpdateAttachedVolumePayloadGetVolumeIdArgType = string
type UpdateAttachedVolumePayloadGetVolumeIdRetType = string
// UpdateAttachedVolumePayload Object that represents a Volume attachment to a server.
type UpdateAttachedVolumePayload struct {
// Delete the volume during the termination of the server. Defaults to false.
DeleteOnTermination UpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"`
// Universally Unique Identifier (UUID).
ServerId UpdateAttachedVolumePayloadGetServerIdAttributeType `json:"serverId,omitempty"`
// Universally Unique Identifier (UUID).
VolumeId UpdateAttachedVolumePayloadGetVolumeIdAttributeType `json:"volumeId,omitempty"`
}
// NewUpdateAttachedVolumePayload instantiates a new UpdateAttachedVolumePayload 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 NewUpdateAttachedVolumePayload() *UpdateAttachedVolumePayload {
this := UpdateAttachedVolumePayload{}
return &this
}
// NewUpdateAttachedVolumePayloadWithDefaults instantiates a new UpdateAttachedVolumePayload 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 NewUpdateAttachedVolumePayloadWithDefaults() *UpdateAttachedVolumePayload {
this := UpdateAttachedVolumePayload{}
return &this
}
// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise.
func (o *UpdateAttachedVolumePayload) GetDeleteOnTermination() (res UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType) {
res, _ = o.GetDeleteOnTerminationOk()
return
}
// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateAttachedVolumePayload) GetDeleteOnTerminationOk() (ret UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType, ok bool) {
return getUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination)
}
// HasDeleteOnTermination returns a boolean if a field has been set.
func (o *UpdateAttachedVolumePayload) HasDeleteOnTermination() bool {
_, ok := o.GetDeleteOnTerminationOk()
return ok
}
// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field.
func (o *UpdateAttachedVolumePayload) SetDeleteOnTermination(v UpdateAttachedVolumePayloadgetDeleteOnTerminationRetType) {
setUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, v)
}
// GetServerId returns the ServerId field value if set, zero value otherwise.
func (o *UpdateAttachedVolumePayload) GetServerId() (res UpdateAttachedVolumePayloadGetServerIdRetType) {
res, _ = o.GetServerIdOk()
return
}
// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateAttachedVolumePayload) GetServerIdOk() (ret UpdateAttachedVolumePayloadGetServerIdRetType, ok bool) {
return getUpdateAttachedVolumePayloadGetServerIdAttributeTypeOk(o.ServerId)
}
// HasServerId returns a boolean if a field has been set.
func (o *UpdateAttachedVolumePayload) HasServerId() bool {
_, ok := o.GetServerIdOk()
return ok
}
// SetServerId gets a reference to the given string and assigns it to the ServerId field.
func (o *UpdateAttachedVolumePayload) SetServerId(v UpdateAttachedVolumePayloadGetServerIdRetType) {
setUpdateAttachedVolumePayloadGetServerIdAttributeType(&o.ServerId, v)
}
// GetVolumeId returns the VolumeId field value if set, zero value otherwise.
func (o *UpdateAttachedVolumePayload) GetVolumeId() (res UpdateAttachedVolumePayloadGetVolumeIdRetType) {
res, _ = o.GetVolumeIdOk()
return
}
// GetVolumeIdOk returns a tuple with the VolumeId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateAttachedVolumePayload) GetVolumeIdOk() (ret UpdateAttachedVolumePayloadGetVolumeIdRetType, ok bool) {
return getUpdateAttachedVolumePayloadGetVolumeIdAttributeTypeOk(o.VolumeId)
}
// HasVolumeId returns a boolean if a field has been set.
func (o *UpdateAttachedVolumePayload) HasVolumeId() bool {
_, ok := o.GetVolumeIdOk()
return ok
}
// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field.
func (o *UpdateAttachedVolumePayload) SetVolumeId(v UpdateAttachedVolumePayloadGetVolumeIdRetType) {
setUpdateAttachedVolumePayloadGetVolumeIdAttributeType(&o.VolumeId, v)
}
func (o UpdateAttachedVolumePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateAttachedVolumePayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok {
toSerialize["DeleteOnTermination"] = val
}
if val, ok := getUpdateAttachedVolumePayloadGetServerIdAttributeTypeOk(o.ServerId); ok {
toSerialize["ServerId"] = val
}
if val, ok := getUpdateAttachedVolumePayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok {
toSerialize["VolumeId"] = val
}
return toSerialize, nil
}
type NullableUpdateAttachedVolumePayload struct {
value *UpdateAttachedVolumePayload
isSet bool
}
func (v NullableUpdateAttachedVolumePayload) Get() *UpdateAttachedVolumePayload {
return v.value
}
func (v *NullableUpdateAttachedVolumePayload) Set(val *UpdateAttachedVolumePayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateAttachedVolumePayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateAttachedVolumePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateAttachedVolumePayload(val *UpdateAttachedVolumePayload) *NullableUpdateAttachedVolumePayload {
return &NullableUpdateAttachedVolumePayload{value: val, isSet: true}
}
func (v NullableUpdateAttachedVolumePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateAttachedVolumePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}