terraform-provider-stackitp.../pkg/sfsbeta/model_resource_pool_space.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

247 lines
8.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 ResourcePoolSpace type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourcePoolSpace{}
/*
types and functions for availableGigabytes
*/
// isDouble
type ResourcePoolSpaceGetAvailableGigabytesAttributeType = *float64
type ResourcePoolSpaceGetAvailableGigabytesArgType = *float64
type ResourcePoolSpaceGetAvailableGigabytesRetType = *float64
func getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetAvailableGigabytesAttributeType) (ret ResourcePoolSpaceGetAvailableGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setResourcePoolSpaceGetAvailableGigabytesAttributeType(arg *ResourcePoolSpaceGetAvailableGigabytesAttributeType, val ResourcePoolSpaceGetAvailableGigabytesRetType) {
*arg = val
}
/*
types and functions for sizeGigabytes
*/
// isInteger
type ResourcePoolSpaceGetSizeGigabytesAttributeType = *int64
type ResourcePoolSpaceGetSizeGigabytesArgType = int64
type ResourcePoolSpaceGetSizeGigabytesRetType = int64
func getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetSizeGigabytesAttributeType) (ret ResourcePoolSpaceGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSpaceGetSizeGigabytesAttributeType(arg *ResourcePoolSpaceGetSizeGigabytesAttributeType, val ResourcePoolSpaceGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for usedGigabytes
*/
// isDouble
type ResourcePoolSpaceGetUsedGigabytesAttributeType = *float64
type ResourcePoolSpaceGetUsedGigabytesArgType = *float64
type ResourcePoolSpaceGetUsedGigabytesRetType = *float64
func getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetUsedGigabytesAttributeType) (ret ResourcePoolSpaceGetUsedGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setResourcePoolSpaceGetUsedGigabytesAttributeType(arg *ResourcePoolSpaceGetUsedGigabytesAttributeType, val ResourcePoolSpaceGetUsedGigabytesRetType) {
*arg = val
}
// ResourcePoolSpace Space information
type ResourcePoolSpace struct {
// Available space of the Resource Pool (only available when retrieving a single Resource Pool by ID)
AvailableGigabytes ResourcePoolSpaceGetAvailableGigabytesAttributeType `json:"availableGigabytes,omitempty"`
// Size of the Resource Pool in Gibibytes.
// Can be cast to int32 without loss of precision.
SizeGigabytes ResourcePoolSpaceGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// Used space of the Resource Pool (only available when retrieving a single Resource Pool by ID)
UsedGigabytes ResourcePoolSpaceGetUsedGigabytesAttributeType `json:"usedGigabytes,omitempty"`
}
// NewResourcePoolSpace instantiates a new ResourcePoolSpace 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 NewResourcePoolSpace() *ResourcePoolSpace {
this := ResourcePoolSpace{}
return &this
}
// NewResourcePoolSpaceWithDefaults instantiates a new ResourcePoolSpace 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 NewResourcePoolSpaceWithDefaults() *ResourcePoolSpace {
this := ResourcePoolSpace{}
return &this
}
// GetAvailableGigabytes returns the AvailableGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourcePoolSpace) GetAvailableGigabytes() (res ResourcePoolSpaceGetAvailableGigabytesRetType) {
res, _ = o.GetAvailableGigabytesOk()
return
}
// GetAvailableGigabytesOk returns a tuple with the AvailableGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ResourcePoolSpace) GetAvailableGigabytesOk() (ret ResourcePoolSpaceGetAvailableGigabytesRetType, ok bool) {
return getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(o.AvailableGigabytes)
}
// HasAvailableGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSpace) HasAvailableGigabytes() bool {
_, ok := o.GetAvailableGigabytesOk()
return ok
}
// SetAvailableGigabytes gets a reference to the given float64 and assigns it to the AvailableGigabytes field.
func (o *ResourcePoolSpace) SetAvailableGigabytes(v ResourcePoolSpaceGetAvailableGigabytesRetType) {
setResourcePoolSpaceGetAvailableGigabytesAttributeType(&o.AvailableGigabytes, v)
}
// SetAvailableGigabytesNil sets the value for AvailableGigabytes to be an explicit nil
func (o *ResourcePoolSpace) SetAvailableGigabytesNil() {
o.AvailableGigabytes = nil
}
// UnsetAvailableGigabytes ensures that no value is present for AvailableGigabytes, not even an explicit nil
func (o *ResourcePoolSpace) UnsetAvailableGigabytes() {
o.AvailableGigabytes = nil
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *ResourcePoolSpace) GetSizeGigabytes() (res ResourcePoolSpaceGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSpace) GetSizeGigabytesOk() (ret ResourcePoolSpaceGetSizeGigabytesRetType, ok bool) {
return getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSpace) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *ResourcePoolSpace) SetSizeGigabytes(v ResourcePoolSpaceGetSizeGigabytesRetType) {
setResourcePoolSpaceGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetUsedGigabytes returns the UsedGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourcePoolSpace) GetUsedGigabytes() (res ResourcePoolSpaceGetUsedGigabytesRetType) {
res, _ = o.GetUsedGigabytesOk()
return
}
// GetUsedGigabytesOk returns a tuple with the UsedGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ResourcePoolSpace) GetUsedGigabytesOk() (ret ResourcePoolSpaceGetUsedGigabytesRetType, ok bool) {
return getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(o.UsedGigabytes)
}
// HasUsedGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSpace) HasUsedGigabytes() bool {
_, ok := o.GetUsedGigabytesOk()
return ok
}
// SetUsedGigabytes gets a reference to the given float64 and assigns it to the UsedGigabytes field.
func (o *ResourcePoolSpace) SetUsedGigabytes(v ResourcePoolSpaceGetUsedGigabytesRetType) {
setResourcePoolSpaceGetUsedGigabytesAttributeType(&o.UsedGigabytes, v)
}
// SetUsedGigabytesNil sets the value for UsedGigabytes to be an explicit nil
func (o *ResourcePoolSpace) SetUsedGigabytesNil() {
o.UsedGigabytes = nil
}
// UnsetUsedGigabytes ensures that no value is present for UsedGigabytes, not even an explicit nil
func (o *ResourcePoolSpace) UnsetUsedGigabytes() {
o.UsedGigabytes = nil
}
func (o ResourcePoolSpace) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(o.AvailableGigabytes); ok {
toSerialize["AvailableGigabytes"] = val
}
if val, ok := getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(o.UsedGigabytes); ok {
toSerialize["UsedGigabytes"] = val
}
return toSerialize, nil
}
type NullableResourcePoolSpace struct {
value *ResourcePoolSpace
isSet bool
}
func (v NullableResourcePoolSpace) Get() *ResourcePoolSpace {
return v.value
}
func (v *NullableResourcePoolSpace) Set(val *ResourcePoolSpace) {
v.value = val
v.isSet = true
}
func (v NullableResourcePoolSpace) IsSet() bool {
return v.isSet
}
func (v *NullableResourcePoolSpace) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourcePoolSpace(val *ResourcePoolSpace) *NullableResourcePoolSpace {
return &NullableResourcePoolSpace{value: val, isSet: true}
}
func (v NullableResourcePoolSpace) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourcePoolSpace) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}