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

851 lines
26 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 Volume type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Volume{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type VolumeGetAvailabilityZoneAttributeType = *string
func getVolumeGetAvailabilityZoneAttributeTypeOk(arg VolumeGetAvailabilityZoneAttributeType) (ret VolumeGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetAvailabilityZoneAttributeType(arg *VolumeGetAvailabilityZoneAttributeType, val VolumeGetAvailabilityZoneRetType) {
*arg = &val
}
type VolumeGetAvailabilityZoneArgType = string
type VolumeGetAvailabilityZoneRetType = string
/*
types and functions for bootable
*/
// isBoolean
type VolumegetBootableAttributeType = *bool
type VolumegetBootableArgType = bool
type VolumegetBootableRetType = bool
func getVolumegetBootableAttributeTypeOk(arg VolumegetBootableAttributeType) (ret VolumegetBootableRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumegetBootableAttributeType(arg *VolumegetBootableAttributeType, val VolumegetBootableRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type VolumeGetCreatedAtAttributeType = *time.Time
type VolumeGetCreatedAtArgType = time.Time
type VolumeGetCreatedAtRetType = time.Time
func getVolumeGetCreatedAtAttributeTypeOk(arg VolumeGetCreatedAtAttributeType) (ret VolumeGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetCreatedAtAttributeType(arg *VolumeGetCreatedAtAttributeType, val VolumeGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type VolumeGetDescriptionAttributeType = *string
func getVolumeGetDescriptionAttributeTypeOk(arg VolumeGetDescriptionAttributeType) (ret VolumeGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetDescriptionAttributeType(arg *VolumeGetDescriptionAttributeType, val VolumeGetDescriptionRetType) {
*arg = &val
}
type VolumeGetDescriptionArgType = string
type VolumeGetDescriptionRetType = string
/*
types and functions for encrypted
*/
// isBoolean
type VolumegetEncryptedAttributeType = *bool
type VolumegetEncryptedArgType = bool
type VolumegetEncryptedRetType = bool
func getVolumegetEncryptedAttributeTypeOk(arg VolumegetEncryptedAttributeType) (ret VolumegetEncryptedRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumegetEncryptedAttributeType(arg *VolumegetEncryptedAttributeType, val VolumegetEncryptedRetType) {
*arg = &val
}
/*
types and functions for encryptionParameters
*/
// isModel
type VolumeGetEncryptionParametersAttributeType = *VolumeEncryptionParameter
type VolumeGetEncryptionParametersArgType = VolumeEncryptionParameter
type VolumeGetEncryptionParametersRetType = VolumeEncryptionParameter
func getVolumeGetEncryptionParametersAttributeTypeOk(arg VolumeGetEncryptionParametersAttributeType) (ret VolumeGetEncryptionParametersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetEncryptionParametersAttributeType(arg *VolumeGetEncryptionParametersAttributeType, val VolumeGetEncryptionParametersRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type VolumeGetIdAttributeType = *string
func getVolumeGetIdAttributeTypeOk(arg VolumeGetIdAttributeType) (ret VolumeGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetIdAttributeType(arg *VolumeGetIdAttributeType, val VolumeGetIdRetType) {
*arg = &val
}
type VolumeGetIdArgType = string
type VolumeGetIdRetType = string
/*
types and functions for imageConfig
*/
// isModel
type VolumeGetImageConfigAttributeType = *ImageConfig
type VolumeGetImageConfigArgType = ImageConfig
type VolumeGetImageConfigRetType = ImageConfig
func getVolumeGetImageConfigAttributeTypeOk(arg VolumeGetImageConfigAttributeType) (ret VolumeGetImageConfigRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetImageConfigAttributeType(arg *VolumeGetImageConfigAttributeType, val VolumeGetImageConfigRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isFreeform
type VolumeGetLabelsAttributeType = *map[string]interface{}
type VolumeGetLabelsArgType = map[string]interface{}
type VolumeGetLabelsRetType = map[string]interface{}
func getVolumeGetLabelsAttributeTypeOk(arg VolumeGetLabelsAttributeType) (ret VolumeGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetLabelsAttributeType(arg *VolumeGetLabelsAttributeType, val VolumeGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type VolumeGetNameAttributeType = *string
func getVolumeGetNameAttributeTypeOk(arg VolumeGetNameAttributeType) (ret VolumeGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetNameAttributeType(arg *VolumeGetNameAttributeType, val VolumeGetNameRetType) {
*arg = &val
}
type VolumeGetNameArgType = string
type VolumeGetNameRetType = string
/*
types and functions for performanceClass
*/
// isNotNullableString
type VolumeGetPerformanceClassAttributeType = *string
func getVolumeGetPerformanceClassAttributeTypeOk(arg VolumeGetPerformanceClassAttributeType) (ret VolumeGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetPerformanceClassAttributeType(arg *VolumeGetPerformanceClassAttributeType, val VolumeGetPerformanceClassRetType) {
*arg = &val
}
type VolumeGetPerformanceClassArgType = string
type VolumeGetPerformanceClassRetType = string
/*
types and functions for serverId
*/
// isNotNullableString
type VolumeGetServerIdAttributeType = *string
func getVolumeGetServerIdAttributeTypeOk(arg VolumeGetServerIdAttributeType) (ret VolumeGetServerIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetServerIdAttributeType(arg *VolumeGetServerIdAttributeType, val VolumeGetServerIdRetType) {
*arg = &val
}
type VolumeGetServerIdArgType = string
type VolumeGetServerIdRetType = string
/*
types and functions for size
*/
// isLong
type VolumeGetSizeAttributeType = *int64
type VolumeGetSizeArgType = int64
type VolumeGetSizeRetType = int64
func getVolumeGetSizeAttributeTypeOk(arg VolumeGetSizeAttributeType) (ret VolumeGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetSizeAttributeType(arg *VolumeGetSizeAttributeType, val VolumeGetSizeRetType) {
*arg = &val
}
/*
types and functions for source
*/
// isModel
type VolumeGetSourceAttributeType = *VolumeSource
type VolumeGetSourceArgType = VolumeSource
type VolumeGetSourceRetType = VolumeSource
func getVolumeGetSourceAttributeTypeOk(arg VolumeGetSourceAttributeType) (ret VolumeGetSourceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetSourceAttributeType(arg *VolumeGetSourceAttributeType, val VolumeGetSourceRetType) {
*arg = &val
}
/*
types and functions for status
*/
// isNotNullableString
type VolumeGetStatusAttributeType = *string
func getVolumeGetStatusAttributeTypeOk(arg VolumeGetStatusAttributeType) (ret VolumeGetStatusRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetStatusAttributeType(arg *VolumeGetStatusAttributeType, val VolumeGetStatusRetType) {
*arg = &val
}
type VolumeGetStatusArgType = string
type VolumeGetStatusRetType = string
/*
types and functions for updatedAt
*/
// isDateTime
type VolumeGetUpdatedAtAttributeType = *time.Time
type VolumeGetUpdatedAtArgType = time.Time
type VolumeGetUpdatedAtRetType = time.Time
func getVolumeGetUpdatedAtAttributeTypeOk(arg VolumeGetUpdatedAtAttributeType) (ret VolumeGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setVolumeGetUpdatedAtAttributeType(arg *VolumeGetUpdatedAtAttributeType, val VolumeGetUpdatedAtRetType) {
*arg = &val
}
// Volume Object that represents a volume and its parameters. Volumes sized up to 16000GB are supported.
type Volume struct {
// Object that represents an availability zone.
// REQUIRED
AvailabilityZone VolumeGetAvailabilityZoneAttributeType `json:"availabilityZone" required:"true"`
// Indicates if a volume is bootable.
Bootable VolumegetBootableAttributeType `json:"bootable,omitempty"`
// Date-time when resource was created.
CreatedAt VolumeGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Description Object. Allows string up to 255 Characters.
Description VolumeGetDescriptionAttributeType `json:"description,omitempty"`
// Indicates if a volume is encrypted.
Encrypted VolumegetEncryptedAttributeType `json:"encrypted,omitempty"`
EncryptionParameters VolumeGetEncryptionParametersAttributeType `json:"encryptionParameters,omitempty"`
// Universally Unique Identifier (UUID).
Id VolumeGetIdAttributeType `json:"id,omitempty"`
ImageConfig VolumeGetImageConfigAttributeType `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 VolumeGetLabelsAttributeType `json:"labels,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
Name VolumeGetNameAttributeType `json:"name,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
PerformanceClass VolumeGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Universally Unique Identifier (UUID).
ServerId VolumeGetServerIdAttributeType `json:"serverId,omitempty"`
// Size in Gigabyte.
Size VolumeGetSizeAttributeType `json:"size,omitempty"`
Source VolumeGetSourceAttributeType `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 VolumeGetStatusAttributeType `json:"status,omitempty"`
// Date-time when resource was last updated.
UpdatedAt VolumeGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _Volume Volume
// NewVolume instantiates a new Volume 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 NewVolume(availabilityZone VolumeGetAvailabilityZoneArgType) *Volume {
this := Volume{}
setVolumeGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone)
return &this
}
// NewVolumeWithDefaults instantiates a new Volume 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 NewVolumeWithDefaults() *Volume {
this := Volume{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value
func (o *Volume) GetAvailabilityZone() (ret VolumeGetAvailabilityZoneRetType) {
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 *Volume) GetAvailabilityZoneOk() (ret VolumeGetAvailabilityZoneRetType, ok bool) {
return getVolumeGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// SetAvailabilityZone sets field value
func (o *Volume) SetAvailabilityZone(v VolumeGetAvailabilityZoneRetType) {
setVolumeGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetBootable returns the Bootable field value if set, zero value otherwise.
func (o *Volume) GetBootable() (res VolumegetBootableRetType) {
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 *Volume) GetBootableOk() (ret VolumegetBootableRetType, ok bool) {
return getVolumegetBootableAttributeTypeOk(o.Bootable)
}
// HasBootable returns a boolean if a field has been set.
func (o *Volume) HasBootable() bool {
_, ok := o.GetBootableOk()
return ok
}
// SetBootable gets a reference to the given bool and assigns it to the Bootable field.
func (o *Volume) SetBootable(v VolumegetBootableRetType) {
setVolumegetBootableAttributeType(&o.Bootable, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Volume) GetCreatedAt() (res VolumeGetCreatedAtRetType) {
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 *Volume) GetCreatedAtOk() (ret VolumeGetCreatedAtRetType, ok bool) {
return getVolumeGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Volume) 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 *Volume) SetCreatedAt(v VolumeGetCreatedAtRetType) {
setVolumeGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Volume) GetDescription() (res VolumeGetDescriptionRetType) {
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 *Volume) GetDescriptionOk() (ret VolumeGetDescriptionRetType, ok bool) {
return getVolumeGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *Volume) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Volume) SetDescription(v VolumeGetDescriptionRetType) {
setVolumeGetDescriptionAttributeType(&o.Description, v)
}
// GetEncrypted returns the Encrypted field value if set, zero value otherwise.
func (o *Volume) GetEncrypted() (res VolumegetEncryptedRetType) {
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 *Volume) GetEncryptedOk() (ret VolumegetEncryptedRetType, ok bool) {
return getVolumegetEncryptedAttributeTypeOk(o.Encrypted)
}
// HasEncrypted returns a boolean if a field has been set.
func (o *Volume) HasEncrypted() bool {
_, ok := o.GetEncryptedOk()
return ok
}
// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field.
func (o *Volume) SetEncrypted(v VolumegetEncryptedRetType) {
setVolumegetEncryptedAttributeType(&o.Encrypted, v)
}
// GetEncryptionParameters returns the EncryptionParameters field value if set, zero value otherwise.
func (o *Volume) GetEncryptionParameters() (res VolumeGetEncryptionParametersRetType) {
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 *Volume) GetEncryptionParametersOk() (ret VolumeGetEncryptionParametersRetType, ok bool) {
return getVolumeGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters)
}
// HasEncryptionParameters returns a boolean if a field has been set.
func (o *Volume) HasEncryptionParameters() bool {
_, ok := o.GetEncryptionParametersOk()
return ok
}
// SetEncryptionParameters gets a reference to the given VolumeEncryptionParameter and assigns it to the EncryptionParameters field.
func (o *Volume) SetEncryptionParameters(v VolumeGetEncryptionParametersRetType) {
setVolumeGetEncryptionParametersAttributeType(&o.EncryptionParameters, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Volume) GetId() (res VolumeGetIdRetType) {
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 *Volume) GetIdOk() (ret VolumeGetIdRetType, ok bool) {
return getVolumeGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *Volume) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Volume) SetId(v VolumeGetIdRetType) {
setVolumeGetIdAttributeType(&o.Id, v)
}
// GetImageConfig returns the ImageConfig field value if set, zero value otherwise.
func (o *Volume) GetImageConfig() (res VolumeGetImageConfigRetType) {
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 *Volume) GetImageConfigOk() (ret VolumeGetImageConfigRetType, ok bool) {
return getVolumeGetImageConfigAttributeTypeOk(o.ImageConfig)
}
// HasImageConfig returns a boolean if a field has been set.
func (o *Volume) HasImageConfig() bool {
_, ok := o.GetImageConfigOk()
return ok
}
// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field.
func (o *Volume) SetImageConfig(v VolumeGetImageConfigRetType) {
setVolumeGetImageConfigAttributeType(&o.ImageConfig, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *Volume) GetLabels() (res VolumeGetLabelsRetType) {
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 *Volume) GetLabelsOk() (ret VolumeGetLabelsRetType, ok bool) {
return getVolumeGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *Volume) 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 *Volume) SetLabels(v VolumeGetLabelsRetType) {
setVolumeGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Volume) GetName() (res VolumeGetNameRetType) {
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 *Volume) GetNameOk() (ret VolumeGetNameRetType, ok bool) {
return getVolumeGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *Volume) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Volume) SetName(v VolumeGetNameRetType) {
setVolumeGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *Volume) GetPerformanceClass() (res VolumeGetPerformanceClassRetType) {
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 *Volume) GetPerformanceClassOk() (ret VolumeGetPerformanceClassRetType, ok bool) {
return getVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *Volume) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
func (o *Volume) SetPerformanceClass(v VolumeGetPerformanceClassRetType) {
setVolumeGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetServerId returns the ServerId field value if set, zero value otherwise.
func (o *Volume) GetServerId() (res VolumeGetServerIdRetType) {
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 *Volume) GetServerIdOk() (ret VolumeGetServerIdRetType, ok bool) {
return getVolumeGetServerIdAttributeTypeOk(o.ServerId)
}
// HasServerId returns a boolean if a field has been set.
func (o *Volume) HasServerId() bool {
_, ok := o.GetServerIdOk()
return ok
}
// SetServerId gets a reference to the given string and assigns it to the ServerId field.
func (o *Volume) SetServerId(v VolumeGetServerIdRetType) {
setVolumeGetServerIdAttributeType(&o.ServerId, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *Volume) GetSize() (res VolumeGetSizeRetType) {
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 *Volume) GetSizeOk() (ret VolumeGetSizeRetType, ok bool) {
return getVolumeGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *Volume) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *Volume) SetSize(v VolumeGetSizeRetType) {
setVolumeGetSizeAttributeType(&o.Size, v)
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *Volume) GetSource() (res VolumeGetSourceRetType) {
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 *Volume) GetSourceOk() (ret VolumeGetSourceRetType, ok bool) {
return getVolumeGetSourceAttributeTypeOk(o.Source)
}
// HasSource returns a boolean if a field has been set.
func (o *Volume) HasSource() bool {
_, ok := o.GetSourceOk()
return ok
}
// SetSource gets a reference to the given VolumeSource and assigns it to the Source field.
func (o *Volume) SetSource(v VolumeGetSourceRetType) {
setVolumeGetSourceAttributeType(&o.Source, v)
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *Volume) GetStatus() (res VolumeGetStatusRetType) {
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 *Volume) GetStatusOk() (ret VolumeGetStatusRetType, ok bool) {
return getVolumeGetStatusAttributeTypeOk(o.Status)
}
// HasStatus returns a boolean if a field has been set.
func (o *Volume) HasStatus() bool {
_, ok := o.GetStatusOk()
return ok
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *Volume) SetStatus(v VolumeGetStatusRetType) {
setVolumeGetStatusAttributeType(&o.Status, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *Volume) GetUpdatedAt() (res VolumeGetUpdatedAtRetType) {
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 *Volume) GetUpdatedAtOk() (ret VolumeGetUpdatedAtRetType, ok bool) {
return getVolumeGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *Volume) 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 *Volume) SetUpdatedAt(v VolumeGetUpdatedAtRetType) {
setVolumeGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o Volume) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getVolumeGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getVolumegetBootableAttributeTypeOk(o.Bootable); ok {
toSerialize["Bootable"] = val
}
if val, ok := getVolumeGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getVolumeGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getVolumegetEncryptedAttributeTypeOk(o.Encrypted); ok {
toSerialize["Encrypted"] = val
}
if val, ok := getVolumeGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters); ok {
toSerialize["EncryptionParameters"] = val
}
if val, ok := getVolumeGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getVolumeGetImageConfigAttributeTypeOk(o.ImageConfig); ok {
toSerialize["ImageConfig"] = val
}
if val, ok := getVolumeGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getVolumeGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getVolumeGetServerIdAttributeTypeOk(o.ServerId); ok {
toSerialize["ServerId"] = val
}
if val, ok := getVolumeGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
if val, ok := getVolumeGetSourceAttributeTypeOk(o.Source); ok {
toSerialize["Source"] = val
}
if val, ok := getVolumeGetStatusAttributeTypeOk(o.Status); ok {
toSerialize["Status"] = val
}
if val, ok := getVolumeGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableVolume struct {
value *Volume
isSet bool
}
func (v NullableVolume) Get() *Volume {
return v.value
}
func (v *NullableVolume) Set(val *Volume) {
v.value = val
v.isSet = true
}
func (v NullableVolume) IsSet() bool {
return v.isSet
}
func (v *NullableVolume) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableVolume(val *Volume) *NullableVolume {
return &NullableVolume{value: val, isSet: true}
}
func (v NullableVolume) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableVolume) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}