feat: generating code

This commit is contained in:
Marcel S. Henselin 2026-01-21 09:07:29 +01:00
parent c329d58970
commit 51663cd8d0
1221 changed files with 271709 additions and 2444 deletions

View file

@ -0,0 +1,388 @@
/*
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"
"time"
)
// checks if the ResourcePoolSnapshot type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourcePoolSnapshot{}
/*
types and functions for comment
*/
// isNullableString
type ResourcePoolSnapshotGetCommentAttributeType = *NullableString
func getResourcePoolSnapshotGetCommentAttributeTypeOk(arg ResourcePoolSnapshotGetCommentAttributeType) (ret ResourcePoolSnapshotGetCommentRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setResourcePoolSnapshotGetCommentAttributeType(arg *ResourcePoolSnapshotGetCommentAttributeType, val ResourcePoolSnapshotGetCommentRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type ResourcePoolSnapshotGetCommentArgType = *string
type ResourcePoolSnapshotGetCommentRetType = *string
/*
types and functions for createdAt
*/
// isDateTime
type ResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time
type ResourcePoolSnapshotGetCreatedAtArgType = time.Time
type ResourcePoolSnapshotGetCreatedAtRetType = time.Time
func getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg ResourcePoolSnapshotGetCreatedAtAttributeType) (ret ResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetCreatedAtAttributeType(arg *ResourcePoolSnapshotGetCreatedAtAttributeType, val ResourcePoolSnapshotGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for logicalSizeGigabytes
*/
// isInteger
type ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64
type ResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64
type ResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64
func getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret ResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for resourcePoolId
*/
// isNotNullableString
type ResourcePoolSnapshotGetResourcePoolIdAttributeType = *string
func getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg ResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret ResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *ResourcePoolSnapshotGetResourcePoolIdAttributeType, val ResourcePoolSnapshotGetResourcePoolIdRetType) {
*arg = &val
}
type ResourcePoolSnapshotGetResourcePoolIdArgType = string
type ResourcePoolSnapshotGetResourcePoolIdRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type ResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64
type ResourcePoolSnapshotGetSizeGigabytesArgType = int64
type ResourcePoolSnapshotGetSizeGigabytesRetType = int64
func getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret ResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *ResourcePoolSnapshotGetSizeGigabytesAttributeType, val ResourcePoolSnapshotGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for snapshotName
*/
// isNotNullableString
type ResourcePoolSnapshotGetSnapshotNameAttributeType = *string
func getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg ResourcePoolSnapshotGetSnapshotNameAttributeType) (ret ResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetSnapshotNameAttributeType(arg *ResourcePoolSnapshotGetSnapshotNameAttributeType, val ResourcePoolSnapshotGetSnapshotNameRetType) {
*arg = &val
}
type ResourcePoolSnapshotGetSnapshotNameArgType = string
type ResourcePoolSnapshotGetSnapshotNameRetType = string
// ResourcePoolSnapshot struct for ResourcePoolSnapshot
type ResourcePoolSnapshot struct {
// (optional) A comment to add more information about a snapshot
Comment ResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"`
CreatedAt ResourcePoolSnapshotGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. whats in the snapshot)
// Can be cast to int32 without loss of precision.
LogicalSizeGigabytes ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType `json:"logicalSizeGigabytes,omitempty"`
// ID of the Resource Pool of the Snapshot
ResourcePoolId ResourcePoolSnapshotGetResourcePoolIdAttributeType `json:"resourcePoolId,omitempty"`
// Reflects the actual storage footprint in the backend at snapshot time in Gibibytes (e.g. how much storage from the Resource Pool does it use).
// Can be cast to int32 without loss of precision.
SizeGigabytes ResourcePoolSnapshotGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// Name of the Resource Pool Snapshot
SnapshotName ResourcePoolSnapshotGetSnapshotNameAttributeType `json:"snapshotName,omitempty"`
}
// NewResourcePoolSnapshot instantiates a new ResourcePoolSnapshot 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 NewResourcePoolSnapshot() *ResourcePoolSnapshot {
this := ResourcePoolSnapshot{}
return &this
}
// NewResourcePoolSnapshotWithDefaults instantiates a new ResourcePoolSnapshot 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 NewResourcePoolSnapshotWithDefaults() *ResourcePoolSnapshot {
this := ResourcePoolSnapshot{}
return &this
}
// GetComment returns the Comment field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourcePoolSnapshot) GetComment() (res ResourcePoolSnapshotGetCommentRetType) {
res, _ = o.GetCommentOk()
return
}
// GetCommentOk returns a tuple with the Comment 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 *ResourcePoolSnapshot) GetCommentOk() (ret ResourcePoolSnapshotGetCommentRetType, ok bool) {
return getResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment)
}
// HasComment returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasComment() bool {
_, ok := o.GetCommentOk()
return ok
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *ResourcePoolSnapshot) SetComment(v ResourcePoolSnapshotGetCommentRetType) {
setResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v)
}
// SetCommentNil sets the value for Comment to be an explicit nil
func (o *ResourcePoolSnapshot) SetCommentNil() {
o.Comment = nil
}
// UnsetComment ensures that no value is present for Comment, not even an explicit nil
func (o *ResourcePoolSnapshot) UnsetComment() {
o.Comment = nil
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetCreatedAt() (res ResourcePoolSnapshotGetCreatedAtRetType) {
res, _ = o.GetCreatedAtOk()
return
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetCreatedAtOk() (ret ResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
return getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasCreatedAt() bool {
_, ok := o.GetCreatedAtOk()
return ok
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *ResourcePoolSnapshot) SetCreatedAt(v ResourcePoolSnapshotGetCreatedAtRetType) {
setResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytes() (res ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
res, _ = o.GetLogicalSizeGigabytesOk()
return
}
// GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret ResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
return getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes)
}
// HasLogicalSizeGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasLogicalSizeGigabytes() bool {
_, ok := o.GetLogicalSizeGigabytesOk()
return ok
}
// SetLogicalSizeGigabytes gets a reference to the given int64 and assigns it to the LogicalSizeGigabytes field.
func (o *ResourcePoolSnapshot) SetLogicalSizeGigabytes(v ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v)
}
// GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetResourcePoolId() (res ResourcePoolSnapshotGetResourcePoolIdRetType) {
res, _ = o.GetResourcePoolIdOk()
return
}
// GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetResourcePoolIdOk() (ret ResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
return getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId)
}
// HasResourcePoolId returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasResourcePoolId() bool {
_, ok := o.GetResourcePoolIdOk()
return ok
}
// SetResourcePoolId gets a reference to the given string and assigns it to the ResourcePoolId field.
func (o *ResourcePoolSnapshot) SetResourcePoolId(v ResourcePoolSnapshotGetResourcePoolIdRetType) {
setResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetSizeGigabytes() (res ResourcePoolSnapshotGetSizeGigabytesRetType) {
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 *ResourcePoolSnapshot) GetSizeGigabytesOk() (ret ResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
return getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *ResourcePoolSnapshot) SetSizeGigabytes(v ResourcePoolSnapshotGetSizeGigabytesRetType) {
setResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetSnapshotName returns the SnapshotName field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetSnapshotName() (res ResourcePoolSnapshotGetSnapshotNameRetType) {
res, _ = o.GetSnapshotNameOk()
return
}
// GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetSnapshotNameOk() (ret ResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
return getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName)
}
// HasSnapshotName returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasSnapshotName() bool {
_, ok := o.GetSnapshotNameOk()
return ok
}
// SetSnapshotName gets a reference to the given string and assigns it to the SnapshotName field.
func (o *ResourcePoolSnapshot) SetSnapshotName(v ResourcePoolSnapshotGetSnapshotNameRetType) {
setResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v)
}
func (o ResourcePoolSnapshot) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok {
toSerialize["Comment"] = val
}
if val, ok := getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes); ok {
toSerialize["LogicalSizeGigabytes"] = val
}
if val, ok := getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId); ok {
toSerialize["ResourcePoolId"] = val
}
if val, ok := getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName); ok {
toSerialize["SnapshotName"] = val
}
return toSerialize, nil
}
type NullableResourcePoolSnapshot struct {
value *ResourcePoolSnapshot
isSet bool
}
func (v NullableResourcePoolSnapshot) Get() *ResourcePoolSnapshot {
return v.value
}
func (v *NullableResourcePoolSnapshot) Set(val *ResourcePoolSnapshot) {
v.value = val
v.isSet = true
}
func (v NullableResourcePoolSnapshot) IsSet() bool {
return v.isSet
}
func (v *NullableResourcePoolSnapshot) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourcePoolSnapshot(val *ResourcePoolSnapshot) *NullableResourcePoolSnapshot {
return &NullableResourcePoolSnapshot{value: val, isSet: true}
}
func (v NullableResourcePoolSnapshot) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourcePoolSnapshot) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}