## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
350 lines
11 KiB
Go
350 lines
11 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 GetBackupResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GetBackupResponse{}
|
|
|
|
/*
|
|
types and functions for completionTime
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetBackupResponseGetCompletionTimeAttributeType = *string
|
|
|
|
func getGetBackupResponseGetCompletionTimeAttributeTypeOk(arg GetBackupResponseGetCompletionTimeAttributeType) (ret GetBackupResponseGetCompletionTimeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetBackupResponseGetCompletionTimeAttributeType(arg *GetBackupResponseGetCompletionTimeAttributeType, val GetBackupResponseGetCompletionTimeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetBackupResponseGetCompletionTimeArgType = string
|
|
type GetBackupResponseGetCompletionTimeRetType = string
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isLong
|
|
type GetBackupResponseGetIdAttributeType = *int64
|
|
type GetBackupResponseGetIdArgType = int64
|
|
type GetBackupResponseGetIdRetType = int64
|
|
|
|
func getGetBackupResponseGetIdAttributeTypeOk(arg GetBackupResponseGetIdAttributeType) (ret GetBackupResponseGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetBackupResponseGetIdAttributeType(arg *GetBackupResponseGetIdAttributeType, val GetBackupResponseGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetBackupResponseGetNameAttributeType = *string
|
|
|
|
func getGetBackupResponseGetNameAttributeTypeOk(arg GetBackupResponseGetNameAttributeType) (ret GetBackupResponseGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetBackupResponseGetNameAttributeType(arg *GetBackupResponseGetNameAttributeType, val GetBackupResponseGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetBackupResponseGetNameArgType = string
|
|
type GetBackupResponseGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for retainedUntil
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetBackupResponseGetRetainedUntilAttributeType = *string
|
|
|
|
func getGetBackupResponseGetRetainedUntilAttributeTypeOk(arg GetBackupResponseGetRetainedUntilAttributeType) (ret GetBackupResponseGetRetainedUntilRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetBackupResponseGetRetainedUntilAttributeType(arg *GetBackupResponseGetRetainedUntilAttributeType, val GetBackupResponseGetRetainedUntilRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetBackupResponseGetRetainedUntilArgType = string
|
|
type GetBackupResponseGetRetainedUntilRetType = string
|
|
|
|
/*
|
|
types and functions for size
|
|
*/
|
|
|
|
// isLong
|
|
type GetBackupResponseGetSizeAttributeType = *int64
|
|
type GetBackupResponseGetSizeArgType = int64
|
|
type GetBackupResponseGetSizeRetType = int64
|
|
|
|
func getGetBackupResponseGetSizeAttributeTypeOk(arg GetBackupResponseGetSizeAttributeType) (ret GetBackupResponseGetSizeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetBackupResponseGetSizeAttributeType(arg *GetBackupResponseGetSizeAttributeType, val GetBackupResponseGetSizeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for type
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetBackupResponseGetTypeAttributeType = *string
|
|
|
|
func getGetBackupResponseGetTypeAttributeTypeOk(arg GetBackupResponseGetTypeAttributeType) (ret GetBackupResponseGetTypeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetBackupResponseGetTypeAttributeType(arg *GetBackupResponseGetTypeAttributeType, val GetBackupResponseGetTypeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetBackupResponseGetTypeArgType = string
|
|
type GetBackupResponseGetTypeRetType = string
|
|
|
|
// GetBackupResponse struct for GetBackupResponse
|
|
type GetBackupResponse struct {
|
|
// The time when the backup was completed in RFC3339 format.
|
|
// REQUIRED
|
|
CompletionTime GetBackupResponseGetCompletionTimeAttributeType `json:"completionTime" required:"true"`
|
|
// The ID of the backup.
|
|
// REQUIRED
|
|
Id GetBackupResponseGetIdAttributeType `json:"id" required:"true"`
|
|
// The name of the backup.
|
|
// REQUIRED
|
|
Name GetBackupResponseGetNameAttributeType `json:"name" required:"true"`
|
|
// The time until the backup will be retained.
|
|
// REQUIRED
|
|
RetainedUntil GetBackupResponseGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"`
|
|
// The size of the backup in bytes.
|
|
// REQUIRED
|
|
Size GetBackupResponseGetSizeAttributeType `json:"size" required:"true"`
|
|
// The type of the backup, which can be automated or manual triggered.
|
|
// REQUIRED
|
|
Type GetBackupResponseGetTypeAttributeType `json:"type" required:"true"`
|
|
}
|
|
|
|
type _GetBackupResponse GetBackupResponse
|
|
|
|
// NewGetBackupResponse instantiates a new GetBackupResponse 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 NewGetBackupResponse(completionTime GetBackupResponseGetCompletionTimeArgType, id GetBackupResponseGetIdArgType, name GetBackupResponseGetNameArgType, retainedUntil GetBackupResponseGetRetainedUntilArgType, size GetBackupResponseGetSizeArgType, types GetBackupResponseGetTypeArgType) *GetBackupResponse {
|
|
this := GetBackupResponse{}
|
|
setGetBackupResponseGetCompletionTimeAttributeType(&this.CompletionTime, completionTime)
|
|
setGetBackupResponseGetIdAttributeType(&this.Id, id)
|
|
setGetBackupResponseGetNameAttributeType(&this.Name, name)
|
|
setGetBackupResponseGetRetainedUntilAttributeType(&this.RetainedUntil, retainedUntil)
|
|
setGetBackupResponseGetSizeAttributeType(&this.Size, size)
|
|
setGetBackupResponseGetTypeAttributeType(&this.Type, types)
|
|
return &this
|
|
}
|
|
|
|
// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse 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 NewGetBackupResponseWithDefaults() *GetBackupResponse {
|
|
this := GetBackupResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetCompletionTime returns the CompletionTime field value
|
|
func (o *GetBackupResponse) GetCompletionTime() (ret GetBackupResponseGetCompletionTimeRetType) {
|
|
ret, _ = o.GetCompletionTimeOk()
|
|
return ret
|
|
}
|
|
|
|
// GetCompletionTimeOk returns a tuple with the CompletionTime field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GetBackupResponse) GetCompletionTimeOk() (ret GetBackupResponseGetCompletionTimeRetType, ok bool) {
|
|
return getGetBackupResponseGetCompletionTimeAttributeTypeOk(o.CompletionTime)
|
|
}
|
|
|
|
// SetCompletionTime sets field value
|
|
func (o *GetBackupResponse) SetCompletionTime(v GetBackupResponseGetCompletionTimeRetType) {
|
|
setGetBackupResponseGetCompletionTimeAttributeType(&o.CompletionTime, v)
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *GetBackupResponse) GetId() (ret GetBackupResponseGetIdRetType) {
|
|
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 *GetBackupResponse) GetIdOk() (ret GetBackupResponseGetIdRetType, ok bool) {
|
|
return getGetBackupResponseGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *GetBackupResponse) SetId(v GetBackupResponseGetIdRetType) {
|
|
setGetBackupResponseGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *GetBackupResponse) GetName() (ret GetBackupResponseGetNameRetType) {
|
|
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 *GetBackupResponse) GetNameOk() (ret GetBackupResponseGetNameRetType, ok bool) {
|
|
return getGetBackupResponseGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *GetBackupResponse) SetName(v GetBackupResponseGetNameRetType) {
|
|
setGetBackupResponseGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetRetainedUntil returns the RetainedUntil field value
|
|
func (o *GetBackupResponse) GetRetainedUntil() (ret GetBackupResponseGetRetainedUntilRetType) {
|
|
ret, _ = o.GetRetainedUntilOk()
|
|
return ret
|
|
}
|
|
|
|
// GetRetainedUntilOk returns a tuple with the RetainedUntil field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GetBackupResponse) GetRetainedUntilOk() (ret GetBackupResponseGetRetainedUntilRetType, ok bool) {
|
|
return getGetBackupResponseGetRetainedUntilAttributeTypeOk(o.RetainedUntil)
|
|
}
|
|
|
|
// SetRetainedUntil sets field value
|
|
func (o *GetBackupResponse) SetRetainedUntil(v GetBackupResponseGetRetainedUntilRetType) {
|
|
setGetBackupResponseGetRetainedUntilAttributeType(&o.RetainedUntil, v)
|
|
}
|
|
|
|
// GetSize returns the Size field value
|
|
func (o *GetBackupResponse) GetSize() (ret GetBackupResponseGetSizeRetType) {
|
|
ret, _ = o.GetSizeOk()
|
|
return ret
|
|
}
|
|
|
|
// GetSizeOk returns a tuple with the Size field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GetBackupResponse) GetSizeOk() (ret GetBackupResponseGetSizeRetType, ok bool) {
|
|
return getGetBackupResponseGetSizeAttributeTypeOk(o.Size)
|
|
}
|
|
|
|
// SetSize sets field value
|
|
func (o *GetBackupResponse) SetSize(v GetBackupResponseGetSizeRetType) {
|
|
setGetBackupResponseGetSizeAttributeType(&o.Size, v)
|
|
}
|
|
|
|
// GetType returns the Type field value
|
|
func (o *GetBackupResponse) GetType() (ret GetBackupResponseGetTypeRetType) {
|
|
ret, _ = o.GetTypeOk()
|
|
return ret
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GetBackupResponse) GetTypeOk() (ret GetBackupResponseGetTypeRetType, ok bool) {
|
|
return getGetBackupResponseGetTypeAttributeTypeOk(o.Type)
|
|
}
|
|
|
|
// SetType sets field value
|
|
func (o *GetBackupResponse) SetType(v GetBackupResponseGetTypeRetType) {
|
|
setGetBackupResponseGetTypeAttributeType(&o.Type, v)
|
|
}
|
|
|
|
func (o GetBackupResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getGetBackupResponseGetCompletionTimeAttributeTypeOk(o.CompletionTime); ok {
|
|
toSerialize["CompletionTime"] = val
|
|
}
|
|
if val, ok := getGetBackupResponseGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getGetBackupResponseGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getGetBackupResponseGetRetainedUntilAttributeTypeOk(o.RetainedUntil); ok {
|
|
toSerialize["RetainedUntil"] = val
|
|
}
|
|
if val, ok := getGetBackupResponseGetSizeAttributeTypeOk(o.Size); ok {
|
|
toSerialize["Size"] = val
|
|
}
|
|
if val, ok := getGetBackupResponseGetTypeAttributeTypeOk(o.Type); ok {
|
|
toSerialize["Type"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableGetBackupResponse struct {
|
|
value *GetBackupResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGetBackupResponse) Get() *GetBackupResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGetBackupResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGetBackupResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse {
|
|
return &NullableGetBackupResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|