terraform-provider-stackitp.../pkg/sfsbeta/model_resource_pool_performance_class.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

227 lines
8.1 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 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)
}