320 lines
11 KiB
Go
320 lines
11 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 VolumePerformanceClass type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &VolumePerformanceClass{}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type VolumePerformanceClassGetDescriptionAttributeType = *string
|
|
|
|
func getVolumePerformanceClassGetDescriptionAttributeTypeOk(arg VolumePerformanceClassGetDescriptionAttributeType) (ret VolumePerformanceClassGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumePerformanceClassGetDescriptionAttributeType(arg *VolumePerformanceClassGetDescriptionAttributeType, val VolumePerformanceClassGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type VolumePerformanceClassGetDescriptionArgType = string
|
|
type VolumePerformanceClassGetDescriptionRetType = string
|
|
|
|
/*
|
|
types and functions for iops
|
|
*/
|
|
|
|
// isLong
|
|
type VolumePerformanceClassGetIopsAttributeType = *int64
|
|
type VolumePerformanceClassGetIopsArgType = int64
|
|
type VolumePerformanceClassGetIopsRetType = int64
|
|
|
|
func getVolumePerformanceClassGetIopsAttributeTypeOk(arg VolumePerformanceClassGetIopsAttributeType) (ret VolumePerformanceClassGetIopsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumePerformanceClassGetIopsAttributeType(arg *VolumePerformanceClassGetIopsAttributeType, val VolumePerformanceClassGetIopsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for labels
|
|
*/
|
|
|
|
// isFreeform
|
|
type VolumePerformanceClassGetLabelsAttributeType = *map[string]interface{}
|
|
type VolumePerformanceClassGetLabelsArgType = map[string]interface{}
|
|
type VolumePerformanceClassGetLabelsRetType = map[string]interface{}
|
|
|
|
func getVolumePerformanceClassGetLabelsAttributeTypeOk(arg VolumePerformanceClassGetLabelsAttributeType) (ret VolumePerformanceClassGetLabelsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumePerformanceClassGetLabelsAttributeType(arg *VolumePerformanceClassGetLabelsAttributeType, val VolumePerformanceClassGetLabelsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type VolumePerformanceClassGetNameAttributeType = *string
|
|
|
|
func getVolumePerformanceClassGetNameAttributeTypeOk(arg VolumePerformanceClassGetNameAttributeType) (ret VolumePerformanceClassGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumePerformanceClassGetNameAttributeType(arg *VolumePerformanceClassGetNameAttributeType, val VolumePerformanceClassGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type VolumePerformanceClassGetNameArgType = string
|
|
type VolumePerformanceClassGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for throughput
|
|
*/
|
|
|
|
// isLong
|
|
type VolumePerformanceClassGetThroughputAttributeType = *int64
|
|
type VolumePerformanceClassGetThroughputArgType = int64
|
|
type VolumePerformanceClassGetThroughputRetType = int64
|
|
|
|
func getVolumePerformanceClassGetThroughputAttributeTypeOk(arg VolumePerformanceClassGetThroughputAttributeType) (ret VolumePerformanceClassGetThroughputRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setVolumePerformanceClassGetThroughputAttributeType(arg *VolumePerformanceClassGetThroughputAttributeType, val VolumePerformanceClassGetThroughputRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// VolumePerformanceClass Object that represents a Volume performance class.
|
|
type VolumePerformanceClass struct {
|
|
// Description Object. Allows string up to 255 Characters.
|
|
Description VolumePerformanceClassGetDescriptionAttributeType `json:"description,omitempty"`
|
|
// Input/Output Operations per second.
|
|
Iops VolumePerformanceClassGetIopsAttributeType `json:"iops,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 VolumePerformanceClassGetLabelsAttributeType `json:"labels,omitempty"`
|
|
// The name for a General Object. Matches Names and also UUIDs.
|
|
// REQUIRED
|
|
Name VolumePerformanceClassGetNameAttributeType `json:"name" required:"true"`
|
|
// Throughput in Megabyte per second.
|
|
Throughput VolumePerformanceClassGetThroughputAttributeType `json:"throughput,omitempty"`
|
|
}
|
|
|
|
type _VolumePerformanceClass VolumePerformanceClass
|
|
|
|
// NewVolumePerformanceClass instantiates a new VolumePerformanceClass 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 NewVolumePerformanceClass(name VolumePerformanceClassGetNameArgType) *VolumePerformanceClass {
|
|
this := VolumePerformanceClass{}
|
|
setVolumePerformanceClassGetNameAttributeType(&this.Name, name)
|
|
return &this
|
|
}
|
|
|
|
// NewVolumePerformanceClassWithDefaults instantiates a new VolumePerformanceClass 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 NewVolumePerformanceClassWithDefaults() *VolumePerformanceClass {
|
|
this := VolumePerformanceClass{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *VolumePerformanceClass) GetDescription() (res VolumePerformanceClassGetDescriptionRetType) {
|
|
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 *VolumePerformanceClass) GetDescriptionOk() (ret VolumePerformanceClassGetDescriptionRetType, ok bool) {
|
|
return getVolumePerformanceClassGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *VolumePerformanceClass) HasDescription() bool {
|
|
_, ok := o.GetDescriptionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *VolumePerformanceClass) SetDescription(v VolumePerformanceClassGetDescriptionRetType) {
|
|
setVolumePerformanceClassGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetIops returns the Iops field value if set, zero value otherwise.
|
|
func (o *VolumePerformanceClass) GetIops() (res VolumePerformanceClassGetIopsRetType) {
|
|
res, _ = o.GetIopsOk()
|
|
return
|
|
}
|
|
|
|
// GetIopsOk returns a tuple with the Iops field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumePerformanceClass) GetIopsOk() (ret VolumePerformanceClassGetIopsRetType, ok bool) {
|
|
return getVolumePerformanceClassGetIopsAttributeTypeOk(o.Iops)
|
|
}
|
|
|
|
// HasIops returns a boolean if a field has been set.
|
|
func (o *VolumePerformanceClass) HasIops() bool {
|
|
_, ok := o.GetIopsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIops gets a reference to the given int64 and assigns it to the Iops field.
|
|
func (o *VolumePerformanceClass) SetIops(v VolumePerformanceClassGetIopsRetType) {
|
|
setVolumePerformanceClassGetIopsAttributeType(&o.Iops, v)
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *VolumePerformanceClass) GetLabels() (res VolumePerformanceClassGetLabelsRetType) {
|
|
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 *VolumePerformanceClass) GetLabelsOk() (ret VolumePerformanceClassGetLabelsRetType, ok bool) {
|
|
return getVolumePerformanceClassGetLabelsAttributeTypeOk(o.Labels)
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *VolumePerformanceClass) 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 *VolumePerformanceClass) SetLabels(v VolumePerformanceClassGetLabelsRetType) {
|
|
setVolumePerformanceClassGetLabelsAttributeType(&o.Labels, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *VolumePerformanceClass) GetName() (ret VolumePerformanceClassGetNameRetType) {
|
|
ret, _ = o.GetNameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumePerformanceClass) GetNameOk() (ret VolumePerformanceClassGetNameRetType, ok bool) {
|
|
return getVolumePerformanceClassGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *VolumePerformanceClass) SetName(v VolumePerformanceClassGetNameRetType) {
|
|
setVolumePerformanceClassGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetThroughput returns the Throughput field value if set, zero value otherwise.
|
|
func (o *VolumePerformanceClass) GetThroughput() (res VolumePerformanceClassGetThroughputRetType) {
|
|
res, _ = o.GetThroughputOk()
|
|
return
|
|
}
|
|
|
|
// GetThroughputOk returns a tuple with the Throughput field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VolumePerformanceClass) GetThroughputOk() (ret VolumePerformanceClassGetThroughputRetType, ok bool) {
|
|
return getVolumePerformanceClassGetThroughputAttributeTypeOk(o.Throughput)
|
|
}
|
|
|
|
// HasThroughput returns a boolean if a field has been set.
|
|
func (o *VolumePerformanceClass) HasThroughput() bool {
|
|
_, ok := o.GetThroughputOk()
|
|
return ok
|
|
}
|
|
|
|
// SetThroughput gets a reference to the given int64 and assigns it to the Throughput field.
|
|
func (o *VolumePerformanceClass) SetThroughput(v VolumePerformanceClassGetThroughputRetType) {
|
|
setVolumePerformanceClassGetThroughputAttributeType(&o.Throughput, v)
|
|
}
|
|
|
|
func (o VolumePerformanceClass) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getVolumePerformanceClassGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getVolumePerformanceClassGetIopsAttributeTypeOk(o.Iops); ok {
|
|
toSerialize["Iops"] = val
|
|
}
|
|
if val, ok := getVolumePerformanceClassGetLabelsAttributeTypeOk(o.Labels); ok {
|
|
toSerialize["Labels"] = val
|
|
}
|
|
if val, ok := getVolumePerformanceClassGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getVolumePerformanceClassGetThroughputAttributeTypeOk(o.Throughput); ok {
|
|
toSerialize["Throughput"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableVolumePerformanceClass struct {
|
|
value *VolumePerformanceClass
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableVolumePerformanceClass) Get() *VolumePerformanceClass {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableVolumePerformanceClass) Set(val *VolumePerformanceClass) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableVolumePerformanceClass) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableVolumePerformanceClass) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableVolumePerformanceClass(val *VolumePerformanceClass) *NullableVolumePerformanceClass {
|
|
return &NullableVolumePerformanceClass{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableVolumePerformanceClass) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableVolumePerformanceClass) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|