terraform-provider-stackitp.../pkg/sqlserverflexalpha/model_list_backups_response.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
5.6 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 ListBackupsResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListBackupsResponse{}
/*
types and functions for backups
*/
// isArray
type ListBackupsResponseGetBackupsAttributeType = *[]ListBackup
type ListBackupsResponseGetBackupsArgType = []ListBackup
type ListBackupsResponseGetBackupsRetType = []ListBackup
func getListBackupsResponseGetBackupsAttributeTypeOk(arg ListBackupsResponseGetBackupsAttributeType) (ret ListBackupsResponseGetBackupsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListBackupsResponseGetBackupsAttributeType(arg *ListBackupsResponseGetBackupsAttributeType, val ListBackupsResponseGetBackupsRetType) {
*arg = &val
}
/*
types and functions for databaseName
*/
// isNotNullableString
type ListBackupsResponseGetDatabaseNameAttributeType = *string
func getListBackupsResponseGetDatabaseNameAttributeTypeOk(arg ListBackupsResponseGetDatabaseNameAttributeType) (ret ListBackupsResponseGetDatabaseNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListBackupsResponseGetDatabaseNameAttributeType(arg *ListBackupsResponseGetDatabaseNameAttributeType, val ListBackupsResponseGetDatabaseNameRetType) {
*arg = &val
}
type ListBackupsResponseGetDatabaseNameArgType = string
type ListBackupsResponseGetDatabaseNameRetType = string
// ListBackupsResponse struct for ListBackupsResponse
type ListBackupsResponse struct {
// List of the backups beloning to that database
// REQUIRED
Backups ListBackupsResponseGetBackupsAttributeType `json:"backups" required:"true" validate:"required,dive"`
// Name of the database the backups belong to
// REQUIRED
DatabaseName ListBackupsResponseGetDatabaseNameAttributeType `json:"databaseName" required:"true" validate:"required,databaseName"`
}
type _ListBackupsResponse ListBackupsResponse
// NewListBackupsResponse instantiates a new ListBackupsResponse 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 NewListBackupsResponse(backups ListBackupsResponseGetBackupsArgType, databaseName ListBackupsResponseGetDatabaseNameArgType) *ListBackupsResponse {
this := ListBackupsResponse{}
setListBackupsResponseGetBackupsAttributeType(&this.Backups, backups)
setListBackupsResponseGetDatabaseNameAttributeType(&this.DatabaseName, databaseName)
return &this
}
// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse 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 NewListBackupsResponseWithDefaults() *ListBackupsResponse {
this := ListBackupsResponse{}
return &this
}
// GetBackups returns the Backups field value
func (o *ListBackupsResponse) GetBackups() (ret ListBackupsResponseGetBackupsRetType) {
ret, _ = o.GetBackupsOk()
return ret
}
// GetBackupsOk returns a tuple with the Backups field value
// and a boolean to check if the value has been set.
func (o *ListBackupsResponse) GetBackupsOk() (ret ListBackupsResponseGetBackupsRetType, ok bool) {
return getListBackupsResponseGetBackupsAttributeTypeOk(o.Backups)
}
// SetBackups sets field value
func (o *ListBackupsResponse) SetBackups(v ListBackupsResponseGetBackupsRetType) {
setListBackupsResponseGetBackupsAttributeType(&o.Backups, v)
}
// GetDatabaseName returns the DatabaseName field value
func (o *ListBackupsResponse) GetDatabaseName() (ret ListBackupsResponseGetDatabaseNameRetType) {
ret, _ = o.GetDatabaseNameOk()
return ret
}
// GetDatabaseNameOk returns a tuple with the DatabaseName field value
// and a boolean to check if the value has been set.
func (o *ListBackupsResponse) GetDatabaseNameOk() (ret ListBackupsResponseGetDatabaseNameRetType, ok bool) {
return getListBackupsResponseGetDatabaseNameAttributeTypeOk(o.DatabaseName)
}
// SetDatabaseName sets field value
func (o *ListBackupsResponse) SetDatabaseName(v ListBackupsResponseGetDatabaseNameRetType) {
setListBackupsResponseGetDatabaseNameAttributeType(&o.DatabaseName, v)
}
func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListBackupsResponseGetBackupsAttributeTypeOk(o.Backups); ok {
toSerialize["Backups"] = val
}
if val, ok := getListBackupsResponseGetDatabaseNameAttributeTypeOk(o.DatabaseName); ok {
toSerialize["DatabaseName"] = val
}
return toSerialize, nil
}
type NullableListBackupsResponse struct {
value *ListBackupsResponse
isSet bool
}
func (v NullableListBackupsResponse) Get() *ListBackupsResponse {
return v.value
}
func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) {
v.value = val
v.isSet = true
}
func (v NullableListBackupsResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListBackupsResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse {
return &NullableListBackupsResponse{value: val, isSet: true}
}
func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}