terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_database_roles.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 DatabaseRoles type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DatabaseRoles{}
/*
types and functions for name
*/
// isNotNullableString
type DatabaseRolesGetNameAttributeType = *string
func getDatabaseRolesGetNameAttributeTypeOk(arg DatabaseRolesGetNameAttributeType) (ret DatabaseRolesGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setDatabaseRolesGetNameAttributeType(arg *DatabaseRolesGetNameAttributeType, val DatabaseRolesGetNameRetType) {
*arg = &val
}
type DatabaseRolesGetNameArgType = string
type DatabaseRolesGetNameRetType = string
/*
types and functions for roles
*/
// isArray
type DatabaseRolesGetRolesAttributeType = *[]string
type DatabaseRolesGetRolesArgType = []string
type DatabaseRolesGetRolesRetType = []string
func getDatabaseRolesGetRolesAttributeTypeOk(arg DatabaseRolesGetRolesAttributeType) (ret DatabaseRolesGetRolesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setDatabaseRolesGetRolesAttributeType(arg *DatabaseRolesGetRolesAttributeType, val DatabaseRolesGetRolesRetType) {
*arg = &val
}
// DatabaseRoles The name and the roles for a database for a user.
type DatabaseRoles struct {
// The name of the database.
// REQUIRED
Name DatabaseRolesGetNameAttributeType `json:"name" required:"true"`
// The name and the roles for a database
// REQUIRED
Roles DatabaseRolesGetRolesAttributeType `json:"roles" required:"true"`
}
type _DatabaseRoles DatabaseRoles
// NewDatabaseRoles instantiates a new DatabaseRoles 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 NewDatabaseRoles(name DatabaseRolesGetNameArgType, roles DatabaseRolesGetRolesArgType) *DatabaseRoles {
this := DatabaseRoles{}
setDatabaseRolesGetNameAttributeType(&this.Name, name)
setDatabaseRolesGetRolesAttributeType(&this.Roles, roles)
return &this
}
// NewDatabaseRolesWithDefaults instantiates a new DatabaseRoles 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 NewDatabaseRolesWithDefaults() *DatabaseRoles {
this := DatabaseRoles{}
return &this
}
// GetName returns the Name field value
func (o *DatabaseRoles) GetName() (ret DatabaseRolesGetNameRetType) {
ret, _ = o.GetNameOk()
return ret
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *DatabaseRoles) GetNameOk() (ret DatabaseRolesGetNameRetType, ok bool) {
return getDatabaseRolesGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *DatabaseRoles) SetName(v DatabaseRolesGetNameRetType) {
setDatabaseRolesGetNameAttributeType(&o.Name, v)
}
// GetRoles returns the Roles field value
func (o *DatabaseRoles) GetRoles() (ret DatabaseRolesGetRolesRetType) {
ret, _ = o.GetRolesOk()
return ret
}
// GetRolesOk returns a tuple with the Roles field value
// and a boolean to check if the value has been set.
func (o *DatabaseRoles) GetRolesOk() (ret DatabaseRolesGetRolesRetType, ok bool) {
return getDatabaseRolesGetRolesAttributeTypeOk(o.Roles)
}
// SetRoles sets field value
func (o *DatabaseRoles) SetRoles(v DatabaseRolesGetRolesRetType) {
setDatabaseRolesGetRolesAttributeType(&o.Roles, v)
}
func (o DatabaseRoles) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getDatabaseRolesGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getDatabaseRolesGetRolesAttributeTypeOk(o.Roles); ok {
toSerialize["Roles"] = val
}
return toSerialize, nil
}
type NullableDatabaseRoles struct {
value *DatabaseRoles
isSet bool
}
func (v NullableDatabaseRoles) Get() *DatabaseRoles {
return v.value
}
func (v *NullableDatabaseRoles) Set(val *DatabaseRoles) {
v.value = val
v.isSet = true
}
func (v NullableDatabaseRoles) IsSet() bool {
return v.isSet
}
func (v *NullableDatabaseRoles) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDatabaseRoles(val *DatabaseRoles) *NullableDatabaseRoles {
return &NullableDatabaseRoles{value: val, isSet: true}
}
func (v NullableDatabaseRoles) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDatabaseRoles) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}