* 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>
216 lines
5.7 KiB
Go
216 lines
5.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 ListUser type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ListUser{}
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isLong
|
|
type ListUserGetIdAttributeType = *int64
|
|
type ListUserGetIdArgType = int64
|
|
type ListUserGetIdRetType = int64
|
|
|
|
func getListUserGetIdAttributeTypeOk(arg ListUserGetIdAttributeType) (ret ListUserGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setListUserGetIdAttributeType(arg *ListUserGetIdAttributeType, val ListUserGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for status
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type ListUserGetStatusAttributeType = *string
|
|
|
|
func getListUserGetStatusAttributeTypeOk(arg ListUserGetStatusAttributeType) (ret ListUserGetStatusRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setListUserGetStatusAttributeType(arg *ListUserGetStatusAttributeType, val ListUserGetStatusRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type ListUserGetStatusArgType = string
|
|
type ListUserGetStatusRetType = string
|
|
|
|
/*
|
|
types and functions for username
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type ListUserGetUsernameAttributeType = *string
|
|
|
|
func getListUserGetUsernameAttributeTypeOk(arg ListUserGetUsernameAttributeType) (ret ListUserGetUsernameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setListUserGetUsernameAttributeType(arg *ListUserGetUsernameAttributeType, val ListUserGetUsernameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type ListUserGetUsernameArgType = string
|
|
type ListUserGetUsernameRetType = string
|
|
|
|
// ListUser struct for ListUser
|
|
type ListUser struct {
|
|
// The ID of the user.
|
|
// REQUIRED
|
|
Id ListUserGetIdAttributeType `json:"id" required:"true"`
|
|
// The current status of the user.
|
|
// REQUIRED
|
|
Status ListUserGetStatusAttributeType `json:"status" required:"true"`
|
|
// The name of the user.
|
|
// REQUIRED
|
|
Username ListUserGetUsernameAttributeType `json:"username" required:"true"`
|
|
}
|
|
|
|
type _ListUser ListUser
|
|
|
|
// NewListUser instantiates a new ListUser 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 NewListUser(id ListUserGetIdArgType, status ListUserGetStatusArgType, username ListUserGetUsernameArgType) *ListUser {
|
|
this := ListUser{}
|
|
setListUserGetIdAttributeType(&this.Id, id)
|
|
setListUserGetStatusAttributeType(&this.Status, status)
|
|
setListUserGetUsernameAttributeType(&this.Username, username)
|
|
return &this
|
|
}
|
|
|
|
// NewListUserWithDefaults instantiates a new ListUser 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 NewListUserWithDefaults() *ListUser {
|
|
this := ListUser{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *ListUser) GetId() (ret ListUserGetIdRetType) {
|
|
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 *ListUser) GetIdOk() (ret ListUserGetIdRetType, ok bool) {
|
|
return getListUserGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *ListUser) SetId(v ListUserGetIdRetType) {
|
|
setListUserGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetStatus returns the Status field value
|
|
func (o *ListUser) GetStatus() (ret ListUserGetStatusRetType) {
|
|
ret, _ = o.GetStatusOk()
|
|
return ret
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ListUser) GetStatusOk() (ret ListUserGetStatusRetType, ok bool) {
|
|
return getListUserGetStatusAttributeTypeOk(o.Status)
|
|
}
|
|
|
|
// SetStatus sets field value
|
|
func (o *ListUser) SetStatus(v ListUserGetStatusRetType) {
|
|
setListUserGetStatusAttributeType(&o.Status, v)
|
|
}
|
|
|
|
// GetUsername returns the Username field value
|
|
func (o *ListUser) GetUsername() (ret ListUserGetUsernameRetType) {
|
|
ret, _ = o.GetUsernameOk()
|
|
return ret
|
|
}
|
|
|
|
// GetUsernameOk returns a tuple with the Username field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ListUser) GetUsernameOk() (ret ListUserGetUsernameRetType, ok bool) {
|
|
return getListUserGetUsernameAttributeTypeOk(o.Username)
|
|
}
|
|
|
|
// SetUsername sets field value
|
|
func (o *ListUser) SetUsername(v ListUserGetUsernameRetType) {
|
|
setListUserGetUsernameAttributeType(&o.Username, v)
|
|
}
|
|
|
|
func (o ListUser) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getListUserGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getListUserGetStatusAttributeTypeOk(o.Status); ok {
|
|
toSerialize["Status"] = val
|
|
}
|
|
if val, ok := getListUserGetUsernameAttributeTypeOk(o.Username); ok {
|
|
toSerialize["Username"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableListUser struct {
|
|
value *ListUser
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableListUser) Get() *ListUser {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableListUser) Set(val *ListUser) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableListUser) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableListUser) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableListUser(val *ListUser) *NullableListUser {
|
|
return &NullableListUser{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableListUser) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableListUser) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|