227 lines
6.9 KiB
Go
227 lines
6.9 KiB
Go
/*
|
|
STACKIT File Storage (SFS)
|
|
|
|
API used to create and manage NFS Shares.
|
|
|
|
API version: 1beta.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package sfsbeta
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the PerformanceClass type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PerformanceClass{}
|
|
|
|
/*
|
|
types and functions for iops
|
|
*/
|
|
|
|
// isInteger
|
|
type PerformanceClassGetIopsAttributeType = *int64
|
|
type PerformanceClassGetIopsArgType = int64
|
|
type PerformanceClassGetIopsRetType = int64
|
|
|
|
func getPerformanceClassGetIopsAttributeTypeOk(arg PerformanceClassGetIopsAttributeType) (ret PerformanceClassGetIopsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPerformanceClassGetIopsAttributeType(arg *PerformanceClassGetIopsAttributeType, val PerformanceClassGetIopsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PerformanceClassGetNameAttributeType = *string
|
|
|
|
func getPerformanceClassGetNameAttributeTypeOk(arg PerformanceClassGetNameAttributeType) (ret PerformanceClassGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPerformanceClassGetNameAttributeType(arg *PerformanceClassGetNameAttributeType, val PerformanceClassGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PerformanceClassGetNameArgType = string
|
|
type PerformanceClassGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for throughput
|
|
*/
|
|
|
|
// isInteger
|
|
type PerformanceClassGetThroughputAttributeType = *int64
|
|
type PerformanceClassGetThroughputArgType = int64
|
|
type PerformanceClassGetThroughputRetType = int64
|
|
|
|
func getPerformanceClassGetThroughputAttributeTypeOk(arg PerformanceClassGetThroughputAttributeType) (ret PerformanceClassGetThroughputRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPerformanceClassGetThroughputAttributeType(arg *PerformanceClassGetThroughputAttributeType, val PerformanceClassGetThroughputRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// PerformanceClass struct for PerformanceClass
|
|
type PerformanceClass struct {
|
|
// IOPS of the Performance Class
|
|
// Can be cast to int32 without loss of precision.
|
|
Iops PerformanceClassGetIopsAttributeType `json:"iops,omitempty"`
|
|
// Name of the Performance Class
|
|
Name PerformanceClassGetNameAttributeType `json:"name,omitempty"`
|
|
// Throughput of the Performance Class
|
|
// Can be cast to int32 without loss of precision.
|
|
Throughput PerformanceClassGetThroughputAttributeType `json:"throughput,omitempty"`
|
|
}
|
|
|
|
// NewPerformanceClass instantiates a new PerformanceClass 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 NewPerformanceClass() *PerformanceClass {
|
|
this := PerformanceClass{}
|
|
return &this
|
|
}
|
|
|
|
// NewPerformanceClassWithDefaults instantiates a new PerformanceClass 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 NewPerformanceClassWithDefaults() *PerformanceClass {
|
|
this := PerformanceClass{}
|
|
return &this
|
|
}
|
|
|
|
// GetIops returns the Iops field value if set, zero value otherwise.
|
|
func (o *PerformanceClass) GetIops() (res PerformanceClassGetIopsRetType) {
|
|
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 *PerformanceClass) GetIopsOk() (ret PerformanceClassGetIopsRetType, ok bool) {
|
|
return getPerformanceClassGetIopsAttributeTypeOk(o.Iops)
|
|
}
|
|
|
|
// HasIops returns a boolean if a field has been set.
|
|
func (o *PerformanceClass) HasIops() bool {
|
|
_, ok := o.GetIopsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIops gets a reference to the given int64 and assigns it to the Iops field.
|
|
func (o *PerformanceClass) SetIops(v PerformanceClassGetIopsRetType) {
|
|
setPerformanceClassGetIopsAttributeType(&o.Iops, v)
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PerformanceClass) GetName() (res PerformanceClassGetNameRetType) {
|
|
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 *PerformanceClass) GetNameOk() (ret PerformanceClassGetNameRetType, ok bool) {
|
|
return getPerformanceClassGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *PerformanceClass) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *PerformanceClass) SetName(v PerformanceClassGetNameRetType) {
|
|
setPerformanceClassGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetThroughput returns the Throughput field value if set, zero value otherwise.
|
|
func (o *PerformanceClass) GetThroughput() (res PerformanceClassGetThroughputRetType) {
|
|
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 *PerformanceClass) GetThroughputOk() (ret PerformanceClassGetThroughputRetType, ok bool) {
|
|
return getPerformanceClassGetThroughputAttributeTypeOk(o.Throughput)
|
|
}
|
|
|
|
// HasThroughput returns a boolean if a field has been set.
|
|
func (o *PerformanceClass) HasThroughput() bool {
|
|
_, ok := o.GetThroughputOk()
|
|
return ok
|
|
}
|
|
|
|
// SetThroughput gets a reference to the given int64 and assigns it to the Throughput field.
|
|
func (o *PerformanceClass) SetThroughput(v PerformanceClassGetThroughputRetType) {
|
|
setPerformanceClassGetThroughputAttributeType(&o.Throughput, v)
|
|
}
|
|
|
|
func (o PerformanceClass) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPerformanceClassGetIopsAttributeTypeOk(o.Iops); ok {
|
|
toSerialize["Iops"] = val
|
|
}
|
|
if val, ok := getPerformanceClassGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getPerformanceClassGetThroughputAttributeTypeOk(o.Throughput); ok {
|
|
toSerialize["Throughput"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePerformanceClass struct {
|
|
value *PerformanceClass
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePerformanceClass) Get() *PerformanceClass {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePerformanceClass) Set(val *PerformanceClass) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePerformanceClass) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePerformanceClass) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePerformanceClass(val *PerformanceClass) *NullablePerformanceClass {
|
|
return &NullablePerformanceClass{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePerformanceClass) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePerformanceClass) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|