terraform-provider-stackitp.../pkg/sfsbeta/model_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
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)
}