terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_storage_create.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

171 lines
4.7 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 StorageCreate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &StorageCreate{}
/*
types and functions for class
*/
// isNotNullableString
type StorageCreateGetClassAttributeType = *string
func getStorageCreateGetClassAttributeTypeOk(arg StorageCreateGetClassAttributeType) (ret StorageCreateGetClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStorageCreateGetClassAttributeType(arg *StorageCreateGetClassAttributeType, val StorageCreateGetClassRetType) {
*arg = &val
}
type StorageCreateGetClassArgType = string
type StorageCreateGetClassRetType = string
/*
types and functions for size
*/
// isLong
type StorageCreateGetSizeAttributeType = *int64
type StorageCreateGetSizeArgType = int64
type StorageCreateGetSizeRetType = int64
func getStorageCreateGetSizeAttributeTypeOk(arg StorageCreateGetSizeAttributeType) (ret StorageCreateGetSizeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStorageCreateGetSizeAttributeType(arg *StorageCreateGetSizeAttributeType, val StorageCreateGetSizeRetType) {
*arg = &val
}
// StorageCreate The object containing information about the storage size and class.
type StorageCreate struct {
// The storage class for the storage.
// REQUIRED
Class StorageCreateGetClassAttributeType `json:"class" required:"true"`
// The storage size in Gigabytes.
// REQUIRED
Size StorageCreateGetSizeAttributeType `json:"size" required:"true"`
}
type _StorageCreate StorageCreate
// NewStorageCreate instantiates a new StorageCreate 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 NewStorageCreate(class StorageCreateGetClassArgType, size StorageCreateGetSizeArgType) *StorageCreate {
this := StorageCreate{}
setStorageCreateGetClassAttributeType(&this.Class, class)
setStorageCreateGetSizeAttributeType(&this.Size, size)
return &this
}
// NewStorageCreateWithDefaults instantiates a new StorageCreate 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 NewStorageCreateWithDefaults() *StorageCreate {
this := StorageCreate{}
return &this
}
// GetClass returns the Class field value
func (o *StorageCreate) GetClass() (ret StorageCreateGetClassRetType) {
ret, _ = o.GetClassOk()
return ret
}
// GetClassOk returns a tuple with the Class field value
// and a boolean to check if the value has been set.
func (o *StorageCreate) GetClassOk() (ret StorageCreateGetClassRetType, ok bool) {
return getStorageCreateGetClassAttributeTypeOk(o.Class)
}
// SetClass sets field value
func (o *StorageCreate) SetClass(v StorageCreateGetClassRetType) {
setStorageCreateGetClassAttributeType(&o.Class, v)
}
// GetSize returns the Size field value
func (o *StorageCreate) GetSize() (ret StorageCreateGetSizeRetType) {
ret, _ = o.GetSizeOk()
return ret
}
// GetSizeOk returns a tuple with the Size field value
// and a boolean to check if the value has been set.
func (o *StorageCreate) GetSizeOk() (ret StorageCreateGetSizeRetType, ok bool) {
return getStorageCreateGetSizeAttributeTypeOk(o.Size)
}
// SetSize sets field value
func (o *StorageCreate) SetSize(v StorageCreateGetSizeRetType) {
setStorageCreateGetSizeAttributeType(&o.Size, v)
}
func (o StorageCreate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getStorageCreateGetClassAttributeTypeOk(o.Class); ok {
toSerialize["Class"] = val
}
if val, ok := getStorageCreateGetSizeAttributeTypeOk(o.Size); ok {
toSerialize["Size"] = val
}
return toSerialize, nil
}
type NullableStorageCreate struct {
value *StorageCreate
isSet bool
}
func (v NullableStorageCreate) Get() *StorageCreate {
return v.value
}
func (v *NullableStorageCreate) Set(val *StorageCreate) {
v.value = val
v.isSet = true
}
func (v NullableStorageCreate) IsSet() bool {
return v.isSet
}
func (v *NullableStorageCreate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStorageCreate(val *StorageCreate) *NullableStorageCreate {
return &NullableStorageCreate{value: val, isSet: true}
}
func (v NullableStorageCreate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStorageCreate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}