* 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>
172 lines
6.2 KiB
Go
172 lines
6.2 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 TriggerRestoreRequestPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TriggerRestoreRequestPayload{}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type TriggerRestoreRequestPayloadGetNameAttributeType = *string
|
|
|
|
func getTriggerRestoreRequestPayloadGetNameAttributeTypeOk(arg TriggerRestoreRequestPayloadGetNameAttributeType) (ret TriggerRestoreRequestPayloadGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTriggerRestoreRequestPayloadGetNameAttributeType(arg *TriggerRestoreRequestPayloadGetNameAttributeType, val TriggerRestoreRequestPayloadGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type TriggerRestoreRequestPayloadGetNameArgType = string
|
|
type TriggerRestoreRequestPayloadGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for restoreDateTime
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType = *string
|
|
|
|
func getTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeTypeOk(arg TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType) (ret TriggerRestoreRequestPayloadGetRestoreDateTimeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType(arg *TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType, val TriggerRestoreRequestPayloadGetRestoreDateTimeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type TriggerRestoreRequestPayloadGetRestoreDateTimeArgType = string
|
|
type TriggerRestoreRequestPayloadGetRestoreDateTimeRetType = string
|
|
|
|
// TriggerRestoreRequestPayload struct for TriggerRestoreRequestPayload
|
|
type TriggerRestoreRequestPayload struct {
|
|
// The name of the database.
|
|
// REQUIRED
|
|
Name TriggerRestoreRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
|
// the time for the restore it will be calculated between first backup and last backup
|
|
// REQUIRED
|
|
RestoreDateTime TriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType `json:"restoreDateTime" required:"true"`
|
|
}
|
|
|
|
type _TriggerRestoreRequestPayload TriggerRestoreRequestPayload
|
|
|
|
// NewTriggerRestoreRequestPayload instantiates a new TriggerRestoreRequestPayload 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 NewTriggerRestoreRequestPayload(name TriggerRestoreRequestPayloadGetNameArgType, restoreDateTime TriggerRestoreRequestPayloadGetRestoreDateTimeArgType) *TriggerRestoreRequestPayload {
|
|
this := TriggerRestoreRequestPayload{}
|
|
setTriggerRestoreRequestPayloadGetNameAttributeType(&this.Name, name)
|
|
setTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType(&this.RestoreDateTime, restoreDateTime)
|
|
return &this
|
|
}
|
|
|
|
// NewTriggerRestoreRequestPayloadWithDefaults instantiates a new TriggerRestoreRequestPayload 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 NewTriggerRestoreRequestPayloadWithDefaults() *TriggerRestoreRequestPayload {
|
|
this := TriggerRestoreRequestPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *TriggerRestoreRequestPayload) GetName() (ret TriggerRestoreRequestPayloadGetNameRetType) {
|
|
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 *TriggerRestoreRequestPayload) GetNameOk() (ret TriggerRestoreRequestPayloadGetNameRetType, ok bool) {
|
|
return getTriggerRestoreRequestPayloadGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *TriggerRestoreRequestPayload) SetName(v TriggerRestoreRequestPayloadGetNameRetType) {
|
|
setTriggerRestoreRequestPayloadGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetRestoreDateTime returns the RestoreDateTime field value
|
|
func (o *TriggerRestoreRequestPayload) GetRestoreDateTime() (ret TriggerRestoreRequestPayloadGetRestoreDateTimeRetType) {
|
|
ret, _ = o.GetRestoreDateTimeOk()
|
|
return ret
|
|
}
|
|
|
|
// GetRestoreDateTimeOk returns a tuple with the RestoreDateTime field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TriggerRestoreRequestPayload) GetRestoreDateTimeOk() (ret TriggerRestoreRequestPayloadGetRestoreDateTimeRetType, ok bool) {
|
|
return getTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime)
|
|
}
|
|
|
|
// SetRestoreDateTime sets field value
|
|
func (o *TriggerRestoreRequestPayload) SetRestoreDateTime(v TriggerRestoreRequestPayloadGetRestoreDateTimeRetType) {
|
|
setTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeType(&o.RestoreDateTime, v)
|
|
}
|
|
|
|
func (o TriggerRestoreRequestPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getTriggerRestoreRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getTriggerRestoreRequestPayloadGetRestoreDateTimeAttributeTypeOk(o.RestoreDateTime); ok {
|
|
toSerialize["RestoreDateTime"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableTriggerRestoreRequestPayload struct {
|
|
value *TriggerRestoreRequestPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTriggerRestoreRequestPayload) Get() *TriggerRestoreRequestPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTriggerRestoreRequestPayload) Set(val *TriggerRestoreRequestPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTriggerRestoreRequestPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTriggerRestoreRequestPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTriggerRestoreRequestPayload(val *TriggerRestoreRequestPayload) *NullableTriggerRestoreRequestPayload {
|
|
return &NullableTriggerRestoreRequestPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTriggerRestoreRequestPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTriggerRestoreRequestPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|