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

439 lines
13 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 ListFlavors type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListFlavors{}
/*
types and functions for cpu
*/
// isLong
type ListFlavorsGetCpuAttributeType = *int64
type ListFlavorsGetCpuArgType = int64
type ListFlavorsGetCpuRetType = int64
func getListFlavorsGetCpuAttributeTypeOk(arg ListFlavorsGetCpuAttributeType) (ret ListFlavorsGetCpuRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetCpuAttributeType(arg *ListFlavorsGetCpuAttributeType, val ListFlavorsGetCpuRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type ListFlavorsGetDescriptionAttributeType = *string
func getListFlavorsGetDescriptionAttributeTypeOk(arg ListFlavorsGetDescriptionAttributeType) (ret ListFlavorsGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetDescriptionAttributeType(arg *ListFlavorsGetDescriptionAttributeType, val ListFlavorsGetDescriptionRetType) {
*arg = &val
}
type ListFlavorsGetDescriptionArgType = string
type ListFlavorsGetDescriptionRetType = string
/*
types and functions for id
*/
// isNotNullableString
type ListFlavorsGetIdAttributeType = *string
func getListFlavorsGetIdAttributeTypeOk(arg ListFlavorsGetIdAttributeType) (ret ListFlavorsGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetIdAttributeType(arg *ListFlavorsGetIdAttributeType, val ListFlavorsGetIdRetType) {
*arg = &val
}
type ListFlavorsGetIdArgType = string
type ListFlavorsGetIdRetType = string
/*
types and functions for maxGB
*/
// isInteger
type ListFlavorsGetMaxGBAttributeType = *int64
type ListFlavorsGetMaxGBArgType = int64
type ListFlavorsGetMaxGBRetType = int64
func getListFlavorsGetMaxGBAttributeTypeOk(arg ListFlavorsGetMaxGBAttributeType) (ret ListFlavorsGetMaxGBRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetMaxGBAttributeType(arg *ListFlavorsGetMaxGBAttributeType, val ListFlavorsGetMaxGBRetType) {
*arg = &val
}
/*
types and functions for memory
*/
// isLong
type ListFlavorsGetMemoryAttributeType = *int64
type ListFlavorsGetMemoryArgType = int64
type ListFlavorsGetMemoryRetType = int64
func getListFlavorsGetMemoryAttributeTypeOk(arg ListFlavorsGetMemoryAttributeType) (ret ListFlavorsGetMemoryRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetMemoryAttributeType(arg *ListFlavorsGetMemoryAttributeType, val ListFlavorsGetMemoryRetType) {
*arg = &val
}
/*
types and functions for minGB
*/
// isInteger
type ListFlavorsGetMinGBAttributeType = *int64
type ListFlavorsGetMinGBArgType = int64
type ListFlavorsGetMinGBRetType = int64
func getListFlavorsGetMinGBAttributeTypeOk(arg ListFlavorsGetMinGBAttributeType) (ret ListFlavorsGetMinGBRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetMinGBAttributeType(arg *ListFlavorsGetMinGBAttributeType, val ListFlavorsGetMinGBRetType) {
*arg = &val
}
/*
types and functions for nodeType
*/
// isNotNullableString
type ListFlavorsGetNodeTypeAttributeType = *string
func getListFlavorsGetNodeTypeAttributeTypeOk(arg ListFlavorsGetNodeTypeAttributeType) (ret ListFlavorsGetNodeTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetNodeTypeAttributeType(arg *ListFlavorsGetNodeTypeAttributeType, val ListFlavorsGetNodeTypeRetType) {
*arg = &val
}
type ListFlavorsGetNodeTypeArgType = string
type ListFlavorsGetNodeTypeRetType = string
/*
types and functions for storageClasses
*/
// isArray
type ListFlavorsGetStorageClassesAttributeType = *[]FlavorStorageClassesStorageClass
type ListFlavorsGetStorageClassesArgType = []FlavorStorageClassesStorageClass
type ListFlavorsGetStorageClassesRetType = []FlavorStorageClassesStorageClass
func getListFlavorsGetStorageClassesAttributeTypeOk(arg ListFlavorsGetStorageClassesAttributeType) (ret ListFlavorsGetStorageClassesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListFlavorsGetStorageClassesAttributeType(arg *ListFlavorsGetStorageClassesAttributeType, val ListFlavorsGetStorageClassesRetType) {
*arg = &val
}
// ListFlavors The flavor of the instance containing the technical features.
type ListFlavors struct {
// The cpu count of the instance.
// REQUIRED
Cpu ListFlavorsGetCpuAttributeType `json:"cpu" required:"true"`
// The flavor description.
// REQUIRED
Description ListFlavorsGetDescriptionAttributeType `json:"description" required:"true"`
// The id of the instance flavor.
// REQUIRED
Id ListFlavorsGetIdAttributeType `json:"id" required:"true"`
// maximum storage which can be ordered for the flavor in Gigabyte.
// Can be cast to int32 without loss of precision.
// REQUIRED
MaxGB ListFlavorsGetMaxGBAttributeType `json:"maxGB" required:"true"`
// The memory of the instance in Gibibyte.
// REQUIRED
Memory ListFlavorsGetMemoryAttributeType `json:"memory" required:"true"`
// minimum storage which is required to order in Gigabyte.
// Can be cast to int32 without loss of precision.
// REQUIRED
MinGB ListFlavorsGetMinGBAttributeType `json:"minGB" required:"true"`
// defines the nodeType it can be either single or HA
// REQUIRED
NodeType ListFlavorsGetNodeTypeAttributeType `json:"nodeType" required:"true"`
// maximum storage which can be ordered for the flavor in Gigabyte.
// REQUIRED
StorageClasses ListFlavorsGetStorageClassesAttributeType `json:"storageClasses" required:"true"`
}
type _ListFlavors ListFlavors
// NewListFlavors instantiates a new ListFlavors 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 NewListFlavors(cpu ListFlavorsGetCpuArgType, description ListFlavorsGetDescriptionArgType, id ListFlavorsGetIdArgType, maxGB ListFlavorsGetMaxGBArgType, memory ListFlavorsGetMemoryArgType, minGB ListFlavorsGetMinGBArgType, nodeType ListFlavorsGetNodeTypeArgType, storageClasses ListFlavorsGetStorageClassesArgType) *ListFlavors {
this := ListFlavors{}
setListFlavorsGetCpuAttributeType(&this.Cpu, cpu)
setListFlavorsGetDescriptionAttributeType(&this.Description, description)
setListFlavorsGetIdAttributeType(&this.Id, id)
setListFlavorsGetMaxGBAttributeType(&this.MaxGB, maxGB)
setListFlavorsGetMemoryAttributeType(&this.Memory, memory)
setListFlavorsGetMinGBAttributeType(&this.MinGB, minGB)
setListFlavorsGetNodeTypeAttributeType(&this.NodeType, nodeType)
setListFlavorsGetStorageClassesAttributeType(&this.StorageClasses, storageClasses)
return &this
}
// NewListFlavorsWithDefaults instantiates a new ListFlavors 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 NewListFlavorsWithDefaults() *ListFlavors {
this := ListFlavors{}
return &this
}
// GetCpu returns the Cpu field value
func (o *ListFlavors) GetCpu() (ret ListFlavorsGetCpuRetType) {
ret, _ = o.GetCpuOk()
return ret
}
// GetCpuOk returns a tuple with the Cpu field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetCpuOk() (ret ListFlavorsGetCpuRetType, ok bool) {
return getListFlavorsGetCpuAttributeTypeOk(o.Cpu)
}
// SetCpu sets field value
func (o *ListFlavors) SetCpu(v ListFlavorsGetCpuRetType) {
setListFlavorsGetCpuAttributeType(&o.Cpu, v)
}
// GetDescription returns the Description field value
func (o *ListFlavors) GetDescription() (ret ListFlavorsGetDescriptionRetType) {
ret, _ = o.GetDescriptionOk()
return ret
}
// GetDescriptionOk returns a tuple with the Description field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetDescriptionOk() (ret ListFlavorsGetDescriptionRetType, ok bool) {
return getListFlavorsGetDescriptionAttributeTypeOk(o.Description)
}
// SetDescription sets field value
func (o *ListFlavors) SetDescription(v ListFlavorsGetDescriptionRetType) {
setListFlavorsGetDescriptionAttributeType(&o.Description, v)
}
// GetId returns the Id field value
func (o *ListFlavors) GetId() (ret ListFlavorsGetIdRetType) {
ret, _ = o.GetIdOk()
return ret
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetIdOk() (ret ListFlavorsGetIdRetType, ok bool) {
return getListFlavorsGetIdAttributeTypeOk(o.Id)
}
// SetId sets field value
func (o *ListFlavors) SetId(v ListFlavorsGetIdRetType) {
setListFlavorsGetIdAttributeType(&o.Id, v)
}
// GetMaxGB returns the MaxGB field value
func (o *ListFlavors) GetMaxGB() (ret ListFlavorsGetMaxGBRetType) {
ret, _ = o.GetMaxGBOk()
return ret
}
// GetMaxGBOk returns a tuple with the MaxGB field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetMaxGBOk() (ret ListFlavorsGetMaxGBRetType, ok bool) {
return getListFlavorsGetMaxGBAttributeTypeOk(o.MaxGB)
}
// SetMaxGB sets field value
func (o *ListFlavors) SetMaxGB(v ListFlavorsGetMaxGBRetType) {
setListFlavorsGetMaxGBAttributeType(&o.MaxGB, v)
}
// GetMemory returns the Memory field value
func (o *ListFlavors) GetMemory() (ret ListFlavorsGetMemoryRetType) {
ret, _ = o.GetMemoryOk()
return ret
}
// GetMemoryOk returns a tuple with the Memory field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetMemoryOk() (ret ListFlavorsGetMemoryRetType, ok bool) {
return getListFlavorsGetMemoryAttributeTypeOk(o.Memory)
}
// SetMemory sets field value
func (o *ListFlavors) SetMemory(v ListFlavorsGetMemoryRetType) {
setListFlavorsGetMemoryAttributeType(&o.Memory, v)
}
// GetMinGB returns the MinGB field value
func (o *ListFlavors) GetMinGB() (ret ListFlavorsGetMinGBRetType) {
ret, _ = o.GetMinGBOk()
return ret
}
// GetMinGBOk returns a tuple with the MinGB field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetMinGBOk() (ret ListFlavorsGetMinGBRetType, ok bool) {
return getListFlavorsGetMinGBAttributeTypeOk(o.MinGB)
}
// SetMinGB sets field value
func (o *ListFlavors) SetMinGB(v ListFlavorsGetMinGBRetType) {
setListFlavorsGetMinGBAttributeType(&o.MinGB, v)
}
// GetNodeType returns the NodeType field value
func (o *ListFlavors) GetNodeType() (ret ListFlavorsGetNodeTypeRetType) {
ret, _ = o.GetNodeTypeOk()
return ret
}
// GetNodeTypeOk returns a tuple with the NodeType field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetNodeTypeOk() (ret ListFlavorsGetNodeTypeRetType, ok bool) {
return getListFlavorsGetNodeTypeAttributeTypeOk(o.NodeType)
}
// SetNodeType sets field value
func (o *ListFlavors) SetNodeType(v ListFlavorsGetNodeTypeRetType) {
setListFlavorsGetNodeTypeAttributeType(&o.NodeType, v)
}
// GetStorageClasses returns the StorageClasses field value
func (o *ListFlavors) GetStorageClasses() (ret ListFlavorsGetStorageClassesRetType) {
ret, _ = o.GetStorageClassesOk()
return ret
}
// GetStorageClassesOk returns a tuple with the StorageClasses field value
// and a boolean to check if the value has been set.
func (o *ListFlavors) GetStorageClassesOk() (ret ListFlavorsGetStorageClassesRetType, ok bool) {
return getListFlavorsGetStorageClassesAttributeTypeOk(o.StorageClasses)
}
// SetStorageClasses sets field value
func (o *ListFlavors) SetStorageClasses(v ListFlavorsGetStorageClassesRetType) {
setListFlavorsGetStorageClassesAttributeType(&o.StorageClasses, v)
}
func (o ListFlavors) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListFlavorsGetCpuAttributeTypeOk(o.Cpu); ok {
toSerialize["Cpu"] = val
}
if val, ok := getListFlavorsGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getListFlavorsGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getListFlavorsGetMaxGBAttributeTypeOk(o.MaxGB); ok {
toSerialize["MaxGB"] = val
}
if val, ok := getListFlavorsGetMemoryAttributeTypeOk(o.Memory); ok {
toSerialize["Memory"] = val
}
if val, ok := getListFlavorsGetMinGBAttributeTypeOk(o.MinGB); ok {
toSerialize["MinGB"] = val
}
if val, ok := getListFlavorsGetNodeTypeAttributeTypeOk(o.NodeType); ok {
toSerialize["NodeType"] = val
}
if val, ok := getListFlavorsGetStorageClassesAttributeTypeOk(o.StorageClasses); ok {
toSerialize["StorageClasses"] = val
}
return toSerialize, nil
}
type NullableListFlavors struct {
value *ListFlavors
isSet bool
}
func (v NullableListFlavors) Get() *ListFlavors {
return v.value
}
func (v *NullableListFlavors) Set(val *ListFlavors) {
v.value = val
v.isSet = true
}
func (v NullableListFlavors) IsSet() bool {
return v.isSet
}
func (v *NullableListFlavors) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListFlavors(val *ListFlavors) *NullableListFlavors {
return &NullableListFlavors{value: val, isSet: true}
}
func (v NullableListFlavors) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListFlavors) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}