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

851 lines
31 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"
"time"
)
// checks if the CreateVolumePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateVolumePayload{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type CreateVolumePayloadGetAvailabilityZoneAttributeType = *string
func getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(arg CreateVolumePayloadGetAvailabilityZoneAttributeType) (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetAvailabilityZoneAttributeType(arg *CreateVolumePayloadGetAvailabilityZoneAttributeType, val CreateVolumePayloadGetAvailabilityZoneRetType) {
*arg = &val
}
type CreateVolumePayloadGetAvailabilityZoneArgType = string
type CreateVolumePayloadGetAvailabilityZoneRetType = string
/*
types and functions for bootable
*/
// isBoolean
type CreateVolumePayloadgetBootableAttributeType = *bool
type CreateVolumePayloadgetBootableArgType = bool
type CreateVolumePayloadgetBootableRetType = bool
func getCreateVolumePayloadgetBootableAttributeTypeOk(arg CreateVolumePayloadgetBootableAttributeType) (ret CreateVolumePayloadgetBootableRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadgetBootableAttributeType(arg *CreateVolumePayloadgetBootableAttributeType, val CreateVolumePayloadgetBootableRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type CreateVolumePayloadGetCreatedAtAttributeType = *time.Time
type CreateVolumePayloadGetCreatedAtArgType = time.Time
type CreateVolumePayloadGetCreatedAtRetType = time.Time
func getCreateVolumePayloadGetCreatedAtAttributeTypeOk(arg CreateVolumePayloadGetCreatedAtAttributeType) (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetCreatedAtAttributeType(arg *CreateVolumePayloadGetCreatedAtAttributeType, val CreateVolumePayloadGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type CreateVolumePayloadGetDescriptionAttributeType = *string
func getCreateVolumePayloadGetDescriptionAttributeTypeOk(arg CreateVolumePayloadGetDescriptionAttributeType) (ret CreateVolumePayloadGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetDescriptionAttributeType(arg *CreateVolumePayloadGetDescriptionAttributeType, val CreateVolumePayloadGetDescriptionRetType) {
*arg = &val
}
type CreateVolumePayloadGetDescriptionArgType = string
type CreateVolumePayloadGetDescriptionRetType = string
/*
types and functions for encrypted
*/
// isBoolean
type CreateVolumePayloadgetEncryptedAttributeType = *bool
type CreateVolumePayloadgetEncryptedArgType = bool
type CreateVolumePayloadgetEncryptedRetType = bool
func getCreateVolumePayloadgetEncryptedAttributeTypeOk(arg CreateVolumePayloadgetEncryptedAttributeType) (ret CreateVolumePayloadgetEncryptedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadgetEncryptedAttributeType(arg *CreateVolumePayloadgetEncryptedAttributeType, val CreateVolumePayloadgetEncryptedRetType) {
*arg = &val
}
/*
types and functions for encryptionParameters
*/
// isModel
type CreateVolumePayloadGetEncryptionParametersAttributeType = *VolumeEncryptionParameter
type CreateVolumePayloadGetEncryptionParametersArgType = VolumeEncryptionParameter
type CreateVolumePayloadGetEncryptionParametersRetType = VolumeEncryptionParameter
func getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(arg CreateVolumePayloadGetEncryptionParametersAttributeType) (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetEncryptionParametersAttributeType(arg *CreateVolumePayloadGetEncryptionParametersAttributeType, val CreateVolumePayloadGetEncryptionParametersRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type CreateVolumePayloadGetIdAttributeType = *string
func getCreateVolumePayloadGetIdAttributeTypeOk(arg CreateVolumePayloadGetIdAttributeType) (ret CreateVolumePayloadGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetIdAttributeType(arg *CreateVolumePayloadGetIdAttributeType, val CreateVolumePayloadGetIdRetType) {
*arg = &val
}
type CreateVolumePayloadGetIdArgType = string
type CreateVolumePayloadGetIdRetType = string
/*
types and functions for imageConfig
*/
// isModel
type CreateVolumePayloadGetImageConfigAttributeType = *ImageConfig
type CreateVolumePayloadGetImageConfigArgType = ImageConfig
type CreateVolumePayloadGetImageConfigRetType = ImageConfig
func getCreateVolumePayloadGetImageConfigAttributeTypeOk(arg CreateVolumePayloadGetImageConfigAttributeType) (ret CreateVolumePayloadGetImageConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetImageConfigAttributeType(arg *CreateVolumePayloadGetImageConfigAttributeType, val CreateVolumePayloadGetImageConfigRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type CreateVolumePayloadGetLabelsAttributeType = *map[string]interface{}
type CreateVolumePayloadGetLabelsArgType = map[string]interface{}
type CreateVolumePayloadGetLabelsRetType = map[string]interface{}
func getCreateVolumePayloadGetLabelsAttributeTypeOk(arg CreateVolumePayloadGetLabelsAttributeType) (ret CreateVolumePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetLabelsAttributeType(arg *CreateVolumePayloadGetLabelsAttributeType, val CreateVolumePayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateVolumePayloadGetNameAttributeType = *string
func getCreateVolumePayloadGetNameAttributeTypeOk(arg CreateVolumePayloadGetNameAttributeType) (ret CreateVolumePayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetNameAttributeType(arg *CreateVolumePayloadGetNameAttributeType, val CreateVolumePayloadGetNameRetType) {
*arg = &val
}
type CreateVolumePayloadGetNameArgType = string
type CreateVolumePayloadGetNameRetType = string
/*
types and functions for performanceClass
*/
// isNotNullableString
type CreateVolumePayloadGetPerformanceClassAttributeType = *string
func getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(arg CreateVolumePayloadGetPerformanceClassAttributeType) (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetPerformanceClassAttributeType(arg *CreateVolumePayloadGetPerformanceClassAttributeType, val CreateVolumePayloadGetPerformanceClassRetType) {
*arg = &val
}
type CreateVolumePayloadGetPerformanceClassArgType = string
type CreateVolumePayloadGetPerformanceClassRetType = string
/*
types and functions for serverId
*/
// isNotNullableString
type CreateVolumePayloadGetServerIdAttributeType = *string
func getCreateVolumePayloadGetServerIdAttributeTypeOk(arg CreateVolumePayloadGetServerIdAttributeType) (ret CreateVolumePayloadGetServerIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetServerIdAttributeType(arg *CreateVolumePayloadGetServerIdAttributeType, val CreateVolumePayloadGetServerIdRetType) {
*arg = &val
}
type CreateVolumePayloadGetServerIdArgType = string
type CreateVolumePayloadGetServerIdRetType = string
/*
types and functions for size
*/
// isLong
type CreateVolumePayloadGetSizeAttributeType = *int64
type CreateVolumePayloadGetSizeArgType = int64
type CreateVolumePayloadGetSizeRetType = int64
func getCreateVolumePayloadGetSizeAttributeTypeOk(arg CreateVolumePayloadGetSizeAttributeType) (ret CreateVolumePayloadGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetSizeAttributeType(arg *CreateVolumePayloadGetSizeAttributeType, val CreateVolumePayloadGetSizeRetType) {
*arg = &val
}
/*
types and functions for source
*/
// isModel
type CreateVolumePayloadGetSourceAttributeType = *VolumeSource
type CreateVolumePayloadGetSourceArgType = VolumeSource
type CreateVolumePayloadGetSourceRetType = VolumeSource
func getCreateVolumePayloadGetSourceAttributeTypeOk(arg CreateVolumePayloadGetSourceAttributeType) (ret CreateVolumePayloadGetSourceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetSourceAttributeType(arg *CreateVolumePayloadGetSourceAttributeType, val CreateVolumePayloadGetSourceRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type CreateVolumePayloadGetStatusAttributeType = *string
func getCreateVolumePayloadGetStatusAttributeTypeOk(arg CreateVolumePayloadGetStatusAttributeType) (ret CreateVolumePayloadGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetStatusAttributeType(arg *CreateVolumePayloadGetStatusAttributeType, val CreateVolumePayloadGetStatusRetType) {
*arg = &val
}
type CreateVolumePayloadGetStatusArgType = string
type CreateVolumePayloadGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type CreateVolumePayloadGetUpdatedAtAttributeType = *time.Time
type CreateVolumePayloadGetUpdatedAtArgType = time.Time
type CreateVolumePayloadGetUpdatedAtRetType = time.Time
func getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(arg CreateVolumePayloadGetUpdatedAtAttributeType) (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateVolumePayloadGetUpdatedAtAttributeType(arg *CreateVolumePayloadGetUpdatedAtAttributeType, val CreateVolumePayloadGetUpdatedAtRetType) {
*arg = &val
}
// CreateVolumePayload Object that represents a volume and its parameters. Volumes sized up to 16000GB are supported.
type CreateVolumePayload struct {
// Object that represents an availability zone.
// REQUIRED
AvailabilityZone CreateVolumePayloadGetAvailabilityZoneAttributeType `json:"availabilityZone" required:"true"`
// Indicates if a volume is bootable.
Bootable CreateVolumePayloadgetBootableAttributeType `json:"bootable,omitempty"`
// Date-time when resource was created.
CreatedAt CreateVolumePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Description Object. Allows string up to 255 Characters.
Description CreateVolumePayloadGetDescriptionAttributeType `json:"description,omitempty"`
// Indicates if a volume is encrypted.
Encrypted CreateVolumePayloadgetEncryptedAttributeType `json:"encrypted,omitempty"`
EncryptionParameters CreateVolumePayloadGetEncryptionParametersAttributeType `json:"encryptionParameters,omitempty"`
// Universally Unique Identifier (UUID).
Id CreateVolumePayloadGetIdAttributeType `json:"id,omitempty"`
ImageConfig CreateVolumePayloadGetImageConfigAttributeType `json:"imageConfig,omitempty"`
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
Labels CreateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name CreateVolumePayloadGetNameAttributeType `json:"name,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
PerformanceClass CreateVolumePayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Universally Unique Identifier (UUID).
ServerId CreateVolumePayloadGetServerIdAttributeType `json:"serverId,omitempty"`
// Size in Gigabyte.
Size CreateVolumePayloadGetSizeAttributeType `json:"size,omitempty"`
Source CreateVolumePayloadGetSourceAttributeType `json:"source,omitempty"`
// The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`.
Status CreateVolumePayloadGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt CreateVolumePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _CreateVolumePayload CreateVolumePayload
// NewCreateVolumePayload instantiates a new CreateVolumePayload 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 NewCreateVolumePayload(availabilityZone CreateVolumePayloadGetAvailabilityZoneArgType) *CreateVolumePayload {
this := CreateVolumePayload{}
setCreateVolumePayloadGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone)
return &this
}
// NewCreateVolumePayloadWithDefaults instantiates a new CreateVolumePayload 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 NewCreateVolumePayloadWithDefaults() *CreateVolumePayload {
this := CreateVolumePayload{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value
func (o *CreateVolumePayload) GetAvailabilityZone() (ret CreateVolumePayloadGetAvailabilityZoneRetType) {
ret, _ = o.GetAvailabilityZoneOk()
return ret
}
// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetAvailabilityZoneOk() (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) {
return getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// SetAvailabilityZone sets field value
func (o *CreateVolumePayload) SetAvailabilityZone(v CreateVolumePayloadGetAvailabilityZoneRetType) {
setCreateVolumePayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetBootable returns the Bootable field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetBootable() (res CreateVolumePayloadgetBootableRetType) {
res, _ = o.GetBootableOk()
return
}
// GetBootableOk returns a tuple with the Bootable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetBootableOk() (ret CreateVolumePayloadgetBootableRetType, ok bool) {
return getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable)
}
// HasBootable returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasBootable() bool {
_, ok := o.GetBootableOk()
return ok
}
// SetBootable gets a reference to the given bool and assigns it to the Bootable field.
func (o *CreateVolumePayload) SetBootable(v CreateVolumePayloadgetBootableRetType) {
setCreateVolumePayloadgetBootableAttributeType(&o.Bootable, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetCreatedAt() (res CreateVolumePayloadGetCreatedAtRetType) {
res, _ = o.GetCreatedAtOk()
return
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetCreatedAtOk() (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) {
return getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasCreatedAt() bool {
_, ok := o.GetCreatedAtOk()
return ok
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *CreateVolumePayload) SetCreatedAt(v CreateVolumePayloadGetCreatedAtRetType) {
setCreateVolumePayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetDescription() (res CreateVolumePayloadGetDescriptionRetType) {
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 *CreateVolumePayload) GetDescriptionOk() (ret CreateVolumePayloadGetDescriptionRetType, ok bool) {
return getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateVolumePayload) SetDescription(v CreateVolumePayloadGetDescriptionRetType) {
setCreateVolumePayloadGetDescriptionAttributeType(&o.Description, v)
}
// GetEncrypted returns the Encrypted field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetEncrypted() (res CreateVolumePayloadgetEncryptedRetType) {
res, _ = o.GetEncryptedOk()
return
}
// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetEncryptedOk() (ret CreateVolumePayloadgetEncryptedRetType, ok bool) {
return getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted)
}
// HasEncrypted returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasEncrypted() bool {
_, ok := o.GetEncryptedOk()
return ok
}
// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field.
func (o *CreateVolumePayload) SetEncrypted(v CreateVolumePayloadgetEncryptedRetType) {
setCreateVolumePayloadgetEncryptedAttributeType(&o.Encrypted, v)
}
// GetEncryptionParameters returns the EncryptionParameters field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetEncryptionParameters() (res CreateVolumePayloadGetEncryptionParametersRetType) {
res, _ = o.GetEncryptionParametersOk()
return
}
// GetEncryptionParametersOk returns a tuple with the EncryptionParameters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetEncryptionParametersOk() (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) {
return getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters)
}
// HasEncryptionParameters returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasEncryptionParameters() bool {
_, ok := o.GetEncryptionParametersOk()
return ok
}
// SetEncryptionParameters gets a reference to the given VolumeEncryptionParameter and assigns it to the EncryptionParameters field.
func (o *CreateVolumePayload) SetEncryptionParameters(v CreateVolumePayloadGetEncryptionParametersRetType) {
setCreateVolumePayloadGetEncryptionParametersAttributeType(&o.EncryptionParameters, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetId() (res CreateVolumePayloadGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetIdOk() (ret CreateVolumePayloadGetIdRetType, ok bool) {
return getCreateVolumePayloadGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateVolumePayload) SetId(v CreateVolumePayloadGetIdRetType) {
setCreateVolumePayloadGetIdAttributeType(&o.Id, v)
}
// GetImageConfig returns the ImageConfig field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetImageConfig() (res CreateVolumePayloadGetImageConfigRetType) {
res, _ = o.GetImageConfigOk()
return
}
// GetImageConfigOk returns a tuple with the ImageConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetImageConfigOk() (ret CreateVolumePayloadGetImageConfigRetType, ok bool) {
return getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig)
}
// HasImageConfig returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasImageConfig() bool {
_, ok := o.GetImageConfigOk()
return ok
}
// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field.
func (o *CreateVolumePayload) SetImageConfig(v CreateVolumePayloadGetImageConfigRetType) {
setCreateVolumePayloadGetImageConfigAttributeType(&o.ImageConfig, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetLabels() (res CreateVolumePayloadGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetLabelsOk() (ret CreateVolumePayloadGetLabelsRetType, ok bool) {
return getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
func (o *CreateVolumePayload) SetLabels(v CreateVolumePayloadGetLabelsRetType) {
setCreateVolumePayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetName() (res CreateVolumePayloadGetNameRetType) {
res, _ = o.GetNameOk()
return
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetNameOk() (ret CreateVolumePayloadGetNameRetType, ok bool) {
return getCreateVolumePayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateVolumePayload) SetName(v CreateVolumePayloadGetNameRetType) {
setCreateVolumePayloadGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetPerformanceClass() (res CreateVolumePayloadGetPerformanceClassRetType) {
res, _ = o.GetPerformanceClassOk()
return
}
// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetPerformanceClassOk() (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) {
return getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
func (o *CreateVolumePayload) SetPerformanceClass(v CreateVolumePayloadGetPerformanceClassRetType) {
setCreateVolumePayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetServerId returns the ServerId field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetServerId() (res CreateVolumePayloadGetServerIdRetType) {
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 *CreateVolumePayload) GetServerIdOk() (ret CreateVolumePayloadGetServerIdRetType, ok bool) {
return getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId)
}
// HasServerId returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasServerId() bool {
_, ok := o.GetServerIdOk()
return ok
}
// SetServerId gets a reference to the given string and assigns it to the ServerId field.
func (o *CreateVolumePayload) SetServerId(v CreateVolumePayloadGetServerIdRetType) {
setCreateVolumePayloadGetServerIdAttributeType(&o.ServerId, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetSize() (res CreateVolumePayloadGetSizeRetType) {
res, _ = o.GetSizeOk()
return
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetSizeOk() (ret CreateVolumePayloadGetSizeRetType, ok bool) {
return getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *CreateVolumePayload) SetSize(v CreateVolumePayloadGetSizeRetType) {
setCreateVolumePayloadGetSizeAttributeType(&o.Size, v)
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetSource() (res CreateVolumePayloadGetSourceRetType) {
res, _ = o.GetSourceOk()
return
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetSourceOk() (ret CreateVolumePayloadGetSourceRetType, ok bool) {
return getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source)
}
// HasSource returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasSource() bool {
_, ok := o.GetSourceOk()
return ok
}
// SetSource gets a reference to the given VolumeSource and assigns it to the Source field.
func (o *CreateVolumePayload) SetSource(v CreateVolumePayloadGetSourceRetType) {
setCreateVolumePayloadGetSourceAttributeType(&o.Source, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetStatus() (res CreateVolumePayloadGetStatusRetType) {
res, _ = o.GetStatusOk()
return
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetStatusOk() (ret CreateVolumePayloadGetStatusRetType, ok bool) {
return getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *CreateVolumePayload) SetStatus(v CreateVolumePayloadGetStatusRetType) {
setCreateVolumePayloadGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *CreateVolumePayload) GetUpdatedAt() (res CreateVolumePayloadGetUpdatedAtRetType) {
res, _ = o.GetUpdatedAtOk()
return
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolumePayload) GetUpdatedAtOk() (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) {
return getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *CreateVolumePayload) HasUpdatedAt() bool {
_, ok := o.GetUpdatedAtOk()
return ok
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *CreateVolumePayload) SetUpdatedAt(v CreateVolumePayloadGetUpdatedAtRetType) {
setCreateVolumePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o CreateVolumePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable); ok {
toSerialize["Bootable"] = val
}
if val, ok := getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted); ok {
toSerialize["Encrypted"] = val
}
if val, ok := getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters); ok {
toSerialize["EncryptionParameters"] = val
}
if val, ok := getCreateVolumePayloadGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig); ok {
toSerialize["ImageConfig"] = val
}
if val, ok := getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateVolumePayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId); ok {
toSerialize["ServerId"] = val
}
if val, ok := getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source); ok {
toSerialize["Source"] = val
}
if val, ok := getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableCreateVolumePayload struct {
value *CreateVolumePayload
isSet bool
}
func (v NullableCreateVolumePayload) Get() *CreateVolumePayload {
return v.value
}
func (v *NullableCreateVolumePayload) Set(val *CreateVolumePayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateVolumePayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateVolumePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateVolumePayload(val *CreateVolumePayload) *NullableCreateVolumePayload {
return &NullableCreateVolumePayload{value: val, isSet: true}
}
func (v NullableCreateVolumePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateVolumePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}