feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
227
pkg/sfsbeta/model_resource_pool_performance_class.go
Normal file
227
pkg/sfsbeta/model_resource_pool_performance_class.go
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
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 ResourcePoolPerformanceClass type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ResourcePoolPerformanceClass{}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ResourcePoolPerformanceClassGetNameAttributeType = *string
|
||||
|
||||
func getResourcePoolPerformanceClassGetNameAttributeTypeOk(arg ResourcePoolPerformanceClassGetNameAttributeType) (ret ResourcePoolPerformanceClassGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setResourcePoolPerformanceClassGetNameAttributeType(arg *ResourcePoolPerformanceClassGetNameAttributeType, val ResourcePoolPerformanceClassGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ResourcePoolPerformanceClassGetNameArgType = string
|
||||
type ResourcePoolPerformanceClassGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for peakIops
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type ResourcePoolPerformanceClassGetPeakIopsAttributeType = *int64
|
||||
type ResourcePoolPerformanceClassGetPeakIopsArgType = int64
|
||||
type ResourcePoolPerformanceClassGetPeakIopsRetType = int64
|
||||
|
||||
func getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(arg ResourcePoolPerformanceClassGetPeakIopsAttributeType) (ret ResourcePoolPerformanceClassGetPeakIopsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setResourcePoolPerformanceClassGetPeakIopsAttributeType(arg *ResourcePoolPerformanceClassGetPeakIopsAttributeType, val ResourcePoolPerformanceClassGetPeakIopsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for throughput
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type ResourcePoolPerformanceClassGetThroughputAttributeType = *int64
|
||||
type ResourcePoolPerformanceClassGetThroughputArgType = int64
|
||||
type ResourcePoolPerformanceClassGetThroughputRetType = int64
|
||||
|
||||
func getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(arg ResourcePoolPerformanceClassGetThroughputAttributeType) (ret ResourcePoolPerformanceClassGetThroughputRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setResourcePoolPerformanceClassGetThroughputAttributeType(arg *ResourcePoolPerformanceClassGetThroughputAttributeType, val ResourcePoolPerformanceClassGetThroughputRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ResourcePoolPerformanceClass Information about the performance class
|
||||
type ResourcePoolPerformanceClass struct {
|
||||
// Name of the performance class
|
||||
Name ResourcePoolPerformanceClassGetNameAttributeType `json:"name,omitempty"`
|
||||
// Max. IOPS of the Resource Pool. This is shared between every Share in the Resource Pool.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
PeakIops ResourcePoolPerformanceClassGetPeakIopsAttributeType `json:"peakIops,omitempty"`
|
||||
// Throughput of the Resource Pool.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
Throughput ResourcePoolPerformanceClassGetThroughputAttributeType `json:"throughput,omitempty"`
|
||||
}
|
||||
|
||||
// NewResourcePoolPerformanceClass instantiates a new ResourcePoolPerformanceClass 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 NewResourcePoolPerformanceClass() *ResourcePoolPerformanceClass {
|
||||
this := ResourcePoolPerformanceClass{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewResourcePoolPerformanceClassWithDefaults instantiates a new ResourcePoolPerformanceClass 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 NewResourcePoolPerformanceClassWithDefaults() *ResourcePoolPerformanceClass {
|
||||
this := ResourcePoolPerformanceClass{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *ResourcePoolPerformanceClass) GetName() (res ResourcePoolPerformanceClassGetNameRetType) {
|
||||
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 *ResourcePoolPerformanceClass) GetNameOk() (ret ResourcePoolPerformanceClassGetNameRetType, ok bool) {
|
||||
return getResourcePoolPerformanceClassGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *ResourcePoolPerformanceClass) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *ResourcePoolPerformanceClass) SetName(v ResourcePoolPerformanceClassGetNameRetType) {
|
||||
setResourcePoolPerformanceClassGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetPeakIops returns the PeakIops field value if set, zero value otherwise.
|
||||
func (o *ResourcePoolPerformanceClass) GetPeakIops() (res ResourcePoolPerformanceClassGetPeakIopsRetType) {
|
||||
res, _ = o.GetPeakIopsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetPeakIopsOk returns a tuple with the PeakIops field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ResourcePoolPerformanceClass) GetPeakIopsOk() (ret ResourcePoolPerformanceClassGetPeakIopsRetType, ok bool) {
|
||||
return getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(o.PeakIops)
|
||||
}
|
||||
|
||||
// HasPeakIops returns a boolean if a field has been set.
|
||||
func (o *ResourcePoolPerformanceClass) HasPeakIops() bool {
|
||||
_, ok := o.GetPeakIopsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPeakIops gets a reference to the given int64 and assigns it to the PeakIops field.
|
||||
func (o *ResourcePoolPerformanceClass) SetPeakIops(v ResourcePoolPerformanceClassGetPeakIopsRetType) {
|
||||
setResourcePoolPerformanceClassGetPeakIopsAttributeType(&o.PeakIops, v)
|
||||
}
|
||||
|
||||
// GetThroughput returns the Throughput field value if set, zero value otherwise.
|
||||
func (o *ResourcePoolPerformanceClass) GetThroughput() (res ResourcePoolPerformanceClassGetThroughputRetType) {
|
||||
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 *ResourcePoolPerformanceClass) GetThroughputOk() (ret ResourcePoolPerformanceClassGetThroughputRetType, ok bool) {
|
||||
return getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(o.Throughput)
|
||||
}
|
||||
|
||||
// HasThroughput returns a boolean if a field has been set.
|
||||
func (o *ResourcePoolPerformanceClass) HasThroughput() bool {
|
||||
_, ok := o.GetThroughputOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetThroughput gets a reference to the given int64 and assigns it to the Throughput field.
|
||||
func (o *ResourcePoolPerformanceClass) SetThroughput(v ResourcePoolPerformanceClassGetThroughputRetType) {
|
||||
setResourcePoolPerformanceClassGetThroughputAttributeType(&o.Throughput, v)
|
||||
}
|
||||
|
||||
func (o ResourcePoolPerformanceClass) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getResourcePoolPerformanceClassGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(o.PeakIops); ok {
|
||||
toSerialize["PeakIops"] = val
|
||||
}
|
||||
if val, ok := getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(o.Throughput); ok {
|
||||
toSerialize["Throughput"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableResourcePoolPerformanceClass struct {
|
||||
value *ResourcePoolPerformanceClass
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableResourcePoolPerformanceClass) Get() *ResourcePoolPerformanceClass {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableResourcePoolPerformanceClass) Set(val *ResourcePoolPerformanceClass) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableResourcePoolPerformanceClass) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableResourcePoolPerformanceClass) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableResourcePoolPerformanceClass(val *ResourcePoolPerformanceClass) *NullableResourcePoolPerformanceClass {
|
||||
return &NullableResourcePoolPerformanceClass{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableResourcePoolPerformanceClass) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableResourcePoolPerformanceClass) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue