terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_storage.go
Marcel S. Henselin 2733834fc9
Some checks failed
CI Workflow / CI (push) Has been cancelled
CI Workflow / Check GoReleaser config (push) Has been cancelled
CI Workflow / Code coverage report (push) Has been cancelled
Alpha (#4)
* chore: initial push to be able to work together

* chore: add missing wait folder

* chore: add missing folders

* chore: cleanup alpha branch

* feat: mssql alpha instance (#2)

* fix: remove unused attribute types and functions from backup models

* fix: update API client references to use sqlserverflexalpha package

* fix: update package references to use sqlserverflexalpha and modify user data source model

* fix: add sqlserverflexalpha user data source to provider

* fix: add sqlserverflexalpha user resource and update related functionality

* chore: add stackit_sqlserverflexalpha_user resource and instance_id variable

* fix: refactor sqlserverflexalpha user resource and enhance schema with status and default_database

---------

Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>

* feat: add sqlserver instance

* chore: fixing tests

* chore: update docs

---------

Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-authored-by: Andre Harms <andre.harms@stackit.cloud>
2025-12-19 11:37:53 +01:00

177 lines
4.5 KiB
Go

/*
STACKIT MSSQL Service API
This is the documentation for the STACKIT MSSQL service
API version: 3alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sqlserverflexalpha
import (
"encoding/json"
)
// checks if the Storage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Storage{}
/*
types and functions for class
*/
// isNotNullableString
type StorageGetClassAttributeType = *string
func getStorageGetClassAttributeTypeOk(arg StorageGetClassAttributeType) (ret StorageGetClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStorageGetClassAttributeType(arg *StorageGetClassAttributeType, val StorageGetClassRetType) {
*arg = &val
}
type StorageGetClassArgType = string
type StorageGetClassRetType = string
/*
types and functions for size
*/
// isLong
type StorageGetSizeAttributeType = *int64
type StorageGetSizeArgType = int64
type StorageGetSizeRetType = int64
func getStorageGetSizeAttributeTypeOk(arg StorageGetSizeAttributeType) (ret StorageGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStorageGetSizeAttributeType(arg *StorageGetSizeAttributeType, val StorageGetSizeRetType) {
*arg = &val
}
// Storage The object containing information about the storage size and class.
type Storage struct {
// The storage class for the storage.
Class StorageGetClassAttributeType `json:"class,omitempty"`
// The storage size in Gigabytes.
Size StorageGetSizeAttributeType `json:"size,omitempty"`
}
// NewStorage instantiates a new Storage 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 NewStorage() *Storage {
this := Storage{}
return &this
}
// NewStorageWithDefaults instantiates a new Storage 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 NewStorageWithDefaults() *Storage {
this := Storage{}
return &this
}
// GetClass returns the Class field value if set, zero value otherwise.
func (o *Storage) GetClass() (res StorageGetClassRetType) {
res, _ = o.GetClassOk()
return
}
// GetClassOk returns a tuple with the Class field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Storage) GetClassOk() (ret StorageGetClassRetType, ok bool) {
return getStorageGetClassAttributeTypeOk(o.Class)
}
// HasClass returns a boolean if a field has been set.
func (o *Storage) HasClass() bool {
_, ok := o.GetClassOk()
return ok
}
// SetClass gets a reference to the given string and assigns it to the Class field.
func (o *Storage) SetClass(v StorageGetClassRetType) {
setStorageGetClassAttributeType(&o.Class, v)
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *Storage) GetSize() (res StorageGetSizeRetType) {
res, _ = o.GetSizeOk()
return
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Storage) GetSizeOk() (ret StorageGetSizeRetType, ok bool) {
return getStorageGetSizeAttributeTypeOk(o.Size)
}
// HasSize returns a boolean if a field has been set.
func (o *Storage) HasSize() bool {
_, ok := o.GetSizeOk()
return ok
}
// SetSize gets a reference to the given int64 and assigns it to the Size field.
func (o *Storage) SetSize(v StorageGetSizeRetType) {
setStorageGetSizeAttributeType(&o.Size, v)
}
func (o Storage) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getStorageGetClassAttributeTypeOk(o.Class); ok {
toSerialize["Class"] = val
}
if val, ok := getStorageGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
return toSerialize, nil
}
type NullableStorage struct {
value *Storage
isSet bool
}
func (v NullableStorage) Get() *Storage {
return v.value
}
func (v *NullableStorage) Set(val *Storage) {
v.value = val
v.isSet = true
}
func (v NullableStorage) IsSet() bool {
return v.isSet
}
func (v *NullableStorage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStorage(val *Storage) *NullableStorage {
return &NullableStorage{value: val, isSet: true}
}
func (v NullableStorage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStorage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}