chore: initial push to be able to work together
This commit is contained in:
parent
81e8d48cf6
commit
30070d8470
263 changed files with 45437 additions and 2 deletions
1
pkg/sqlserverflexalpha/.openapi-generator/VERSION
Normal file
1
pkg/sqlserverflexalpha/.openapi-generator/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
6.6.0
|
||||
6170
pkg/sqlserverflexalpha/api_default.go
Normal file
6170
pkg/sqlserverflexalpha/api_default.go
Normal file
File diff suppressed because it is too large
Load diff
1568
pkg/sqlserverflexalpha/api_default_test.go
Normal file
1568
pkg/sqlserverflexalpha/api_default_test.go
Normal file
File diff suppressed because it is too large
Load diff
631
pkg/sqlserverflexalpha/client.go
Normal file
631
pkg/sqlserverflexalpha/client.go
Normal file
|
|
@ -0,0 +1,631 @@
|
|||
/*
|
||||
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 (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/auth"
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||
)
|
||||
|
||||
var (
|
||||
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
|
||||
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
|
||||
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
|
||||
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
|
||||
)
|
||||
|
||||
// APIClient manages communication with the STACKIT MSSQL Service API API v3alpha1
|
||||
// In most cases there should be only one, shared, APIClient.
|
||||
type APIClient struct {
|
||||
cfg *config.Configuration
|
||||
common service // Reuse a single struct instead of allocating one for each service on the heap.
|
||||
defaultApi *DefaultApiService
|
||||
}
|
||||
|
||||
type service struct {
|
||||
client DefaultApi
|
||||
}
|
||||
|
||||
// NewAPIClient creates a new API client.
|
||||
// Optionally receives configuration options
|
||||
func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) {
|
||||
cfg := NewConfiguration()
|
||||
|
||||
for _, option := range opts {
|
||||
err := option(cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("configuring the client: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
err := config.ConfigureRegion(cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("configuring region: %w", err)
|
||||
}
|
||||
|
||||
if cfg.HTTPClient == nil {
|
||||
cfg.HTTPClient = &http.Client{}
|
||||
}
|
||||
|
||||
authRoundTripper, err := auth.SetupAuth(cfg)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("setting up authentication: %w", err)
|
||||
}
|
||||
|
||||
roundTripper := authRoundTripper
|
||||
if cfg.Middleware != nil {
|
||||
roundTripper = config.ChainMiddleware(roundTripper, cfg.Middleware...)
|
||||
}
|
||||
|
||||
cfg.HTTPClient.Transport = roundTripper
|
||||
|
||||
c := &APIClient{}
|
||||
c.cfg = cfg
|
||||
c.common.client = c
|
||||
c.defaultApi = (*DefaultApiService)(&c.common)
|
||||
|
||||
return c, nil
|
||||
}
|
||||
|
||||
func atoi(in string) (int, error) {
|
||||
return strconv.Atoi(in)
|
||||
}
|
||||
|
||||
// selectHeaderContentType select a content type from the available list.
|
||||
func selectHeaderContentType(contentTypes []string) string {
|
||||
if len(contentTypes) == 0 {
|
||||
return ""
|
||||
}
|
||||
if contains(contentTypes, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
return contentTypes[0] // use the first content type specified in 'consumes'
|
||||
}
|
||||
|
||||
// selectHeaderAccept join all accept types and return
|
||||
func selectHeaderAccept(accepts []string) string {
|
||||
if len(accepts) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
if contains(accepts, "application/json") {
|
||||
return "application/json"
|
||||
}
|
||||
|
||||
return strings.Join(accepts, ",")
|
||||
}
|
||||
|
||||
// contains is a case insensitive match, finding needle in a haystack
|
||||
func contains(haystack []string, needle string) bool {
|
||||
for _, a := range haystack {
|
||||
if strings.EqualFold(a, needle) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Verify optional parameters are of the correct type.
|
||||
func typeCheckParameter(obj interface{}, expected string, name string) error {
|
||||
// Make sure there is an object.
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Check the type is as expected.
|
||||
if reflect.TypeOf(obj).String() != expected {
|
||||
return fmt.Errorf("expected %s to be of type %s but received %s", name, expected, reflect.TypeOf(obj).String())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ParameterValueToString(obj interface{}, key string) string {
|
||||
if reflect.TypeOf(obj).Kind() != reflect.Ptr {
|
||||
return fmt.Sprintf("%v", obj)
|
||||
}
|
||||
var param, ok = obj.(MappedNullable)
|
||||
if !ok {
|
||||
return ""
|
||||
}
|
||||
dataMap, err := param.ToMap()
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return fmt.Sprintf("%v", dataMap[key])
|
||||
}
|
||||
|
||||
// parameterAddToHeaderOrQuery adds the provided object to the request header or url query
|
||||
// supporting deep object syntax
|
||||
func parameterAddToHeaderOrQuery(headerOrQueryParams interface{}, keyPrefix string, obj interface{}, collectionType string) {
|
||||
var v = reflect.ValueOf(obj)
|
||||
var value = ""
|
||||
if v == reflect.ValueOf(nil) {
|
||||
value = "null"
|
||||
} else {
|
||||
switch v.Kind() {
|
||||
case reflect.Invalid:
|
||||
value = "invalid"
|
||||
|
||||
case reflect.Struct:
|
||||
if t, ok := obj.(MappedNullable); ok {
|
||||
dataMap, err := t.ToMap()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, dataMap, collectionType)
|
||||
return
|
||||
}
|
||||
if t, ok := obj.(time.Time); ok {
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339), collectionType)
|
||||
return
|
||||
}
|
||||
value = v.Type().String() + " value"
|
||||
case reflect.Slice:
|
||||
var indValue = reflect.ValueOf(obj)
|
||||
if indValue == reflect.ValueOf(nil) {
|
||||
return
|
||||
}
|
||||
var lenIndValue = indValue.Len()
|
||||
for i := 0; i < lenIndValue; i++ {
|
||||
var arrayValue = indValue.Index(i)
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, arrayValue.Interface(), collectionType)
|
||||
}
|
||||
return
|
||||
|
||||
case reflect.Map:
|
||||
var indValue = reflect.ValueOf(obj)
|
||||
if indValue == reflect.ValueOf(nil) {
|
||||
return
|
||||
}
|
||||
iter := indValue.MapRange()
|
||||
for iter.Next() {
|
||||
k, v := iter.Key(), iter.Value()
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, fmt.Sprintf("%s[%s]", keyPrefix, k.String()), v.Interface(), collectionType)
|
||||
}
|
||||
return
|
||||
|
||||
case reflect.Interface:
|
||||
fallthrough
|
||||
case reflect.Ptr:
|
||||
parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), collectionType)
|
||||
return
|
||||
|
||||
case reflect.Int, reflect.Int8, reflect.Int16,
|
||||
reflect.Int32, reflect.Int64:
|
||||
value = strconv.FormatInt(v.Int(), 10)
|
||||
case reflect.Uint, reflect.Uint8, reflect.Uint16,
|
||||
reflect.Uint32, reflect.Uint64, reflect.Uintptr:
|
||||
value = strconv.FormatUint(v.Uint(), 10)
|
||||
case reflect.Float32, reflect.Float64:
|
||||
value = strconv.FormatFloat(v.Float(), 'g', -1, 32)
|
||||
case reflect.Bool:
|
||||
value = strconv.FormatBool(v.Bool())
|
||||
case reflect.String:
|
||||
value = v.String()
|
||||
default:
|
||||
value = v.Type().String() + " value"
|
||||
}
|
||||
}
|
||||
|
||||
switch valuesMap := headerOrQueryParams.(type) {
|
||||
case url.Values:
|
||||
if collectionType == "csv" && valuesMap.Get(keyPrefix) != "" {
|
||||
valuesMap.Set(keyPrefix, valuesMap.Get(keyPrefix)+","+value)
|
||||
} else {
|
||||
valuesMap.Add(keyPrefix, value)
|
||||
}
|
||||
break
|
||||
case map[string]string:
|
||||
valuesMap[keyPrefix] = value
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
// helper for converting interface{} parameters to json strings
|
||||
func parameterToJson(obj interface{}) (string, error) {
|
||||
jsonBuf, err := json.Marshal(obj)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return string(jsonBuf), err
|
||||
}
|
||||
|
||||
// callAPI do the request.
|
||||
func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) {
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpRequestOut(request, true)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
|
||||
resp, err := c.cfg.HTTPClient.Do(request)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
|
||||
if c.cfg.Debug {
|
||||
dump, err := httputil.DumpResponse(resp, true)
|
||||
if err != nil {
|
||||
return resp, err
|
||||
}
|
||||
log.Printf("\n%s\n", string(dump))
|
||||
}
|
||||
return resp, err
|
||||
}
|
||||
|
||||
// Allow modification of underlying config for alternate implementations and testing
|
||||
// Caution: modifying the configuration while live can cause data races and potentially unwanted behavior
|
||||
func (c *APIClient) GetConfig() *config.Configuration {
|
||||
return c.cfg
|
||||
}
|
||||
|
||||
type formFile struct {
|
||||
fileBytes []byte
|
||||
fileName string
|
||||
formFileName string
|
||||
}
|
||||
|
||||
// prepareRequest build the request
|
||||
func (c *APIClient) prepareRequest(
|
||||
ctx context.Context,
|
||||
path string, method string,
|
||||
postBody interface{},
|
||||
headerParams map[string]string,
|
||||
queryParams url.Values,
|
||||
formParams url.Values,
|
||||
formFiles []formFile) (localVarRequest *http.Request, err error) {
|
||||
|
||||
var body *bytes.Buffer
|
||||
|
||||
// Detect postBody type and post.
|
||||
if !IsNil(postBody) {
|
||||
contentType := headerParams["Content-Type"]
|
||||
if contentType == "" {
|
||||
contentType = detectContentType(postBody)
|
||||
headerParams["Content-Type"] = contentType
|
||||
}
|
||||
|
||||
body, err = setBody(postBody, contentType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
// add form parameters and file if available.
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) {
|
||||
if body != nil {
|
||||
return nil, fmt.Errorf("cannot specify postBody and multipart form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
w := multipart.NewWriter(body)
|
||||
|
||||
for k, v := range formParams {
|
||||
for _, iv := range v {
|
||||
if strings.HasPrefix(k, "@") { // file
|
||||
err = addFile(w, k[1:], iv)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
} else { // form value
|
||||
w.WriteField(k, iv)
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, formFile := range formFiles {
|
||||
if len(formFile.fileBytes) > 0 && formFile.fileName != "" {
|
||||
w.Boundary()
|
||||
part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_, err = part.Write(formFile.fileBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set the Boundary in the Content-Type
|
||||
headerParams["Content-Type"] = w.FormDataContentType()
|
||||
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
w.Close()
|
||||
}
|
||||
|
||||
if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 {
|
||||
if body != nil {
|
||||
return nil, fmt.Errorf("cannot specify postBody and x-www-form-urlencoded form at the same time.")
|
||||
}
|
||||
body = &bytes.Buffer{}
|
||||
body.WriteString(formParams.Encode())
|
||||
// Set Content-Length
|
||||
headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len())
|
||||
}
|
||||
|
||||
// Setup path and query parameters
|
||||
url, err := url.Parse(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Override request host, if applicable
|
||||
if c.cfg.Host != "" {
|
||||
url.Host = c.cfg.Host
|
||||
}
|
||||
|
||||
// Override request scheme, if applicable
|
||||
if c.cfg.Scheme != "" {
|
||||
url.Scheme = c.cfg.Scheme
|
||||
}
|
||||
|
||||
// Adding Query Param
|
||||
query := url.Query()
|
||||
for k, v := range queryParams {
|
||||
for _, iv := range v {
|
||||
query.Add(k, iv)
|
||||
}
|
||||
}
|
||||
|
||||
// Encode the parameters.
|
||||
url.RawQuery = queryParamSplit.ReplaceAllStringFunc(query.Encode(), func(s string) string {
|
||||
pieces := strings.Split(s, "=")
|
||||
pieces[0] = queryDescape.Replace(pieces[0])
|
||||
return strings.Join(pieces, "=")
|
||||
})
|
||||
|
||||
// Generate a new request
|
||||
if body != nil {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), body)
|
||||
} else {
|
||||
localVarRequest, err = http.NewRequest(method, url.String(), nil)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// add header parameters, if any
|
||||
if len(headerParams) > 0 {
|
||||
headers := http.Header{}
|
||||
for h, v := range headerParams {
|
||||
headers[h] = []string{v}
|
||||
}
|
||||
localVarRequest.Header = headers
|
||||
}
|
||||
|
||||
// Add the user agent to the request.
|
||||
localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent)
|
||||
|
||||
if ctx != nil {
|
||||
// add context to the request
|
||||
localVarRequest = localVarRequest.WithContext(ctx)
|
||||
|
||||
// Walk through any authentication.
|
||||
|
||||
}
|
||||
|
||||
for header, value := range c.cfg.DefaultHeader {
|
||||
localVarRequest.Header.Add(header, value)
|
||||
}
|
||||
return localVarRequest, nil
|
||||
}
|
||||
|
||||
func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) {
|
||||
if len(b) == 0 {
|
||||
return nil
|
||||
}
|
||||
if s, ok := v.(*string); ok {
|
||||
*s = string(b)
|
||||
return nil
|
||||
}
|
||||
if f, ok := v.(*os.File); ok {
|
||||
f, err = os.CreateTemp("", "HttpClientFile")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = f.Write(b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = f.Seek(0, io.SeekStart)
|
||||
return
|
||||
}
|
||||
if f, ok := v.(**os.File); ok {
|
||||
*f, err = os.CreateTemp("", "HttpClientFile")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = (*f).Write(b)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
_, err = (*f).Seek(0, io.SeekStart)
|
||||
return
|
||||
}
|
||||
if xmlCheck.MatchString(contentType) {
|
||||
if err = xml.Unmarshal(b, v); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if jsonCheck.MatchString(contentType) {
|
||||
if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas
|
||||
if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined
|
||||
if err = unmarshalObj.UnmarshalJSON(b); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
return fmt.Errorf("unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined")
|
||||
}
|
||||
} else if err = json.Unmarshal(b, v); err != nil { // simple model
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("undefined response type")
|
||||
}
|
||||
|
||||
// Add a file to the multipart request
|
||||
func addFile(w *multipart.Writer, fieldName, path string) error {
|
||||
file, err := os.Open(filepath.Clean(path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = file.Close()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
part, err := w.CreateFormFile(fieldName, filepath.Base(path))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
_, err = io.Copy(part, file)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
// A wrapper for strict JSON decoding
|
||||
func newStrictDecoder(data []byte) *json.Decoder {
|
||||
dec := json.NewDecoder(bytes.NewBuffer(data))
|
||||
dec.DisallowUnknownFields()
|
||||
return dec
|
||||
}
|
||||
|
||||
// Set request body from an interface{}
|
||||
func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) {
|
||||
if bodyBuf == nil {
|
||||
bodyBuf = &bytes.Buffer{}
|
||||
}
|
||||
|
||||
if reader, ok := body.(io.Reader); ok {
|
||||
_, err = bodyBuf.ReadFrom(reader)
|
||||
} else if fp, ok := body.(*os.File); ok {
|
||||
_, err = bodyBuf.ReadFrom(fp)
|
||||
} else if b, ok := body.([]byte); ok {
|
||||
_, err = bodyBuf.Write(b)
|
||||
} else if s, ok := body.(string); ok {
|
||||
_, err = bodyBuf.WriteString(s)
|
||||
} else if s, ok := body.(*string); ok {
|
||||
_, err = bodyBuf.WriteString(*s)
|
||||
} else if jsonCheck.MatchString(contentType) {
|
||||
err = json.NewEncoder(bodyBuf).Encode(body)
|
||||
} else if xmlCheck.MatchString(contentType) {
|
||||
err = xml.NewEncoder(bodyBuf).Encode(body)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if bodyBuf.Len() == 0 {
|
||||
err = fmt.Errorf("invalid body type %s", contentType)
|
||||
return nil, err
|
||||
}
|
||||
return bodyBuf, nil
|
||||
}
|
||||
|
||||
// detectContentType method is used to figure out `Request.Body` content type for request header
|
||||
func detectContentType(body interface{}) string {
|
||||
contentType := "text/plain; charset=utf-8"
|
||||
kind := reflect.TypeOf(body).Kind()
|
||||
|
||||
switch kind {
|
||||
case reflect.Struct, reflect.Map, reflect.Ptr:
|
||||
contentType = "application/json; charset=utf-8"
|
||||
case reflect.String:
|
||||
contentType = "text/plain; charset=utf-8"
|
||||
default:
|
||||
if b, ok := body.([]byte); ok {
|
||||
contentType = http.DetectContentType(b)
|
||||
} else if kind == reflect.Slice {
|
||||
contentType = "application/json; charset=utf-8"
|
||||
}
|
||||
}
|
||||
|
||||
return contentType
|
||||
}
|
||||
|
||||
// Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go
|
||||
type cacheControl map[string]string
|
||||
|
||||
func parseCacheControl(headers http.Header) cacheControl {
|
||||
cc := cacheControl{}
|
||||
ccHeader := headers.Get("Cache-Control")
|
||||
for _, part := range strings.Split(ccHeader, ",") {
|
||||
part = strings.Trim(part, " ")
|
||||
if part == "" {
|
||||
continue
|
||||
}
|
||||
if strings.ContainsRune(part, '=') {
|
||||
keyval := strings.Split(part, "=")
|
||||
cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",")
|
||||
} else {
|
||||
cc[part] = ""
|
||||
}
|
||||
}
|
||||
return cc
|
||||
}
|
||||
|
||||
// CacheExpires helper function to determine remaining time before repeating a request.
|
||||
func CacheExpires(r *http.Response) time.Time {
|
||||
// Figure out when the cache expires.
|
||||
var expires time.Time
|
||||
now, err := time.Parse(time.RFC1123, r.Header.Get("date"))
|
||||
if err != nil {
|
||||
return time.Now()
|
||||
}
|
||||
respCacheControl := parseCacheControl(r.Header)
|
||||
|
||||
if maxAge, ok := respCacheControl["max-age"]; ok {
|
||||
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||
if err != nil {
|
||||
expires = now
|
||||
} else {
|
||||
expires = now.Add(lifetime)
|
||||
}
|
||||
} else {
|
||||
expiresHeader := r.Header.Get("Expires")
|
||||
if expiresHeader != "" {
|
||||
expires, err = time.Parse(time.RFC1123, expiresHeader)
|
||||
if err != nil {
|
||||
expires = now
|
||||
}
|
||||
}
|
||||
}
|
||||
return expires
|
||||
}
|
||||
|
||||
func strlen(s string) int {
|
||||
return utf8.RuneCountInString(s)
|
||||
}
|
||||
41
pkg/sqlserverflexalpha/configuration.go
Normal file
41
pkg/sqlserverflexalpha/configuration.go
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
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 (
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||
)
|
||||
|
||||
// NewConfiguration returns a new Configuration object
|
||||
func NewConfiguration() *config.Configuration {
|
||||
cfg := &config.Configuration{
|
||||
DefaultHeader: make(map[string]string),
|
||||
UserAgent: "stackit-sdk-go/sqlserverflexalpha",
|
||||
Debug: false,
|
||||
Servers: config.ServerConfigurations{
|
||||
{
|
||||
URL: "https://mssql-flex-service.api.{region}stackit.cloud",
|
||||
Description: "No description provided",
|
||||
Variables: map[string]config.ServerVariable{
|
||||
"region": {
|
||||
Description: "No description provided",
|
||||
DefaultValue: "eu01.",
|
||||
EnumValues: []string{
|
||||
"eu01.",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
OperationServers: map[string]config.ServerConfigurations{},
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
307
pkg/sqlserverflexalpha/model_backup_running_restore.go
Normal file
307
pkg/sqlserverflexalpha/model_backup_running_restore.go
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
/*
|
||||
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 BackupRunningRestore type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BackupRunningRestore{}
|
||||
|
||||
/*
|
||||
types and functions for command
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupRunningRestoreGetCommandAttributeType = *string
|
||||
|
||||
func getBackupRunningRestoreGetCommandAttributeTypeOk(arg BackupRunningRestoreGetCommandAttributeType) (ret BackupRunningRestoreGetCommandRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupRunningRestoreGetCommandAttributeType(arg *BackupRunningRestoreGetCommandAttributeType, val BackupRunningRestoreGetCommandRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupRunningRestoreGetCommandArgType = string
|
||||
type BackupRunningRestoreGetCommandRetType = string
|
||||
|
||||
/*
|
||||
types and functions for database_name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupRunningRestoreGetDatabaseNameAttributeType = *string
|
||||
|
||||
func getBackupRunningRestoreGetDatabaseNameAttributeTypeOk(arg BackupRunningRestoreGetDatabaseNameAttributeType) (ret BackupRunningRestoreGetDatabaseNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupRunningRestoreGetDatabaseNameAttributeType(arg *BackupRunningRestoreGetDatabaseNameAttributeType, val BackupRunningRestoreGetDatabaseNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupRunningRestoreGetDatabaseNameArgType = string
|
||||
type BackupRunningRestoreGetDatabaseNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for estimated_completion_time
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupRunningRestoreGetEstimatedCompletionTimeAttributeType = *string
|
||||
|
||||
func getBackupRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(arg BackupRunningRestoreGetEstimatedCompletionTimeAttributeType) (ret BackupRunningRestoreGetEstimatedCompletionTimeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupRunningRestoreGetEstimatedCompletionTimeAttributeType(arg *BackupRunningRestoreGetEstimatedCompletionTimeAttributeType, val BackupRunningRestoreGetEstimatedCompletionTimeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupRunningRestoreGetEstimatedCompletionTimeArgType = string
|
||||
type BackupRunningRestoreGetEstimatedCompletionTimeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for percent_complete
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type BackupRunningRestoreGetPercentCompleteAttributeType = *int64
|
||||
type BackupRunningRestoreGetPercentCompleteArgType = int64
|
||||
type BackupRunningRestoreGetPercentCompleteRetType = int64
|
||||
|
||||
func getBackupRunningRestoreGetPercentCompleteAttributeTypeOk(arg BackupRunningRestoreGetPercentCompleteAttributeType) (ret BackupRunningRestoreGetPercentCompleteRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupRunningRestoreGetPercentCompleteAttributeType(arg *BackupRunningRestoreGetPercentCompleteAttributeType, val BackupRunningRestoreGetPercentCompleteRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for start_time
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupRunningRestoreGetStartTimeAttributeType = *string
|
||||
|
||||
func getBackupRunningRestoreGetStartTimeAttributeTypeOk(arg BackupRunningRestoreGetStartTimeAttributeType) (ret BackupRunningRestoreGetStartTimeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupRunningRestoreGetStartTimeAttributeType(arg *BackupRunningRestoreGetStartTimeAttributeType, val BackupRunningRestoreGetStartTimeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupRunningRestoreGetStartTimeArgType = string
|
||||
type BackupRunningRestoreGetStartTimeRetType = string
|
||||
|
||||
// BackupRunningRestore struct for BackupRunningRestore
|
||||
type BackupRunningRestore struct {
|
||||
// the command that was executed
|
||||
// REQUIRED
|
||||
Command BackupRunningRestoreGetCommandAttributeType `json:"command" required:"true" validate:"required,restoreCommand"`
|
||||
// the name of the database that is being restored
|
||||
// REQUIRED
|
||||
DatabaseName BackupRunningRestoreGetDatabaseNameAttributeType `json:"database_name" required:"true" validate:"required,databaseName"`
|
||||
// the projected time when the restore should be completed
|
||||
// REQUIRED
|
||||
EstimatedCompletionTime BackupRunningRestoreGetEstimatedCompletionTimeAttributeType `json:"estimated_completion_time" required:"true" validate:"required,time"`
|
||||
// the percentage of the current running restore job
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
PercentComplete BackupRunningRestoreGetPercentCompleteAttributeType `json:"percent_complete" required:"true" validate:"required,min=0,max=100"`
|
||||
// the start time of the current running restore job
|
||||
// REQUIRED
|
||||
StartTime BackupRunningRestoreGetStartTimeAttributeType `json:"start_time" required:"true" validate:"required,time"`
|
||||
}
|
||||
|
||||
type _BackupRunningRestore BackupRunningRestore
|
||||
|
||||
// NewBackupRunningRestore instantiates a new BackupRunningRestore 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 NewBackupRunningRestore(command BackupRunningRestoreGetCommandArgType, databaseName BackupRunningRestoreGetDatabaseNameArgType, estimatedCompletionTime BackupRunningRestoreGetEstimatedCompletionTimeArgType, percentComplete BackupRunningRestoreGetPercentCompleteArgType, startTime BackupRunningRestoreGetStartTimeArgType) *BackupRunningRestore {
|
||||
this := BackupRunningRestore{}
|
||||
setBackupRunningRestoreGetCommandAttributeType(&this.Command, command)
|
||||
setBackupRunningRestoreGetDatabaseNameAttributeType(&this.DatabaseName, databaseName)
|
||||
setBackupRunningRestoreGetEstimatedCompletionTimeAttributeType(&this.EstimatedCompletionTime, estimatedCompletionTime)
|
||||
setBackupRunningRestoreGetPercentCompleteAttributeType(&this.PercentComplete, percentComplete)
|
||||
setBackupRunningRestoreGetStartTimeAttributeType(&this.StartTime, startTime)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBackupRunningRestoreWithDefaults instantiates a new BackupRunningRestore 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 NewBackupRunningRestoreWithDefaults() *BackupRunningRestore {
|
||||
this := BackupRunningRestore{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCommand returns the Command field value
|
||||
func (o *BackupRunningRestore) GetCommand() (ret BackupRunningRestoreGetCommandRetType) {
|
||||
ret, _ = o.GetCommandOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCommandOk returns a tuple with the Command field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BackupRunningRestore) GetCommandOk() (ret BackupRunningRestoreGetCommandRetType, ok bool) {
|
||||
return getBackupRunningRestoreGetCommandAttributeTypeOk(o.Command)
|
||||
}
|
||||
|
||||
// SetCommand sets field value
|
||||
func (o *BackupRunningRestore) SetCommand(v BackupRunningRestoreGetCommandRetType) {
|
||||
setBackupRunningRestoreGetCommandAttributeType(&o.Command, v)
|
||||
}
|
||||
|
||||
// GetDatabaseName returns the DatabaseName field value
|
||||
func (o *BackupRunningRestore) GetDatabaseName() (ret BackupRunningRestoreGetDatabaseNameRetType) {
|
||||
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 *BackupRunningRestore) GetDatabaseNameOk() (ret BackupRunningRestoreGetDatabaseNameRetType, ok bool) {
|
||||
return getBackupRunningRestoreGetDatabaseNameAttributeTypeOk(o.DatabaseName)
|
||||
}
|
||||
|
||||
// SetDatabaseName sets field value
|
||||
func (o *BackupRunningRestore) SetDatabaseName(v BackupRunningRestoreGetDatabaseNameRetType) {
|
||||
setBackupRunningRestoreGetDatabaseNameAttributeType(&o.DatabaseName, v)
|
||||
}
|
||||
|
||||
// GetEstimatedCompletionTime returns the EstimatedCompletionTime field value
|
||||
func (o *BackupRunningRestore) GetEstimatedCompletionTime() (ret BackupRunningRestoreGetEstimatedCompletionTimeRetType) {
|
||||
ret, _ = o.GetEstimatedCompletionTimeOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetEstimatedCompletionTimeOk returns a tuple with the EstimatedCompletionTime field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BackupRunningRestore) GetEstimatedCompletionTimeOk() (ret BackupRunningRestoreGetEstimatedCompletionTimeRetType, ok bool) {
|
||||
return getBackupRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(o.EstimatedCompletionTime)
|
||||
}
|
||||
|
||||
// SetEstimatedCompletionTime sets field value
|
||||
func (o *BackupRunningRestore) SetEstimatedCompletionTime(v BackupRunningRestoreGetEstimatedCompletionTimeRetType) {
|
||||
setBackupRunningRestoreGetEstimatedCompletionTimeAttributeType(&o.EstimatedCompletionTime, v)
|
||||
}
|
||||
|
||||
// GetPercentComplete returns the PercentComplete field value
|
||||
func (o *BackupRunningRestore) GetPercentComplete() (ret BackupRunningRestoreGetPercentCompleteRetType) {
|
||||
ret, _ = o.GetPercentCompleteOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPercentCompleteOk returns a tuple with the PercentComplete field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BackupRunningRestore) GetPercentCompleteOk() (ret BackupRunningRestoreGetPercentCompleteRetType, ok bool) {
|
||||
return getBackupRunningRestoreGetPercentCompleteAttributeTypeOk(o.PercentComplete)
|
||||
}
|
||||
|
||||
// SetPercentComplete sets field value
|
||||
func (o *BackupRunningRestore) SetPercentComplete(v BackupRunningRestoreGetPercentCompleteRetType) {
|
||||
setBackupRunningRestoreGetPercentCompleteAttributeType(&o.PercentComplete, v)
|
||||
}
|
||||
|
||||
// GetStartTime returns the StartTime field value
|
||||
func (o *BackupRunningRestore) GetStartTime() (ret BackupRunningRestoreGetStartTimeRetType) {
|
||||
ret, _ = o.GetStartTimeOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetStartTimeOk returns a tuple with the StartTime field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BackupRunningRestore) GetStartTimeOk() (ret BackupRunningRestoreGetStartTimeRetType, ok bool) {
|
||||
return getBackupRunningRestoreGetStartTimeAttributeTypeOk(o.StartTime)
|
||||
}
|
||||
|
||||
// SetStartTime sets field value
|
||||
func (o *BackupRunningRestore) SetStartTime(v BackupRunningRestoreGetStartTimeRetType) {
|
||||
setBackupRunningRestoreGetStartTimeAttributeType(&o.StartTime, v)
|
||||
}
|
||||
|
||||
func (o BackupRunningRestore) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBackupRunningRestoreGetCommandAttributeTypeOk(o.Command); ok {
|
||||
toSerialize["Command"] = val
|
||||
}
|
||||
if val, ok := getBackupRunningRestoreGetDatabaseNameAttributeTypeOk(o.DatabaseName); ok {
|
||||
toSerialize["DatabaseName"] = val
|
||||
}
|
||||
if val, ok := getBackupRunningRestoreGetEstimatedCompletionTimeAttributeTypeOk(o.EstimatedCompletionTime); ok {
|
||||
toSerialize["EstimatedCompletionTime"] = val
|
||||
}
|
||||
if val, ok := getBackupRunningRestoreGetPercentCompleteAttributeTypeOk(o.PercentComplete); ok {
|
||||
toSerialize["PercentComplete"] = val
|
||||
}
|
||||
if val, ok := getBackupRunningRestoreGetStartTimeAttributeTypeOk(o.StartTime); ok {
|
||||
toSerialize["StartTime"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBackupRunningRestore struct {
|
||||
value *BackupRunningRestore
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBackupRunningRestore) Get() *BackupRunningRestore {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBackupRunningRestore) Set(val *BackupRunningRestore) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBackupRunningRestore) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBackupRunningRestore) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBackupRunningRestore(val *BackupRunningRestore) *NullableBackupRunningRestore {
|
||||
return &NullableBackupRunningRestore{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBackupRunningRestore) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBackupRunningRestore) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_backup_running_restore_test.go
Normal file
11
pkg/sqlserverflexalpha/model_backup_running_restore_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
135
pkg/sqlserverflexalpha/model_backup_sort.go
Normal file
135
pkg/sqlserverflexalpha/model_backup_sort.go
Normal file
|
|
@ -0,0 +1,135 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// BackupSort the model 'BackupSort'
|
||||
type BackupSort string
|
||||
|
||||
// List of backup.sort
|
||||
const (
|
||||
BACKUPSORT_END_TIME_DESC BackupSort = "end_time.desc"
|
||||
BACKUPSORT_END_TIME_ASC BackupSort = "end_time.asc"
|
||||
BACKUPSORT_INDEX_DESC BackupSort = "index.desc"
|
||||
BACKUPSORT_INDEX_ASC BackupSort = "index.asc"
|
||||
BACKUPSORT_NAME_DESC BackupSort = "name.desc"
|
||||
BACKUPSORT_NAME_ASC BackupSort = "name.asc"
|
||||
BACKUPSORT_RETAINED_UNTIL_DESC BackupSort = "retained_until.desc"
|
||||
BACKUPSORT_RETAINED_UNTIL_ASC BackupSort = "retained_until.asc"
|
||||
BACKUPSORT_SIZE_DESC BackupSort = "size.desc"
|
||||
BACKUPSORT_SIZE_ASC BackupSort = "size.asc"
|
||||
BACKUPSORT_TYPE_DESC BackupSort = "type.desc"
|
||||
BACKUPSORT_TYPE_ASC BackupSort = "type.asc"
|
||||
)
|
||||
|
||||
// All allowed values of BackupSort enum
|
||||
var AllowedBackupSortEnumValues = []BackupSort{
|
||||
"end_time.desc",
|
||||
"end_time.asc",
|
||||
"index.desc",
|
||||
"index.asc",
|
||||
"name.desc",
|
||||
"name.asc",
|
||||
"retained_until.desc",
|
||||
"retained_until.asc",
|
||||
"size.desc",
|
||||
"size.asc",
|
||||
"type.desc",
|
||||
"type.asc",
|
||||
}
|
||||
|
||||
func (v *BackupSort) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := BackupSort(value)
|
||||
for _, existing := range AllowedBackupSortEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid BackupSort", value)
|
||||
}
|
||||
|
||||
// NewBackupSortFromValue returns a pointer to a valid BackupSort
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewBackupSortFromValue(v string) (*BackupSort, error) {
|
||||
ev := BackupSort(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for BackupSort: valid values are %v", v, AllowedBackupSortEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v BackupSort) IsValid() bool {
|
||||
for _, existing := range AllowedBackupSortEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to backup.sort value
|
||||
func (v BackupSort) Ptr() *BackupSort {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableBackupSort struct {
|
||||
value *BackupSort
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBackupSort) Get() *BackupSort {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBackupSort) Set(val *BackupSort) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBackupSort) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBackupSort) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBackupSort(val *BackupSort) *NullableBackupSort {
|
||||
return &NullableBackupSort{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBackupSort) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBackupSort) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_backup_sort_test.go
Normal file
11
pkg/sqlserverflexalpha/model_backup_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
270
pkg/sqlserverflexalpha/model_create_database_request_payload.go
Normal file
270
pkg/sqlserverflexalpha/model_create_database_request_payload.go
Normal file
|
|
@ -0,0 +1,270 @@
|
|||
/*
|
||||
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 CreateDatabaseRequestPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateDatabaseRequestPayload{}
|
||||
|
||||
/*
|
||||
types and functions for collation
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateDatabaseRequestPayloadGetCollationAttributeType = *string
|
||||
|
||||
func getCreateDatabaseRequestPayloadGetCollationAttributeTypeOk(arg CreateDatabaseRequestPayloadGetCollationAttributeType) (ret CreateDatabaseRequestPayloadGetCollationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateDatabaseRequestPayloadGetCollationAttributeType(arg *CreateDatabaseRequestPayloadGetCollationAttributeType, val CreateDatabaseRequestPayloadGetCollationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateDatabaseRequestPayloadGetCollationArgType = string
|
||||
type CreateDatabaseRequestPayloadGetCollationRetType = string
|
||||
|
||||
/*
|
||||
types and functions for compatibility
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type CreateDatabaseRequestPayloadGetCompatibilityAttributeType = *int64
|
||||
type CreateDatabaseRequestPayloadGetCompatibilityArgType = int64
|
||||
type CreateDatabaseRequestPayloadGetCompatibilityRetType = int64
|
||||
|
||||
func getCreateDatabaseRequestPayloadGetCompatibilityAttributeTypeOk(arg CreateDatabaseRequestPayloadGetCompatibilityAttributeType) (ret CreateDatabaseRequestPayloadGetCompatibilityRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateDatabaseRequestPayloadGetCompatibilityAttributeType(arg *CreateDatabaseRequestPayloadGetCompatibilityAttributeType, val CreateDatabaseRequestPayloadGetCompatibilityRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateDatabaseRequestPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateDatabaseRequestPayloadGetNameAttributeTypeOk(arg CreateDatabaseRequestPayloadGetNameAttributeType) (ret CreateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateDatabaseRequestPayloadGetNameAttributeType(arg *CreateDatabaseRequestPayloadGetNameAttributeType, val CreateDatabaseRequestPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateDatabaseRequestPayloadGetNameArgType = string
|
||||
type CreateDatabaseRequestPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for owner
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateDatabaseRequestPayloadGetOwnerAttributeType = *string
|
||||
|
||||
func getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(arg CreateDatabaseRequestPayloadGetOwnerAttributeType) (ret CreateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateDatabaseRequestPayloadGetOwnerAttributeType(arg *CreateDatabaseRequestPayloadGetOwnerAttributeType, val CreateDatabaseRequestPayloadGetOwnerRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateDatabaseRequestPayloadGetOwnerArgType = string
|
||||
type CreateDatabaseRequestPayloadGetOwnerRetType = string
|
||||
|
||||
// CreateDatabaseRequestPayload struct for CreateDatabaseRequestPayload
|
||||
type CreateDatabaseRequestPayload struct {
|
||||
// The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint.
|
||||
Collation CreateDatabaseRequestPayloadGetCollationAttributeType `json:"collation,omitempty"`
|
||||
// CompatibilityLevel of the Database.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
Compatibility CreateDatabaseRequestPayloadGetCompatibilityAttributeType `json:"compatibility,omitempty"`
|
||||
// The name of the database.
|
||||
// REQUIRED
|
||||
Name CreateDatabaseRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// The owner of the database.
|
||||
// REQUIRED
|
||||
Owner CreateDatabaseRequestPayloadGetOwnerAttributeType `json:"owner" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateDatabaseRequestPayload CreateDatabaseRequestPayload
|
||||
|
||||
// NewCreateDatabaseRequestPayload instantiates a new CreateDatabaseRequestPayload 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 NewCreateDatabaseRequestPayload(name CreateDatabaseRequestPayloadGetNameArgType, owner CreateDatabaseRequestPayloadGetOwnerArgType) *CreateDatabaseRequestPayload {
|
||||
this := CreateDatabaseRequestPayload{}
|
||||
setCreateDatabaseRequestPayloadGetNameAttributeType(&this.Name, name)
|
||||
setCreateDatabaseRequestPayloadGetOwnerAttributeType(&this.Owner, owner)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateDatabaseRequestPayloadWithDefaults instantiates a new CreateDatabaseRequestPayload 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 NewCreateDatabaseRequestPayloadWithDefaults() *CreateDatabaseRequestPayload {
|
||||
this := CreateDatabaseRequestPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCollation returns the Collation field value if set, zero value otherwise.
|
||||
func (o *CreateDatabaseRequestPayload) GetCollation() (res CreateDatabaseRequestPayloadGetCollationRetType) {
|
||||
res, _ = o.GetCollationOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCollationOk returns a tuple with the Collation field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateDatabaseRequestPayload) GetCollationOk() (ret CreateDatabaseRequestPayloadGetCollationRetType, ok bool) {
|
||||
return getCreateDatabaseRequestPayloadGetCollationAttributeTypeOk(o.Collation)
|
||||
}
|
||||
|
||||
// HasCollation returns a boolean if a field has been set.
|
||||
func (o *CreateDatabaseRequestPayload) HasCollation() bool {
|
||||
_, ok := o.GetCollationOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCollation gets a reference to the given string and assigns it to the Collation field.
|
||||
func (o *CreateDatabaseRequestPayload) SetCollation(v CreateDatabaseRequestPayloadGetCollationRetType) {
|
||||
setCreateDatabaseRequestPayloadGetCollationAttributeType(&o.Collation, v)
|
||||
}
|
||||
|
||||
// GetCompatibility returns the Compatibility field value if set, zero value otherwise.
|
||||
func (o *CreateDatabaseRequestPayload) GetCompatibility() (res CreateDatabaseRequestPayloadGetCompatibilityRetType) {
|
||||
res, _ = o.GetCompatibilityOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCompatibilityOk returns a tuple with the Compatibility field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateDatabaseRequestPayload) GetCompatibilityOk() (ret CreateDatabaseRequestPayloadGetCompatibilityRetType, ok bool) {
|
||||
return getCreateDatabaseRequestPayloadGetCompatibilityAttributeTypeOk(o.Compatibility)
|
||||
}
|
||||
|
||||
// HasCompatibility returns a boolean if a field has been set.
|
||||
func (o *CreateDatabaseRequestPayload) HasCompatibility() bool {
|
||||
_, ok := o.GetCompatibilityOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCompatibility gets a reference to the given int64 and assigns it to the Compatibility field.
|
||||
func (o *CreateDatabaseRequestPayload) SetCompatibility(v CreateDatabaseRequestPayloadGetCompatibilityRetType) {
|
||||
setCreateDatabaseRequestPayloadGetCompatibilityAttributeType(&o.Compatibility, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateDatabaseRequestPayload) GetName() (ret CreateDatabaseRequestPayloadGetNameRetType) {
|
||||
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 *CreateDatabaseRequestPayload) GetNameOk() (ret CreateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
||||
return getCreateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateDatabaseRequestPayload) SetName(v CreateDatabaseRequestPayloadGetNameRetType) {
|
||||
setCreateDatabaseRequestPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetOwner returns the Owner field value
|
||||
func (o *CreateDatabaseRequestPayload) GetOwner() (ret CreateDatabaseRequestPayloadGetOwnerRetType) {
|
||||
ret, _ = o.GetOwnerOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetOwnerOk returns a tuple with the Owner field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateDatabaseRequestPayload) GetOwnerOk() (ret CreateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
||||
return getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner)
|
||||
}
|
||||
|
||||
// SetOwner sets field value
|
||||
func (o *CreateDatabaseRequestPayload) SetOwner(v CreateDatabaseRequestPayloadGetOwnerRetType) {
|
||||
setCreateDatabaseRequestPayloadGetOwnerAttributeType(&o.Owner, v)
|
||||
}
|
||||
|
||||
func (o CreateDatabaseRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateDatabaseRequestPayloadGetCollationAttributeTypeOk(o.Collation); ok {
|
||||
toSerialize["Collation"] = val
|
||||
}
|
||||
if val, ok := getCreateDatabaseRequestPayloadGetCompatibilityAttributeTypeOk(o.Compatibility); ok {
|
||||
toSerialize["Compatibility"] = val
|
||||
}
|
||||
if val, ok := getCreateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||
toSerialize["Owner"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateDatabaseRequestPayload struct {
|
||||
value *CreateDatabaseRequestPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateDatabaseRequestPayload) Get() *CreateDatabaseRequestPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateDatabaseRequestPayload) Set(val *CreateDatabaseRequestPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateDatabaseRequestPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateDatabaseRequestPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateDatabaseRequestPayload(val *CreateDatabaseRequestPayload) *NullableCreateDatabaseRequestPayload {
|
||||
return &NullableCreateDatabaseRequestPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateDatabaseRequestPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateDatabaseRequestPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_create_database_response.go
Normal file
126
pkg/sqlserverflexalpha/model_create_database_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 CreateDatabaseResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateDatabaseResponse{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateDatabaseResponseGetIdAttributeType = *int64
|
||||
type CreateDatabaseResponseGetIdArgType = int64
|
||||
type CreateDatabaseResponseGetIdRetType = int64
|
||||
|
||||
func getCreateDatabaseResponseGetIdAttributeTypeOk(arg CreateDatabaseResponseGetIdAttributeType) (ret CreateDatabaseResponseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateDatabaseResponseGetIdAttributeType(arg *CreateDatabaseResponseGetIdAttributeType, val CreateDatabaseResponseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateDatabaseResponse struct for CreateDatabaseResponse
|
||||
type CreateDatabaseResponse struct {
|
||||
// The id of the database.
|
||||
// REQUIRED
|
||||
Id CreateDatabaseResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateDatabaseResponse CreateDatabaseResponse
|
||||
|
||||
// NewCreateDatabaseResponse instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponse(id CreateDatabaseResponseGetIdArgType) *CreateDatabaseResponse {
|
||||
this := CreateDatabaseResponse{}
|
||||
setCreateDatabaseResponseGetIdAttributeType(&this.Id, id)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateDatabaseResponseWithDefaults instantiates a new CreateDatabaseResponse 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 NewCreateDatabaseResponseWithDefaults() *CreateDatabaseResponse {
|
||||
this := CreateDatabaseResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *CreateDatabaseResponse) GetId() (ret CreateDatabaseResponseGetIdRetType) {
|
||||
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 *CreateDatabaseResponse) GetIdOk() (ret CreateDatabaseResponseGetIdRetType, ok bool) {
|
||||
return getCreateDatabaseResponseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *CreateDatabaseResponse) SetId(v CreateDatabaseResponseGetIdRetType) {
|
||||
setCreateDatabaseResponseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
func (o CreateDatabaseResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateDatabaseResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateDatabaseResponse struct {
|
||||
value *CreateDatabaseResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateDatabaseResponse) Get() *CreateDatabaseResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateDatabaseResponse) Set(val *CreateDatabaseResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateDatabaseResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateDatabaseResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateDatabaseResponse(val *CreateDatabaseResponse) *NullableCreateDatabaseResponse {
|
||||
return &NullableCreateDatabaseResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateDatabaseResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateDatabaseResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
489
pkg/sqlserverflexalpha/model_create_instance_request_payload.go
Normal file
489
pkg/sqlserverflexalpha/model_create_instance_request_payload.go
Normal file
|
|
@ -0,0 +1,489 @@
|
|||
/*
|
||||
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 CreateInstanceRequestPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateInstanceRequestPayload{}
|
||||
|
||||
/*
|
||||
types and functions for acl
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateInstanceRequestPayloadGetAclAttributeType = *[]string
|
||||
type CreateInstanceRequestPayloadGetAclArgType = []string
|
||||
type CreateInstanceRequestPayloadGetAclRetType = []string
|
||||
|
||||
func getCreateInstanceRequestPayloadGetAclAttributeTypeOk(arg CreateInstanceRequestPayloadGetAclAttributeType) (ret CreateInstanceRequestPayloadGetAclRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetAclAttributeType(arg *CreateInstanceRequestPayloadGetAclAttributeType, val CreateInstanceRequestPayloadGetAclRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for backupSchedule
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateInstanceRequestPayloadGetBackupScheduleAttributeType = *string
|
||||
|
||||
func getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(arg CreateInstanceRequestPayloadGetBackupScheduleAttributeType) (ret CreateInstanceRequestPayloadGetBackupScheduleRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetBackupScheduleAttributeType(arg *CreateInstanceRequestPayloadGetBackupScheduleAttributeType, val CreateInstanceRequestPayloadGetBackupScheduleRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateInstanceRequestPayloadGetBackupScheduleArgType = string
|
||||
type CreateInstanceRequestPayloadGetBackupScheduleRetType = string
|
||||
|
||||
/*
|
||||
types and functions for encryption
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateInstanceRequestPayloadGetEncryptionAttributeType = *InstanceEncryption
|
||||
type CreateInstanceRequestPayloadGetEncryptionArgType = InstanceEncryption
|
||||
type CreateInstanceRequestPayloadGetEncryptionRetType = InstanceEncryption
|
||||
|
||||
func getCreateInstanceRequestPayloadGetEncryptionAttributeTypeOk(arg CreateInstanceRequestPayloadGetEncryptionAttributeType) (ret CreateInstanceRequestPayloadGetEncryptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetEncryptionAttributeType(arg *CreateInstanceRequestPayloadGetEncryptionAttributeType, val CreateInstanceRequestPayloadGetEncryptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for flavorId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateInstanceRequestPayloadGetFlavorIdAttributeType = *string
|
||||
|
||||
func getCreateInstanceRequestPayloadGetFlavorIdAttributeTypeOk(arg CreateInstanceRequestPayloadGetFlavorIdAttributeType) (ret CreateInstanceRequestPayloadGetFlavorIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetFlavorIdAttributeType(arg *CreateInstanceRequestPayloadGetFlavorIdAttributeType, val CreateInstanceRequestPayloadGetFlavorIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateInstanceRequestPayloadGetFlavorIdArgType = string
|
||||
type CreateInstanceRequestPayloadGetFlavorIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateInstanceRequestPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateInstanceRequestPayloadGetNameAttributeTypeOk(arg CreateInstanceRequestPayloadGetNameAttributeType) (ret CreateInstanceRequestPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetNameAttributeType(arg *CreateInstanceRequestPayloadGetNameAttributeType, val CreateInstanceRequestPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateInstanceRequestPayloadGetNameArgType = string
|
||||
type CreateInstanceRequestPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for network
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateInstanceRequestPayloadGetNetworkAttributeType = *CreateInstanceRequestPayloadNetwork
|
||||
type CreateInstanceRequestPayloadGetNetworkArgType = CreateInstanceRequestPayloadNetwork
|
||||
type CreateInstanceRequestPayloadGetNetworkRetType = CreateInstanceRequestPayloadNetwork
|
||||
|
||||
func getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(arg CreateInstanceRequestPayloadGetNetworkAttributeType) (ret CreateInstanceRequestPayloadGetNetworkRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetNetworkAttributeType(arg *CreateInstanceRequestPayloadGetNetworkAttributeType, val CreateInstanceRequestPayloadGetNetworkRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for retentionDays
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type CreateInstanceRequestPayloadGetRetentionDaysAttributeType = *int64
|
||||
type CreateInstanceRequestPayloadGetRetentionDaysArgType = int64
|
||||
type CreateInstanceRequestPayloadGetRetentionDaysRetType = int64
|
||||
|
||||
func getCreateInstanceRequestPayloadGetRetentionDaysAttributeTypeOk(arg CreateInstanceRequestPayloadGetRetentionDaysAttributeType) (ret CreateInstanceRequestPayloadGetRetentionDaysRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(arg *CreateInstanceRequestPayloadGetRetentionDaysAttributeType, val CreateInstanceRequestPayloadGetRetentionDaysRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for storage
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateInstanceRequestPayloadGetStorageAttributeType = *StorageCreate
|
||||
type CreateInstanceRequestPayloadGetStorageArgType = StorageCreate
|
||||
type CreateInstanceRequestPayloadGetStorageRetType = StorageCreate
|
||||
|
||||
func getCreateInstanceRequestPayloadGetStorageAttributeTypeOk(arg CreateInstanceRequestPayloadGetStorageAttributeType) (ret CreateInstanceRequestPayloadGetStorageRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetStorageAttributeType(arg *CreateInstanceRequestPayloadGetStorageAttributeType, val CreateInstanceRequestPayloadGetStorageRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for version
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type CreateInstanceRequestPayloadGetVersionAttributeType = *InstanceVersion
|
||||
type CreateInstanceRequestPayloadGetVersionArgType = InstanceVersion
|
||||
type CreateInstanceRequestPayloadGetVersionRetType = InstanceVersion
|
||||
|
||||
func getCreateInstanceRequestPayloadGetVersionAttributeTypeOk(arg CreateInstanceRequestPayloadGetVersionAttributeType) (ret CreateInstanceRequestPayloadGetVersionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadGetVersionAttributeType(arg *CreateInstanceRequestPayloadGetVersionAttributeType, val CreateInstanceRequestPayloadGetVersionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateInstanceRequestPayload struct for CreateInstanceRequestPayload
|
||||
type CreateInstanceRequestPayload struct {
|
||||
// Deprecated: List of IPV4 cidr.
|
||||
// REQUIRED
|
||||
Acl CreateInstanceRequestPayloadGetAclAttributeType `json:"acl" required:"true"`
|
||||
// The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.
|
||||
// REQUIRED
|
||||
BackupSchedule CreateInstanceRequestPayloadGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"`
|
||||
Encryption CreateInstanceRequestPayloadGetEncryptionAttributeType `json:"encryption,omitempty"`
|
||||
// The id of the instance flavor.
|
||||
// REQUIRED
|
||||
FlavorId CreateInstanceRequestPayloadGetFlavorIdAttributeType `json:"flavorId" required:"true"`
|
||||
// The name of the instance.
|
||||
// REQUIRED
|
||||
Name CreateInstanceRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
Network CreateInstanceRequestPayloadGetNetworkAttributeType `json:"network,omitempty"`
|
||||
// The days for how long the backup files should be stored before cleaned up. 30 to 365
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
RetentionDays CreateInstanceRequestPayloadGetRetentionDaysAttributeType `json:"retentionDays" required:"true"`
|
||||
// REQUIRED
|
||||
Storage CreateInstanceRequestPayloadGetStorageAttributeType `json:"storage" required:"true"`
|
||||
// REQUIRED
|
||||
Version CreateInstanceRequestPayloadGetVersionAttributeType `json:"version" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateInstanceRequestPayload CreateInstanceRequestPayload
|
||||
|
||||
// NewCreateInstanceRequestPayload instantiates a new CreateInstanceRequestPayload 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 NewCreateInstanceRequestPayload(acl CreateInstanceRequestPayloadGetAclArgType, backupSchedule CreateInstanceRequestPayloadGetBackupScheduleArgType, flavorId CreateInstanceRequestPayloadGetFlavorIdArgType, name CreateInstanceRequestPayloadGetNameArgType, retentionDays CreateInstanceRequestPayloadGetRetentionDaysArgType, storage CreateInstanceRequestPayloadGetStorageArgType, version CreateInstanceRequestPayloadGetVersionArgType) *CreateInstanceRequestPayload {
|
||||
this := CreateInstanceRequestPayload{}
|
||||
setCreateInstanceRequestPayloadGetAclAttributeType(&this.Acl, acl)
|
||||
setCreateInstanceRequestPayloadGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule)
|
||||
setCreateInstanceRequestPayloadGetFlavorIdAttributeType(&this.FlavorId, flavorId)
|
||||
setCreateInstanceRequestPayloadGetNameAttributeType(&this.Name, name)
|
||||
setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays)
|
||||
setCreateInstanceRequestPayloadGetStorageAttributeType(&this.Storage, storage)
|
||||
setCreateInstanceRequestPayloadGetVersionAttributeType(&this.Version, version)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateInstanceRequestPayloadWithDefaults instantiates a new CreateInstanceRequestPayload 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 NewCreateInstanceRequestPayloadWithDefaults() *CreateInstanceRequestPayload {
|
||||
this := CreateInstanceRequestPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAcl returns the Acl field value
|
||||
// Deprecated
|
||||
func (o *CreateInstanceRequestPayload) GetAcl() (ret CreateInstanceRequestPayloadGetAclRetType) {
|
||||
ret, _ = o.GetAclOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetAclOk returns a tuple with the Acl field value
|
||||
// and a boolean to check if the value has been set.
|
||||
// Deprecated
|
||||
func (o *CreateInstanceRequestPayload) GetAclOk() (ret CreateInstanceRequestPayloadGetAclRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl)
|
||||
}
|
||||
|
||||
// SetAcl sets field value
|
||||
// Deprecated
|
||||
func (o *CreateInstanceRequestPayload) SetAcl(v CreateInstanceRequestPayloadGetAclRetType) {
|
||||
setCreateInstanceRequestPayloadGetAclAttributeType(&o.Acl, v)
|
||||
}
|
||||
|
||||
// GetBackupSchedule returns the BackupSchedule field value
|
||||
func (o *CreateInstanceRequestPayload) GetBackupSchedule() (ret CreateInstanceRequestPayloadGetBackupScheduleRetType) {
|
||||
ret, _ = o.GetBackupScheduleOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetBackupScheduleOk returns a tuple with the BackupSchedule field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetBackupScheduleOk() (ret CreateInstanceRequestPayloadGetBackupScheduleRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule)
|
||||
}
|
||||
|
||||
// SetBackupSchedule sets field value
|
||||
func (o *CreateInstanceRequestPayload) SetBackupSchedule(v CreateInstanceRequestPayloadGetBackupScheduleRetType) {
|
||||
setCreateInstanceRequestPayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v)
|
||||
}
|
||||
|
||||
// GetEncryption returns the Encryption field value if set, zero value otherwise.
|
||||
func (o *CreateInstanceRequestPayload) GetEncryption() (res CreateInstanceRequestPayloadGetEncryptionRetType) {
|
||||
res, _ = o.GetEncryptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetEncryptionOk() (ret CreateInstanceRequestPayloadGetEncryptionRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetEncryptionAttributeTypeOk(o.Encryption)
|
||||
}
|
||||
|
||||
// HasEncryption returns a boolean if a field has been set.
|
||||
func (o *CreateInstanceRequestPayload) HasEncryption() bool {
|
||||
_, ok := o.GetEncryptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field.
|
||||
func (o *CreateInstanceRequestPayload) SetEncryption(v CreateInstanceRequestPayloadGetEncryptionRetType) {
|
||||
setCreateInstanceRequestPayloadGetEncryptionAttributeType(&o.Encryption, v)
|
||||
}
|
||||
|
||||
// GetFlavorId returns the FlavorId field value
|
||||
func (o *CreateInstanceRequestPayload) GetFlavorId() (ret CreateInstanceRequestPayloadGetFlavorIdRetType) {
|
||||
ret, _ = o.GetFlavorIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetFlavorIdOk returns a tuple with the FlavorId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetFlavorIdOk() (ret CreateInstanceRequestPayloadGetFlavorIdRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetFlavorIdAttributeTypeOk(o.FlavorId)
|
||||
}
|
||||
|
||||
// SetFlavorId sets field value
|
||||
func (o *CreateInstanceRequestPayload) SetFlavorId(v CreateInstanceRequestPayloadGetFlavorIdRetType) {
|
||||
setCreateInstanceRequestPayloadGetFlavorIdAttributeType(&o.FlavorId, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateInstanceRequestPayload) GetName() (ret CreateInstanceRequestPayloadGetNameRetType) {
|
||||
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 *CreateInstanceRequestPayload) GetNameOk() (ret CreateInstanceRequestPayloadGetNameRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateInstanceRequestPayload) SetName(v CreateInstanceRequestPayloadGetNameRetType) {
|
||||
setCreateInstanceRequestPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetNetwork returns the Network field value if set, zero value otherwise.
|
||||
func (o *CreateInstanceRequestPayload) GetNetwork() (res CreateInstanceRequestPayloadGetNetworkRetType) {
|
||||
res, _ = o.GetNetworkOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetNetworkOk() (ret CreateInstanceRequestPayloadGetNetworkRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network)
|
||||
}
|
||||
|
||||
// HasNetwork returns a boolean if a field has been set.
|
||||
func (o *CreateInstanceRequestPayload) HasNetwork() bool {
|
||||
_, ok := o.GetNetworkOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNetwork gets a reference to the given CreateInstanceRequestPayloadNetwork and assigns it to the Network field.
|
||||
func (o *CreateInstanceRequestPayload) SetNetwork(v CreateInstanceRequestPayloadGetNetworkRetType) {
|
||||
setCreateInstanceRequestPayloadGetNetworkAttributeType(&o.Network, v)
|
||||
}
|
||||
|
||||
// GetRetentionDays returns the RetentionDays field value
|
||||
func (o *CreateInstanceRequestPayload) GetRetentionDays() (ret CreateInstanceRequestPayloadGetRetentionDaysRetType) {
|
||||
ret, _ = o.GetRetentionDaysOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetRetentionDaysOk returns a tuple with the RetentionDays field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetRetentionDaysOk() (ret CreateInstanceRequestPayloadGetRetentionDaysRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays)
|
||||
}
|
||||
|
||||
// SetRetentionDays sets field value
|
||||
func (o *CreateInstanceRequestPayload) SetRetentionDays(v CreateInstanceRequestPayloadGetRetentionDaysRetType) {
|
||||
setCreateInstanceRequestPayloadGetRetentionDaysAttributeType(&o.RetentionDays, v)
|
||||
}
|
||||
|
||||
// GetStorage returns the Storage field value
|
||||
func (o *CreateInstanceRequestPayload) GetStorage() (ret CreateInstanceRequestPayloadGetStorageRetType) {
|
||||
ret, _ = o.GetStorageOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetStorageOk returns a tuple with the Storage field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetStorageOk() (ret CreateInstanceRequestPayloadGetStorageRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetStorageAttributeTypeOk(o.Storage)
|
||||
}
|
||||
|
||||
// SetStorage sets field value
|
||||
func (o *CreateInstanceRequestPayload) SetStorage(v CreateInstanceRequestPayloadGetStorageRetType) {
|
||||
setCreateInstanceRequestPayloadGetStorageAttributeType(&o.Storage, v)
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value
|
||||
func (o *CreateInstanceRequestPayload) GetVersion() (ret CreateInstanceRequestPayloadGetVersionRetType) {
|
||||
ret, _ = o.GetVersionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayload) GetVersionOk() (ret CreateInstanceRequestPayloadGetVersionRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadGetVersionAttributeTypeOk(o.Version)
|
||||
}
|
||||
|
||||
// SetVersion sets field value
|
||||
func (o *CreateInstanceRequestPayload) SetVersion(v CreateInstanceRequestPayloadGetVersionRetType) {
|
||||
setCreateInstanceRequestPayloadGetVersionAttributeType(&o.Version, v)
|
||||
}
|
||||
|
||||
func (o CreateInstanceRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl); ok {
|
||||
toSerialize["Acl"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok {
|
||||
toSerialize["BackupSchedule"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetEncryptionAttributeTypeOk(o.Encryption); ok {
|
||||
toSerialize["Encryption"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetFlavorIdAttributeTypeOk(o.FlavorId); ok {
|
||||
toSerialize["FlavorId"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetNetworkAttributeTypeOk(o.Network); ok {
|
||||
toSerialize["Network"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok {
|
||||
toSerialize["RetentionDays"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetStorageAttributeTypeOk(o.Storage); ok {
|
||||
toSerialize["Storage"] = val
|
||||
}
|
||||
if val, ok := getCreateInstanceRequestPayloadGetVersionAttributeTypeOk(o.Version); ok {
|
||||
toSerialize["Version"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateInstanceRequestPayload struct {
|
||||
value *CreateInstanceRequestPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceRequestPayload) Get() *CreateInstanceRequestPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceRequestPayload) Set(val *CreateInstanceRequestPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceRequestPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceRequestPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateInstanceRequestPayload(val *CreateInstanceRequestPayload) *NullableCreateInstanceRequestPayload {
|
||||
return &NullableCreateInstanceRequestPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceRequestPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceRequestPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
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 CreateInstanceRequestPayloadNetwork type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateInstanceRequestPayloadNetwork{}
|
||||
|
||||
/*
|
||||
types and functions for accessScope
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type CreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType = *InstanceNetworkAccessScope
|
||||
type CreateInstanceRequestPayloadNetworkGetAccessScopeArgType = InstanceNetworkAccessScope
|
||||
type CreateInstanceRequestPayloadNetworkGetAccessScopeRetType = InstanceNetworkAccessScope
|
||||
|
||||
func getCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeTypeOk(arg CreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType) (ret CreateInstanceRequestPayloadNetworkGetAccessScopeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType(arg *CreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType, val CreateInstanceRequestPayloadNetworkGetAccessScopeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateInstanceRequestPayloadNetwork the network configuration of the instance.
|
||||
type CreateInstanceRequestPayloadNetwork struct {
|
||||
AccessScope CreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateInstanceRequestPayloadNetwork instantiates a new CreateInstanceRequestPayloadNetwork 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 NewCreateInstanceRequestPayloadNetwork() *CreateInstanceRequestPayloadNetwork {
|
||||
this := CreateInstanceRequestPayloadNetwork{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateInstanceRequestPayloadNetworkWithDefaults instantiates a new CreateInstanceRequestPayloadNetwork 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 NewCreateInstanceRequestPayloadNetworkWithDefaults() *CreateInstanceRequestPayloadNetwork {
|
||||
this := CreateInstanceRequestPayloadNetwork{}
|
||||
var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC
|
||||
this.AccessScope = &accessScope
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAccessScope returns the AccessScope field value if set, zero value otherwise.
|
||||
func (o *CreateInstanceRequestPayloadNetwork) GetAccessScope() (res CreateInstanceRequestPayloadNetworkGetAccessScopeRetType) {
|
||||
res, _ = o.GetAccessScopeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateInstanceRequestPayloadNetwork) GetAccessScopeOk() (ret CreateInstanceRequestPayloadNetworkGetAccessScopeRetType, ok bool) {
|
||||
return getCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeTypeOk(o.AccessScope)
|
||||
}
|
||||
|
||||
// HasAccessScope returns a boolean if a field has been set.
|
||||
func (o *CreateInstanceRequestPayloadNetwork) HasAccessScope() bool {
|
||||
_, ok := o.GetAccessScopeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field.
|
||||
func (o *CreateInstanceRequestPayloadNetwork) SetAccessScope(v CreateInstanceRequestPayloadNetworkGetAccessScopeRetType) {
|
||||
setCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeType(&o.AccessScope, v)
|
||||
}
|
||||
|
||||
func (o CreateInstanceRequestPayloadNetwork) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateInstanceRequestPayloadNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok {
|
||||
toSerialize["AccessScope"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateInstanceRequestPayloadNetwork struct {
|
||||
value *CreateInstanceRequestPayloadNetwork
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceRequestPayloadNetwork) Get() *CreateInstanceRequestPayloadNetwork {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceRequestPayloadNetwork) Set(val *CreateInstanceRequestPayloadNetwork) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceRequestPayloadNetwork) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceRequestPayloadNetwork) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateInstanceRequestPayloadNetwork(val *CreateInstanceRequestPayloadNetwork) *NullableCreateInstanceRequestPayloadNetwork {
|
||||
return &NullableCreateInstanceRequestPayloadNetwork{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceRequestPayloadNetwork) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceRequestPayloadNetwork) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
127
pkg/sqlserverflexalpha/model_create_instance_response.go
Normal file
127
pkg/sqlserverflexalpha/model_create_instance_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
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 CreateInstanceResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateInstanceResponse{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateInstanceResponseGetIdAttributeType = *string
|
||||
|
||||
func getCreateInstanceResponseGetIdAttributeTypeOk(arg CreateInstanceResponseGetIdAttributeType) (ret CreateInstanceResponseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateInstanceResponseGetIdAttributeType(arg *CreateInstanceResponseGetIdAttributeType, val CreateInstanceResponseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateInstanceResponseGetIdArgType = string
|
||||
type CreateInstanceResponseGetIdRetType = string
|
||||
|
||||
// CreateInstanceResponse struct for CreateInstanceResponse
|
||||
type CreateInstanceResponse struct {
|
||||
// The ID of the instance.
|
||||
// REQUIRED
|
||||
Id CreateInstanceResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateInstanceResponse CreateInstanceResponse
|
||||
|
||||
// NewCreateInstanceResponse instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponse(id CreateInstanceResponseGetIdArgType) *CreateInstanceResponse {
|
||||
this := CreateInstanceResponse{}
|
||||
setCreateInstanceResponseGetIdAttributeType(&this.Id, id)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse 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 NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse {
|
||||
this := CreateInstanceResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *CreateInstanceResponse) GetId() (ret CreateInstanceResponseGetIdRetType) {
|
||||
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 *CreateInstanceResponse) GetIdOk() (ret CreateInstanceResponseGetIdRetType, ok bool) {
|
||||
return getCreateInstanceResponseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *CreateInstanceResponse) SetId(v CreateInstanceResponseGetIdRetType) {
|
||||
setCreateInstanceResponseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateInstanceResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateInstanceResponse struct {
|
||||
value *CreateInstanceResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse {
|
||||
return &NullableCreateInstanceResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
220
pkg/sqlserverflexalpha/model_create_user_request_payload.go
Normal file
220
pkg/sqlserverflexalpha/model_create_user_request_payload.go
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
/*
|
||||
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 CreateUserRequestPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateUserRequestPayload{}
|
||||
|
||||
/*
|
||||
types and functions for default_database
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserRequestPayloadGetDefaultDatabaseAttributeType = *string
|
||||
|
||||
func getCreateUserRequestPayloadGetDefaultDatabaseAttributeTypeOk(arg CreateUserRequestPayloadGetDefaultDatabaseAttributeType) (ret CreateUserRequestPayloadGetDefaultDatabaseRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserRequestPayloadGetDefaultDatabaseAttributeType(arg *CreateUserRequestPayloadGetDefaultDatabaseAttributeType, val CreateUserRequestPayloadGetDefaultDatabaseRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserRequestPayloadGetDefaultDatabaseArgType = string
|
||||
type CreateUserRequestPayloadGetDefaultDatabaseRetType = string
|
||||
|
||||
/*
|
||||
types and functions for roles
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateUserRequestPayloadGetRolesAttributeType = *[]UserRole
|
||||
type CreateUserRequestPayloadGetRolesArgType = []UserRole
|
||||
type CreateUserRequestPayloadGetRolesRetType = []UserRole
|
||||
|
||||
func getCreateUserRequestPayloadGetRolesAttributeTypeOk(arg CreateUserRequestPayloadGetRolesAttributeType) (ret CreateUserRequestPayloadGetRolesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserRequestPayloadGetRolesAttributeType(arg *CreateUserRequestPayloadGetRolesAttributeType, val CreateUserRequestPayloadGetRolesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for username
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserRequestPayloadGetUsernameAttributeType = *string
|
||||
|
||||
func getCreateUserRequestPayloadGetUsernameAttributeTypeOk(arg CreateUserRequestPayloadGetUsernameAttributeType) (ret CreateUserRequestPayloadGetUsernameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserRequestPayloadGetUsernameAttributeType(arg *CreateUserRequestPayloadGetUsernameAttributeType, val CreateUserRequestPayloadGetUsernameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserRequestPayloadGetUsernameArgType = string
|
||||
type CreateUserRequestPayloadGetUsernameRetType = string
|
||||
|
||||
// CreateUserRequestPayload struct for CreateUserRequestPayload
|
||||
type CreateUserRequestPayload struct {
|
||||
// The default database for a user of the instance.
|
||||
DefaultDatabase CreateUserRequestPayloadGetDefaultDatabaseAttributeType `json:"default_database,omitempty"`
|
||||
// A list containing the user roles for the instance.
|
||||
// REQUIRED
|
||||
Roles CreateUserRequestPayloadGetRolesAttributeType `json:"roles" required:"true"`
|
||||
// The name of the user.
|
||||
// REQUIRED
|
||||
Username CreateUserRequestPayloadGetUsernameAttributeType `json:"username" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateUserRequestPayload CreateUserRequestPayload
|
||||
|
||||
// NewCreateUserRequestPayload instantiates a new CreateUserRequestPayload 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 NewCreateUserRequestPayload(roles CreateUserRequestPayloadGetRolesArgType, username CreateUserRequestPayloadGetUsernameArgType) *CreateUserRequestPayload {
|
||||
this := CreateUserRequestPayload{}
|
||||
setCreateUserRequestPayloadGetRolesAttributeType(&this.Roles, roles)
|
||||
setCreateUserRequestPayloadGetUsernameAttributeType(&this.Username, username)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateUserRequestPayloadWithDefaults instantiates a new CreateUserRequestPayload 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 NewCreateUserRequestPayloadWithDefaults() *CreateUserRequestPayload {
|
||||
this := CreateUserRequestPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDefaultDatabase returns the DefaultDatabase field value if set, zero value otherwise.
|
||||
func (o *CreateUserRequestPayload) GetDefaultDatabase() (res CreateUserRequestPayloadGetDefaultDatabaseRetType) {
|
||||
res, _ = o.GetDefaultDatabaseOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateUserRequestPayload) GetDefaultDatabaseOk() (ret CreateUserRequestPayloadGetDefaultDatabaseRetType, ok bool) {
|
||||
return getCreateUserRequestPayloadGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase)
|
||||
}
|
||||
|
||||
// HasDefaultDatabase returns a boolean if a field has been set.
|
||||
func (o *CreateUserRequestPayload) HasDefaultDatabase() bool {
|
||||
_, ok := o.GetDefaultDatabaseOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDefaultDatabase gets a reference to the given string and assigns it to the DefaultDatabase field.
|
||||
func (o *CreateUserRequestPayload) SetDefaultDatabase(v CreateUserRequestPayloadGetDefaultDatabaseRetType) {
|
||||
setCreateUserRequestPayloadGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v)
|
||||
}
|
||||
|
||||
// GetRoles returns the Roles field value
|
||||
func (o *CreateUserRequestPayload) GetRoles() (ret CreateUserRequestPayloadGetRolesRetType) {
|
||||
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 *CreateUserRequestPayload) GetRolesOk() (ret CreateUserRequestPayloadGetRolesRetType, ok bool) {
|
||||
return getCreateUserRequestPayloadGetRolesAttributeTypeOk(o.Roles)
|
||||
}
|
||||
|
||||
// SetRoles sets field value
|
||||
func (o *CreateUserRequestPayload) SetRoles(v CreateUserRequestPayloadGetRolesRetType) {
|
||||
setCreateUserRequestPayloadGetRolesAttributeType(&o.Roles, v)
|
||||
}
|
||||
|
||||
// GetUsername returns the Username field value
|
||||
func (o *CreateUserRequestPayload) GetUsername() (ret CreateUserRequestPayloadGetUsernameRetType) {
|
||||
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 *CreateUserRequestPayload) GetUsernameOk() (ret CreateUserRequestPayloadGetUsernameRetType, ok bool) {
|
||||
return getCreateUserRequestPayloadGetUsernameAttributeTypeOk(o.Username)
|
||||
}
|
||||
|
||||
// SetUsername sets field value
|
||||
func (o *CreateUserRequestPayload) SetUsername(v CreateUserRequestPayloadGetUsernameRetType) {
|
||||
setCreateUserRequestPayloadGetUsernameAttributeType(&o.Username, v)
|
||||
}
|
||||
|
||||
func (o CreateUserRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateUserRequestPayloadGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok {
|
||||
toSerialize["DefaultDatabase"] = val
|
||||
}
|
||||
if val, ok := getCreateUserRequestPayloadGetRolesAttributeTypeOk(o.Roles); ok {
|
||||
toSerialize["Roles"] = val
|
||||
}
|
||||
if val, ok := getCreateUserRequestPayloadGetUsernameAttributeTypeOk(o.Username); ok {
|
||||
toSerialize["Username"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateUserRequestPayload struct {
|
||||
value *CreateUserRequestPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateUserRequestPayload) Get() *CreateUserRequestPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateUserRequestPayload) Set(val *CreateUserRequestPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateUserRequestPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateUserRequestPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateUserRequestPayload(val *CreateUserRequestPayload) *NullableCreateUserRequestPayload {
|
||||
return &NullableCreateUserRequestPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateUserRequestPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateUserRequestPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
484
pkg/sqlserverflexalpha/model_create_user_response.go
Normal file
484
pkg/sqlserverflexalpha/model_create_user_response.go
Normal file
|
|
@ -0,0 +1,484 @@
|
|||
/*
|
||||
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 CreateUserResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateUserResponse{}
|
||||
|
||||
/*
|
||||
types and functions for default_database
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserResponseGetDefaultDatabaseAttributeType = *string
|
||||
|
||||
func getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(arg CreateUserResponseGetDefaultDatabaseAttributeType) (ret CreateUserResponseGetDefaultDatabaseRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetDefaultDatabaseAttributeType(arg *CreateUserResponseGetDefaultDatabaseAttributeType, val CreateUserResponseGetDefaultDatabaseRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserResponseGetDefaultDatabaseArgType = string
|
||||
type CreateUserResponseGetDefaultDatabaseRetType = string
|
||||
|
||||
/*
|
||||
types and functions for host
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserResponseGetHostAttributeType = *string
|
||||
|
||||
func getCreateUserResponseGetHostAttributeTypeOk(arg CreateUserResponseGetHostAttributeType) (ret CreateUserResponseGetHostRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetHostAttributeType(arg *CreateUserResponseGetHostAttributeType, val CreateUserResponseGetHostRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserResponseGetHostArgType = string
|
||||
type CreateUserResponseGetHostRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateUserResponseGetIdAttributeType = *int64
|
||||
type CreateUserResponseGetIdArgType = int64
|
||||
type CreateUserResponseGetIdRetType = int64
|
||||
|
||||
func getCreateUserResponseGetIdAttributeTypeOk(arg CreateUserResponseGetIdAttributeType) (ret CreateUserResponseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetIdAttributeType(arg *CreateUserResponseGetIdAttributeType, val CreateUserResponseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for password
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserResponseGetPasswordAttributeType = *string
|
||||
|
||||
func getCreateUserResponseGetPasswordAttributeTypeOk(arg CreateUserResponseGetPasswordAttributeType) (ret CreateUserResponseGetPasswordRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetPasswordAttributeType(arg *CreateUserResponseGetPasswordAttributeType, val CreateUserResponseGetPasswordRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserResponseGetPasswordArgType = string
|
||||
type CreateUserResponseGetPasswordRetType = string
|
||||
|
||||
/*
|
||||
types and functions for port
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type CreateUserResponseGetPortAttributeType = *int64
|
||||
type CreateUserResponseGetPortArgType = int64
|
||||
type CreateUserResponseGetPortRetType = int64
|
||||
|
||||
func getCreateUserResponseGetPortAttributeTypeOk(arg CreateUserResponseGetPortAttributeType) (ret CreateUserResponseGetPortRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetPortAttributeType(arg *CreateUserResponseGetPortAttributeType, val CreateUserResponseGetPortRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for roles
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateUserResponseGetRolesAttributeType = *[]UserRole
|
||||
type CreateUserResponseGetRolesArgType = []UserRole
|
||||
type CreateUserResponseGetRolesRetType = []UserRole
|
||||
|
||||
func getCreateUserResponseGetRolesAttributeTypeOk(arg CreateUserResponseGetRolesAttributeType) (ret CreateUserResponseGetRolesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetRolesAttributeType(arg *CreateUserResponseGetRolesAttributeType, val CreateUserResponseGetRolesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserResponseGetStatusAttributeType = *string
|
||||
|
||||
func getCreateUserResponseGetStatusAttributeTypeOk(arg CreateUserResponseGetStatusAttributeType) (ret CreateUserResponseGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetStatusAttributeType(arg *CreateUserResponseGetStatusAttributeType, val CreateUserResponseGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserResponseGetStatusArgType = string
|
||||
type CreateUserResponseGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for uri
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserResponseGetUriAttributeType = *string
|
||||
|
||||
func getCreateUserResponseGetUriAttributeTypeOk(arg CreateUserResponseGetUriAttributeType) (ret CreateUserResponseGetUriRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetUriAttributeType(arg *CreateUserResponseGetUriAttributeType, val CreateUserResponseGetUriRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserResponseGetUriArgType = string
|
||||
type CreateUserResponseGetUriRetType = string
|
||||
|
||||
/*
|
||||
types and functions for username
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateUserResponseGetUsernameAttributeType = *string
|
||||
|
||||
func getCreateUserResponseGetUsernameAttributeTypeOk(arg CreateUserResponseGetUsernameAttributeType) (ret CreateUserResponseGetUsernameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateUserResponseGetUsernameAttributeType(arg *CreateUserResponseGetUsernameAttributeType, val CreateUserResponseGetUsernameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateUserResponseGetUsernameArgType = string
|
||||
type CreateUserResponseGetUsernameRetType = string
|
||||
|
||||
// CreateUserResponse struct for CreateUserResponse
|
||||
type CreateUserResponse struct {
|
||||
// The default database for a user of the instance.
|
||||
// REQUIRED
|
||||
DefaultDatabase CreateUserResponseGetDefaultDatabaseAttributeType `json:"default_database" required:"true"`
|
||||
// The host of the instance in which the user belongs to.
|
||||
// REQUIRED
|
||||
Host CreateUserResponseGetHostAttributeType `json:"host" required:"true"`
|
||||
// The ID of the user.
|
||||
// REQUIRED
|
||||
Id CreateUserResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
// The password for the user.
|
||||
// REQUIRED
|
||||
Password CreateUserResponseGetPasswordAttributeType `json:"password" required:"true"`
|
||||
// The port of the instance in which the user belongs to.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
Port CreateUserResponseGetPortAttributeType `json:"port" required:"true"`
|
||||
// REQUIRED
|
||||
Roles CreateUserResponseGetRolesAttributeType `json:"roles" required:"true"`
|
||||
// The current status of the user.
|
||||
// REQUIRED
|
||||
Status CreateUserResponseGetStatusAttributeType `json:"status" required:"true"`
|
||||
// The connection string for the user to the instance.
|
||||
// REQUIRED
|
||||
Uri CreateUserResponseGetUriAttributeType `json:"uri" required:"true"`
|
||||
// The name of the user.
|
||||
// REQUIRED
|
||||
Username CreateUserResponseGetUsernameAttributeType `json:"username" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateUserResponse CreateUserResponse
|
||||
|
||||
// NewCreateUserResponse instantiates a new CreateUserResponse 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 NewCreateUserResponse(defaultDatabase CreateUserResponseGetDefaultDatabaseArgType, host CreateUserResponseGetHostArgType, id CreateUserResponseGetIdArgType, password CreateUserResponseGetPasswordArgType, port CreateUserResponseGetPortArgType, roles CreateUserResponseGetRolesArgType, status CreateUserResponseGetStatusArgType, uri CreateUserResponseGetUriArgType, username CreateUserResponseGetUsernameArgType) *CreateUserResponse {
|
||||
this := CreateUserResponse{}
|
||||
setCreateUserResponseGetDefaultDatabaseAttributeType(&this.DefaultDatabase, defaultDatabase)
|
||||
setCreateUserResponseGetHostAttributeType(&this.Host, host)
|
||||
setCreateUserResponseGetIdAttributeType(&this.Id, id)
|
||||
setCreateUserResponseGetPasswordAttributeType(&this.Password, password)
|
||||
setCreateUserResponseGetPortAttributeType(&this.Port, port)
|
||||
setCreateUserResponseGetRolesAttributeType(&this.Roles, roles)
|
||||
setCreateUserResponseGetStatusAttributeType(&this.Status, status)
|
||||
setCreateUserResponseGetUriAttributeType(&this.Uri, uri)
|
||||
setCreateUserResponseGetUsernameAttributeType(&this.Username, username)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse 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 NewCreateUserResponseWithDefaults() *CreateUserResponse {
|
||||
this := CreateUserResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDefaultDatabase returns the DefaultDatabase field value
|
||||
func (o *CreateUserResponse) GetDefaultDatabase() (ret CreateUserResponseGetDefaultDatabaseRetType) {
|
||||
ret, _ = o.GetDefaultDatabaseOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateUserResponse) GetDefaultDatabaseOk() (ret CreateUserResponseGetDefaultDatabaseRetType, ok bool) {
|
||||
return getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase)
|
||||
}
|
||||
|
||||
// SetDefaultDatabase sets field value
|
||||
func (o *CreateUserResponse) SetDefaultDatabase(v CreateUserResponseGetDefaultDatabaseRetType) {
|
||||
setCreateUserResponseGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v)
|
||||
}
|
||||
|
||||
// GetHost returns the Host field value
|
||||
func (o *CreateUserResponse) GetHost() (ret CreateUserResponseGetHostRetType) {
|
||||
ret, _ = o.GetHostOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetHostOk returns a tuple with the Host field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateUserResponse) GetHostOk() (ret CreateUserResponseGetHostRetType, ok bool) {
|
||||
return getCreateUserResponseGetHostAttributeTypeOk(o.Host)
|
||||
}
|
||||
|
||||
// SetHost sets field value
|
||||
func (o *CreateUserResponse) SetHost(v CreateUserResponseGetHostRetType) {
|
||||
setCreateUserResponseGetHostAttributeType(&o.Host, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *CreateUserResponse) GetId() (ret CreateUserResponseGetIdRetType) {
|
||||
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 *CreateUserResponse) GetIdOk() (ret CreateUserResponseGetIdRetType, ok bool) {
|
||||
return getCreateUserResponseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *CreateUserResponse) SetId(v CreateUserResponseGetIdRetType) {
|
||||
setCreateUserResponseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetPassword returns the Password field value
|
||||
func (o *CreateUserResponse) GetPassword() (ret CreateUserResponseGetPasswordRetType) {
|
||||
ret, _ = o.GetPasswordOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPasswordOk returns a tuple with the Password field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateUserResponse) GetPasswordOk() (ret CreateUserResponseGetPasswordRetType, ok bool) {
|
||||
return getCreateUserResponseGetPasswordAttributeTypeOk(o.Password)
|
||||
}
|
||||
|
||||
// SetPassword sets field value
|
||||
func (o *CreateUserResponse) SetPassword(v CreateUserResponseGetPasswordRetType) {
|
||||
setCreateUserResponseGetPasswordAttributeType(&o.Password, v)
|
||||
}
|
||||
|
||||
// GetPort returns the Port field value
|
||||
func (o *CreateUserResponse) GetPort() (ret CreateUserResponseGetPortRetType) {
|
||||
ret, _ = o.GetPortOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPortOk returns a tuple with the Port field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateUserResponse) GetPortOk() (ret CreateUserResponseGetPortRetType, ok bool) {
|
||||
return getCreateUserResponseGetPortAttributeTypeOk(o.Port)
|
||||
}
|
||||
|
||||
// SetPort sets field value
|
||||
func (o *CreateUserResponse) SetPort(v CreateUserResponseGetPortRetType) {
|
||||
setCreateUserResponseGetPortAttributeType(&o.Port, v)
|
||||
}
|
||||
|
||||
// GetRoles returns the Roles field value
|
||||
func (o *CreateUserResponse) GetRoles() (ret CreateUserResponseGetRolesRetType) {
|
||||
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 *CreateUserResponse) GetRolesOk() (ret CreateUserResponseGetRolesRetType, ok bool) {
|
||||
return getCreateUserResponseGetRolesAttributeTypeOk(o.Roles)
|
||||
}
|
||||
|
||||
// SetRoles sets field value
|
||||
func (o *CreateUserResponse) SetRoles(v CreateUserResponseGetRolesRetType) {
|
||||
setCreateUserResponseGetRolesAttributeType(&o.Roles, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *CreateUserResponse) GetStatus() (ret CreateUserResponseGetStatusRetType) {
|
||||
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 *CreateUserResponse) GetStatusOk() (ret CreateUserResponseGetStatusRetType, ok bool) {
|
||||
return getCreateUserResponseGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *CreateUserResponse) SetStatus(v CreateUserResponseGetStatusRetType) {
|
||||
setCreateUserResponseGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetUri returns the Uri field value
|
||||
func (o *CreateUserResponse) GetUri() (ret CreateUserResponseGetUriRetType) {
|
||||
ret, _ = o.GetUriOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetUriOk returns a tuple with the Uri field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateUserResponse) GetUriOk() (ret CreateUserResponseGetUriRetType, ok bool) {
|
||||
return getCreateUserResponseGetUriAttributeTypeOk(o.Uri)
|
||||
}
|
||||
|
||||
// SetUri sets field value
|
||||
func (o *CreateUserResponse) SetUri(v CreateUserResponseGetUriRetType) {
|
||||
setCreateUserResponseGetUriAttributeType(&o.Uri, v)
|
||||
}
|
||||
|
||||
// GetUsername returns the Username field value
|
||||
func (o *CreateUserResponse) GetUsername() (ret CreateUserResponseGetUsernameRetType) {
|
||||
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 *CreateUserResponse) GetUsernameOk() (ret CreateUserResponseGetUsernameRetType, ok bool) {
|
||||
return getCreateUserResponseGetUsernameAttributeTypeOk(o.Username)
|
||||
}
|
||||
|
||||
// SetUsername sets field value
|
||||
func (o *CreateUserResponse) SetUsername(v CreateUserResponseGetUsernameRetType) {
|
||||
setCreateUserResponseGetUsernameAttributeType(&o.Username, v)
|
||||
}
|
||||
|
||||
func (o CreateUserResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok {
|
||||
toSerialize["DefaultDatabase"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetHostAttributeTypeOk(o.Host); ok {
|
||||
toSerialize["Host"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetPasswordAttributeTypeOk(o.Password); ok {
|
||||
toSerialize["Password"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetPortAttributeTypeOk(o.Port); ok {
|
||||
toSerialize["Port"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetRolesAttributeTypeOk(o.Roles); ok {
|
||||
toSerialize["Roles"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetUriAttributeTypeOk(o.Uri); ok {
|
||||
toSerialize["Uri"] = val
|
||||
}
|
||||
if val, ok := getCreateUserResponseGetUsernameAttributeTypeOk(o.Username); ok {
|
||||
toSerialize["Username"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateUserResponse struct {
|
||||
value *CreateUserResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateUserResponse) Get() *CreateUserResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateUserResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateUserResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse {
|
||||
return &NullableCreateUserResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_create_user_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_create_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
176
pkg/sqlserverflexalpha/model_database_getcollation.go
Normal file
176
pkg/sqlserverflexalpha/model_database_getcollation.go
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
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 DatabaseGetcollation type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DatabaseGetcollation{}
|
||||
|
||||
/*
|
||||
types and functions for collation_name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DatabaseGetcollationGetCollationNameAttributeType = *string
|
||||
|
||||
func getDatabaseGetcollationGetCollationNameAttributeTypeOk(arg DatabaseGetcollationGetCollationNameAttributeType) (ret DatabaseGetcollationGetCollationNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDatabaseGetcollationGetCollationNameAttributeType(arg *DatabaseGetcollationGetCollationNameAttributeType, val DatabaseGetcollationGetCollationNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DatabaseGetcollationGetCollationNameArgType = string
|
||||
type DatabaseGetcollationGetCollationNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DatabaseGetcollationGetDescriptionAttributeType = *string
|
||||
|
||||
func getDatabaseGetcollationGetDescriptionAttributeTypeOk(arg DatabaseGetcollationGetDescriptionAttributeType) (ret DatabaseGetcollationGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDatabaseGetcollationGetDescriptionAttributeType(arg *DatabaseGetcollationGetDescriptionAttributeType, val DatabaseGetcollationGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DatabaseGetcollationGetDescriptionArgType = string
|
||||
type DatabaseGetcollationGetDescriptionRetType = string
|
||||
|
||||
// DatabaseGetcollation struct for DatabaseGetcollation
|
||||
type DatabaseGetcollation struct {
|
||||
CollationName DatabaseGetcollationGetCollationNameAttributeType `json:"collation_name,omitempty"`
|
||||
Description DatabaseGetcollationGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// NewDatabaseGetcollation instantiates a new DatabaseGetcollation 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 NewDatabaseGetcollation() *DatabaseGetcollation {
|
||||
this := DatabaseGetcollation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDatabaseGetcollationWithDefaults instantiates a new DatabaseGetcollation 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 NewDatabaseGetcollationWithDefaults() *DatabaseGetcollation {
|
||||
this := DatabaseGetcollation{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCollationName returns the CollationName field value if set, zero value otherwise.
|
||||
func (o *DatabaseGetcollation) GetCollationName() (res DatabaseGetcollationGetCollationNameRetType) {
|
||||
res, _ = o.GetCollationNameOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCollationNameOk returns a tuple with the CollationName field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DatabaseGetcollation) GetCollationNameOk() (ret DatabaseGetcollationGetCollationNameRetType, ok bool) {
|
||||
return getDatabaseGetcollationGetCollationNameAttributeTypeOk(o.CollationName)
|
||||
}
|
||||
|
||||
// HasCollationName returns a boolean if a field has been set.
|
||||
func (o *DatabaseGetcollation) HasCollationName() bool {
|
||||
_, ok := o.GetCollationNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCollationName gets a reference to the given string and assigns it to the CollationName field.
|
||||
func (o *DatabaseGetcollation) SetCollationName(v DatabaseGetcollationGetCollationNameRetType) {
|
||||
setDatabaseGetcollationGetCollationNameAttributeType(&o.CollationName, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *DatabaseGetcollation) GetDescription() (res DatabaseGetcollationGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DatabaseGetcollation) GetDescriptionOk() (ret DatabaseGetcollationGetDescriptionRetType, ok bool) {
|
||||
return getDatabaseGetcollationGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *DatabaseGetcollation) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *DatabaseGetcollation) SetDescription(v DatabaseGetcollationGetDescriptionRetType) {
|
||||
setDatabaseGetcollationGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
func (o DatabaseGetcollation) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getDatabaseGetcollationGetCollationNameAttributeTypeOk(o.CollationName); ok {
|
||||
toSerialize["CollationName"] = val
|
||||
}
|
||||
if val, ok := getDatabaseGetcollationGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableDatabaseGetcollation struct {
|
||||
value *DatabaseGetcollation
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDatabaseGetcollation) Get() *DatabaseGetcollation {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseGetcollation) Set(val *DatabaseGetcollation) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDatabaseGetcollation) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseGetcollation) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDatabaseGetcollation(val *DatabaseGetcollation) *NullableDatabaseGetcollation {
|
||||
return &NullableDatabaseGetcollation{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDatabaseGetcollation) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseGetcollation) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_database_getcollation_test.go
Normal file
11
pkg/sqlserverflexalpha/model_database_getcollation_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
176
pkg/sqlserverflexalpha/model_database_getcompatibility.go
Normal file
176
pkg/sqlserverflexalpha/model_database_getcompatibility.go
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
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 DatabaseGetcompatibility type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DatabaseGetcompatibility{}
|
||||
|
||||
/*
|
||||
types and functions for compatibility_level
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type DatabaseGetcompatibilityGetCompatibilityLevelAttributeType = *int64
|
||||
type DatabaseGetcompatibilityGetCompatibilityLevelArgType = int64
|
||||
type DatabaseGetcompatibilityGetCompatibilityLevelRetType = int64
|
||||
|
||||
func getDatabaseGetcompatibilityGetCompatibilityLevelAttributeTypeOk(arg DatabaseGetcompatibilityGetCompatibilityLevelAttributeType) (ret DatabaseGetcompatibilityGetCompatibilityLevelRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDatabaseGetcompatibilityGetCompatibilityLevelAttributeType(arg *DatabaseGetcompatibilityGetCompatibilityLevelAttributeType, val DatabaseGetcompatibilityGetCompatibilityLevelRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DatabaseGetcompatibilityGetDescriptionAttributeType = *string
|
||||
|
||||
func getDatabaseGetcompatibilityGetDescriptionAttributeTypeOk(arg DatabaseGetcompatibilityGetDescriptionAttributeType) (ret DatabaseGetcompatibilityGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDatabaseGetcompatibilityGetDescriptionAttributeType(arg *DatabaseGetcompatibilityGetDescriptionAttributeType, val DatabaseGetcompatibilityGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DatabaseGetcompatibilityGetDescriptionArgType = string
|
||||
type DatabaseGetcompatibilityGetDescriptionRetType = string
|
||||
|
||||
// DatabaseGetcompatibility struct for DatabaseGetcompatibility
|
||||
type DatabaseGetcompatibility struct {
|
||||
// Can be cast to int32 without loss of precision.
|
||||
CompatibilityLevel DatabaseGetcompatibilityGetCompatibilityLevelAttributeType `json:"compatibility_level,omitempty"`
|
||||
Description DatabaseGetcompatibilityGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
}
|
||||
|
||||
// NewDatabaseGetcompatibility instantiates a new DatabaseGetcompatibility 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 NewDatabaseGetcompatibility() *DatabaseGetcompatibility {
|
||||
this := DatabaseGetcompatibility{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDatabaseGetcompatibilityWithDefaults instantiates a new DatabaseGetcompatibility 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 NewDatabaseGetcompatibilityWithDefaults() *DatabaseGetcompatibility {
|
||||
this := DatabaseGetcompatibility{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCompatibilityLevel returns the CompatibilityLevel field value if set, zero value otherwise.
|
||||
func (o *DatabaseGetcompatibility) GetCompatibilityLevel() (res DatabaseGetcompatibilityGetCompatibilityLevelRetType) {
|
||||
res, _ = o.GetCompatibilityLevelOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DatabaseGetcompatibility) GetCompatibilityLevelOk() (ret DatabaseGetcompatibilityGetCompatibilityLevelRetType, ok bool) {
|
||||
return getDatabaseGetcompatibilityGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel)
|
||||
}
|
||||
|
||||
// HasCompatibilityLevel returns a boolean if a field has been set.
|
||||
func (o *DatabaseGetcompatibility) HasCompatibilityLevel() bool {
|
||||
_, ok := o.GetCompatibilityLevelOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCompatibilityLevel gets a reference to the given int64 and assigns it to the CompatibilityLevel field.
|
||||
func (o *DatabaseGetcompatibility) SetCompatibilityLevel(v DatabaseGetcompatibilityGetCompatibilityLevelRetType) {
|
||||
setDatabaseGetcompatibilityGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *DatabaseGetcompatibility) GetDescription() (res DatabaseGetcompatibilityGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DatabaseGetcompatibility) GetDescriptionOk() (ret DatabaseGetcompatibilityGetDescriptionRetType, ok bool) {
|
||||
return getDatabaseGetcompatibilityGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *DatabaseGetcompatibility) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *DatabaseGetcompatibility) SetDescription(v DatabaseGetcompatibilityGetDescriptionRetType) {
|
||||
setDatabaseGetcompatibilityGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
func (o DatabaseGetcompatibility) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getDatabaseGetcompatibilityGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok {
|
||||
toSerialize["CompatibilityLevel"] = val
|
||||
}
|
||||
if val, ok := getDatabaseGetcompatibilityGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableDatabaseGetcompatibility struct {
|
||||
value *DatabaseGetcompatibility
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDatabaseGetcompatibility) Get() *DatabaseGetcompatibility {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseGetcompatibility) Set(val *DatabaseGetcompatibility) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDatabaseGetcompatibility) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseGetcompatibility) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDatabaseGetcompatibility(val *DatabaseGetcompatibility) *NullableDatabaseGetcompatibility {
|
||||
return &NullableDatabaseGetcompatibility{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDatabaseGetcompatibility) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseGetcompatibility) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
171
pkg/sqlserverflexalpha/model_database_roles.go
Normal file
171
pkg/sqlserverflexalpha/model_database_roles.go
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
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)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_database_roles_test.go
Normal file
11
pkg/sqlserverflexalpha/model_database_roles_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
131
pkg/sqlserverflexalpha/model_database_sort.go
Normal file
131
pkg/sqlserverflexalpha/model_database_sort.go
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// DatabaseSort the model 'DatabaseSort'
|
||||
type DatabaseSort string
|
||||
|
||||
// List of database.sort
|
||||
const (
|
||||
DATABASESORT_CREATED_AT_DESC DatabaseSort = "created_at.desc"
|
||||
DATABASESORT_CREATED_AT_ASC DatabaseSort = "created_at.asc"
|
||||
DATABASESORT_DATABASE_ID_DESC DatabaseSort = "database_id.desc"
|
||||
DATABASESORT_DATABASE_ID_ASC DatabaseSort = "database_id.asc"
|
||||
DATABASESORT_DATABASE_NAME_DESC DatabaseSort = "database_name.desc"
|
||||
DATABASESORT_DATABASE_NAME_ASC DatabaseSort = "database_name.asc"
|
||||
DATABASESORT_DATABASE_OWNER_DESC DatabaseSort = "database_owner.desc"
|
||||
DATABASESORT_DATABASE_OWNER_ASC DatabaseSort = "database_owner.asc"
|
||||
DATABASESORT_INDEX_ASC DatabaseSort = "index.asc"
|
||||
DATABASESORT_INDEX_DESC DatabaseSort = "index.desc"
|
||||
)
|
||||
|
||||
// All allowed values of DatabaseSort enum
|
||||
var AllowedDatabaseSortEnumValues = []DatabaseSort{
|
||||
"created_at.desc",
|
||||
"created_at.asc",
|
||||
"database_id.desc",
|
||||
"database_id.asc",
|
||||
"database_name.desc",
|
||||
"database_name.asc",
|
||||
"database_owner.desc",
|
||||
"database_owner.asc",
|
||||
"index.asc",
|
||||
"index.desc",
|
||||
}
|
||||
|
||||
func (v *DatabaseSort) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := DatabaseSort(value)
|
||||
for _, existing := range AllowedDatabaseSortEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid DatabaseSort", value)
|
||||
}
|
||||
|
||||
// NewDatabaseSortFromValue returns a pointer to a valid DatabaseSort
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewDatabaseSortFromValue(v string) (*DatabaseSort, error) {
|
||||
ev := DatabaseSort(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for DatabaseSort: valid values are %v", v, AllowedDatabaseSortEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v DatabaseSort) IsValid() bool {
|
||||
for _, existing := range AllowedDatabaseSortEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to database.sort value
|
||||
func (v DatabaseSort) Ptr() *DatabaseSort {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableDatabaseSort struct {
|
||||
value *DatabaseSort
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDatabaseSort) Get() *DatabaseSort {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseSort) Set(val *DatabaseSort) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDatabaseSort) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseSort) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDatabaseSort(val *DatabaseSort) *NullableDatabaseSort {
|
||||
return &NullableDatabaseSort{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDatabaseSort) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDatabaseSort) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_database_sort_test.go
Normal file
11
pkg/sqlserverflexalpha/model_database_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
262
pkg/sqlserverflexalpha/model_error.go
Normal file
262
pkg/sqlserverflexalpha/model_error.go
Normal file
|
|
@ -0,0 +1,262 @@
|
|||
/*
|
||||
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 Error type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Error{}
|
||||
|
||||
/*
|
||||
types and functions for code
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type ErrorGetCodeAttributeType = *int64
|
||||
type ErrorGetCodeArgType = int64
|
||||
type ErrorGetCodeRetType = int64
|
||||
|
||||
func getErrorGetCodeAttributeTypeOk(arg ErrorGetCodeAttributeType) (ret ErrorGetCodeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setErrorGetCodeAttributeType(arg *ErrorGetCodeAttributeType, val ErrorGetCodeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for message
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ErrorGetMessageAttributeType = *string
|
||||
|
||||
func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret ErrorGetMessageRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setErrorGetMessageAttributeType(arg *ErrorGetMessageAttributeType, val ErrorGetMessageRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ErrorGetMessageArgType = string
|
||||
type ErrorGetMessageRetType = string
|
||||
|
||||
/*
|
||||
types and functions for traceId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ErrorGetTraceIdAttributeType = *string
|
||||
|
||||
func getErrorGetTraceIdAttributeTypeOk(arg ErrorGetTraceIdAttributeType) (ret ErrorGetTraceIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setErrorGetTraceIdAttributeType(arg *ErrorGetTraceIdAttributeType, val ErrorGetTraceIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ErrorGetTraceIdArgType = string
|
||||
type ErrorGetTraceIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ErrorGetTypeAttributeType = *string
|
||||
|
||||
func getErrorGetTypeAttributeTypeOk(arg ErrorGetTypeAttributeType) (ret ErrorGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setErrorGetTypeAttributeType(arg *ErrorGetTypeAttributeType, val ErrorGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ErrorGetTypeArgType = string
|
||||
type ErrorGetTypeRetType = string
|
||||
|
||||
// Error struct for Error
|
||||
type Error struct {
|
||||
// The http error code of the error.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
Code ErrorGetCodeAttributeType `json:"code" required:"true" validate:"required,errorCode"`
|
||||
// More detailed information about the error.
|
||||
// REQUIRED
|
||||
Message ErrorGetMessageAttributeType `json:"message" required:"true" validate:"required,errorMsg"`
|
||||
// The trace id of the request.
|
||||
// REQUIRED
|
||||
TraceId ErrorGetTraceIdAttributeType `json:"traceId" required:"true" validate:"required,traceID"`
|
||||
// Describes in which state the api was when the error happened.
|
||||
// REQUIRED
|
||||
Type ErrorGetTypeAttributeType `json:"type" required:"true" validate:"required,errorType"`
|
||||
}
|
||||
|
||||
type _Error Error
|
||||
|
||||
// NewError instantiates a new Error 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 NewError(code ErrorGetCodeArgType, message ErrorGetMessageArgType, traceId ErrorGetTraceIdArgType, types ErrorGetTypeArgType) *Error {
|
||||
this := Error{}
|
||||
setErrorGetCodeAttributeType(&this.Code, code)
|
||||
setErrorGetMessageAttributeType(&this.Message, message)
|
||||
setErrorGetTraceIdAttributeType(&this.TraceId, traceId)
|
||||
setErrorGetTypeAttributeType(&this.Type, types)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewErrorWithDefaults instantiates a new Error 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 NewErrorWithDefaults() *Error {
|
||||
this := Error{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value
|
||||
func (o *Error) GetCode() (ret ErrorGetCodeRetType) {
|
||||
ret, _ = o.GetCodeOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCodeOk returns a tuple with the Code field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Error) GetCodeOk() (ret ErrorGetCodeRetType, ok bool) {
|
||||
return getErrorGetCodeAttributeTypeOk(o.Code)
|
||||
}
|
||||
|
||||
// SetCode sets field value
|
||||
func (o *Error) SetCode(v ErrorGetCodeRetType) {
|
||||
setErrorGetCodeAttributeType(&o.Code, v)
|
||||
}
|
||||
|
||||
// GetMessage returns the Message field value
|
||||
func (o *Error) GetMessage() (ret ErrorGetMessageRetType) {
|
||||
ret, _ = o.GetMessageOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMessageOk returns a tuple with the Message field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Error) GetMessageOk() (ret ErrorGetMessageRetType, ok bool) {
|
||||
return getErrorGetMessageAttributeTypeOk(o.Message)
|
||||
}
|
||||
|
||||
// SetMessage sets field value
|
||||
func (o *Error) SetMessage(v ErrorGetMessageRetType) {
|
||||
setErrorGetMessageAttributeType(&o.Message, v)
|
||||
}
|
||||
|
||||
// GetTraceId returns the TraceId field value
|
||||
func (o *Error) GetTraceId() (ret ErrorGetTraceIdRetType) {
|
||||
ret, _ = o.GetTraceIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetTraceIdOk returns a tuple with the TraceId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Error) GetTraceIdOk() (ret ErrorGetTraceIdRetType, ok bool) {
|
||||
return getErrorGetTraceIdAttributeTypeOk(o.TraceId)
|
||||
}
|
||||
|
||||
// SetTraceId sets field value
|
||||
func (o *Error) SetTraceId(v ErrorGetTraceIdRetType) {
|
||||
setErrorGetTraceIdAttributeType(&o.TraceId, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *Error) GetType() (ret ErrorGetTypeRetType) {
|
||||
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 *Error) GetTypeOk() (ret ErrorGetTypeRetType, ok bool) {
|
||||
return getErrorGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *Error) SetType(v ErrorGetTypeRetType) {
|
||||
setErrorGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o Error) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getErrorGetCodeAttributeTypeOk(o.Code); ok {
|
||||
toSerialize["Code"] = val
|
||||
}
|
||||
if val, ok := getErrorGetMessageAttributeTypeOk(o.Message); ok {
|
||||
toSerialize["Message"] = val
|
||||
}
|
||||
if val, ok := getErrorGetTraceIdAttributeTypeOk(o.TraceId); ok {
|
||||
toSerialize["TraceId"] = val
|
||||
}
|
||||
if val, ok := getErrorGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableError struct {
|
||||
value *Error
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableError) Get() *Error {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableError) Set(val *Error) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableError) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableError) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableError(val *Error) *NullableError {
|
||||
return &NullableError{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableError) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableError) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_error_test.go
Normal file
11
pkg/sqlserverflexalpha/model_error_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
147
pkg/sqlserverflexalpha/model_flavor_sort.go
Normal file
147
pkg/sqlserverflexalpha/model_flavor_sort.go
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// FlavorSort the model 'FlavorSort'
|
||||
type FlavorSort string
|
||||
|
||||
// List of flavor.sort
|
||||
const (
|
||||
FLAVORSORT_INDEX_DESC FlavorSort = "index.desc"
|
||||
FLAVORSORT_INDEX_ASC FlavorSort = "index.asc"
|
||||
FLAVORSORT_CPU_DESC FlavorSort = "cpu.desc"
|
||||
FLAVORSORT_CPU_ASC FlavorSort = "cpu.asc"
|
||||
FLAVORSORT_FLAVOR_DESCRIPTION_ASC FlavorSort = "flavor_description.asc"
|
||||
FLAVORSORT_FLAVOR_DESCRIPTION_DESC FlavorSort = "flavor_description.desc"
|
||||
FLAVORSORT_ID_DESC FlavorSort = "id.desc"
|
||||
FLAVORSORT_ID_ASC FlavorSort = "id.asc"
|
||||
FLAVORSORT_SIZE_MAX_DESC FlavorSort = "size_max.desc"
|
||||
FLAVORSORT_SIZE_MAX_ASC FlavorSort = "size_max.asc"
|
||||
FLAVORSORT_RAM_DESC FlavorSort = "ram.desc"
|
||||
FLAVORSORT_RAM_ASC FlavorSort = "ram.asc"
|
||||
FLAVORSORT_SIZE_MIN_DESC FlavorSort = "size_min.desc"
|
||||
FLAVORSORT_SIZE_MIN_ASC FlavorSort = "size_min.asc"
|
||||
FLAVORSORT_STORAGE_CLASS_ASC FlavorSort = "storage_class.asc"
|
||||
FLAVORSORT_STORAGE_CLASS_DESC FlavorSort = "storage_class.desc"
|
||||
FLAVORSORT_NODE_TYPE_ASC FlavorSort = "node_type.asc"
|
||||
FLAVORSORT_NODE_TYPE_DESC FlavorSort = "node_type.desc"
|
||||
)
|
||||
|
||||
// All allowed values of FlavorSort enum
|
||||
var AllowedFlavorSortEnumValues = []FlavorSort{
|
||||
"index.desc",
|
||||
"index.asc",
|
||||
"cpu.desc",
|
||||
"cpu.asc",
|
||||
"flavor_description.asc",
|
||||
"flavor_description.desc",
|
||||
"id.desc",
|
||||
"id.asc",
|
||||
"size_max.desc",
|
||||
"size_max.asc",
|
||||
"ram.desc",
|
||||
"ram.asc",
|
||||
"size_min.desc",
|
||||
"size_min.asc",
|
||||
"storage_class.asc",
|
||||
"storage_class.desc",
|
||||
"node_type.asc",
|
||||
"node_type.desc",
|
||||
}
|
||||
|
||||
func (v *FlavorSort) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := FlavorSort(value)
|
||||
for _, existing := range AllowedFlavorSortEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid FlavorSort", value)
|
||||
}
|
||||
|
||||
// NewFlavorSortFromValue returns a pointer to a valid FlavorSort
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewFlavorSortFromValue(v string) (*FlavorSort, error) {
|
||||
ev := FlavorSort(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for FlavorSort: valid values are %v", v, AllowedFlavorSortEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v FlavorSort) IsValid() bool {
|
||||
for _, existing := range AllowedFlavorSortEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to flavor.sort value
|
||||
func (v FlavorSort) Ptr() *FlavorSort {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableFlavorSort struct {
|
||||
value *FlavorSort
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableFlavorSort) Get() *FlavorSort {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableFlavorSort) Set(val *FlavorSort) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableFlavorSort) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableFlavorSort) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableFlavorSort(val *FlavorSort) *NullableFlavorSort {
|
||||
return &NullableFlavorSort{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableFlavorSort) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableFlavorSort) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_flavor_sort_test.go
Normal file
11
pkg/sqlserverflexalpha/model_flavor_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
|
|
@ -0,0 +1,214 @@
|
|||
/*
|
||||
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 FlavorStorageClassesStorageClass type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &FlavorStorageClassesStorageClass{}
|
||||
|
||||
/*
|
||||
types and functions for class
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type FlavorStorageClassesStorageClassGetClassAttributeType = *string
|
||||
|
||||
func getFlavorStorageClassesStorageClassGetClassAttributeTypeOk(arg FlavorStorageClassesStorageClassGetClassAttributeType) (ret FlavorStorageClassesStorageClassGetClassRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setFlavorStorageClassesStorageClassGetClassAttributeType(arg *FlavorStorageClassesStorageClassGetClassAttributeType, val FlavorStorageClassesStorageClassGetClassRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type FlavorStorageClassesStorageClassGetClassArgType = string
|
||||
type FlavorStorageClassesStorageClassGetClassRetType = string
|
||||
|
||||
/*
|
||||
types and functions for maxIoPerSec
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType = *int64
|
||||
type FlavorStorageClassesStorageClassGetMaxIoPerSecArgType = int64
|
||||
type FlavorStorageClassesStorageClassGetMaxIoPerSecRetType = int64
|
||||
|
||||
func getFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeTypeOk(arg FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType) (ret FlavorStorageClassesStorageClassGetMaxIoPerSecRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType(arg *FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType, val FlavorStorageClassesStorageClassGetMaxIoPerSecRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for maxThroughInMb
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType = *int64
|
||||
type FlavorStorageClassesStorageClassGetMaxThroughInMbArgType = int64
|
||||
type FlavorStorageClassesStorageClassGetMaxThroughInMbRetType = int64
|
||||
|
||||
func getFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeTypeOk(arg FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType) (ret FlavorStorageClassesStorageClassGetMaxThroughInMbRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType(arg *FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType, val FlavorStorageClassesStorageClassGetMaxThroughInMbRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// FlavorStorageClassesStorageClass a storageClass defines how efficient the storage can work
|
||||
type FlavorStorageClassesStorageClass struct {
|
||||
// REQUIRED
|
||||
Class FlavorStorageClassesStorageClassGetClassAttributeType `json:"class" required:"true"`
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
MaxIoPerSec FlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType `json:"maxIoPerSec" required:"true"`
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
MaxThroughInMb FlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType `json:"maxThroughInMb" required:"true"`
|
||||
}
|
||||
|
||||
type _FlavorStorageClassesStorageClass FlavorStorageClassesStorageClass
|
||||
|
||||
// NewFlavorStorageClassesStorageClass instantiates a new FlavorStorageClassesStorageClass 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 NewFlavorStorageClassesStorageClass(class FlavorStorageClassesStorageClassGetClassArgType, maxIoPerSec FlavorStorageClassesStorageClassGetMaxIoPerSecArgType, maxThroughInMb FlavorStorageClassesStorageClassGetMaxThroughInMbArgType) *FlavorStorageClassesStorageClass {
|
||||
this := FlavorStorageClassesStorageClass{}
|
||||
setFlavorStorageClassesStorageClassGetClassAttributeType(&this.Class, class)
|
||||
setFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType(&this.MaxIoPerSec, maxIoPerSec)
|
||||
setFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType(&this.MaxThroughInMb, maxThroughInMb)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewFlavorStorageClassesStorageClassWithDefaults instantiates a new FlavorStorageClassesStorageClass 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 NewFlavorStorageClassesStorageClassWithDefaults() *FlavorStorageClassesStorageClass {
|
||||
this := FlavorStorageClassesStorageClass{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetClass returns the Class field value
|
||||
func (o *FlavorStorageClassesStorageClass) GetClass() (ret FlavorStorageClassesStorageClassGetClassRetType) {
|
||||
ret, _ = o.GetClassOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetClassOk returns a tuple with the Class field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlavorStorageClassesStorageClass) GetClassOk() (ret FlavorStorageClassesStorageClassGetClassRetType, ok bool) {
|
||||
return getFlavorStorageClassesStorageClassGetClassAttributeTypeOk(o.Class)
|
||||
}
|
||||
|
||||
// SetClass sets field value
|
||||
func (o *FlavorStorageClassesStorageClass) SetClass(v FlavorStorageClassesStorageClassGetClassRetType) {
|
||||
setFlavorStorageClassesStorageClassGetClassAttributeType(&o.Class, v)
|
||||
}
|
||||
|
||||
// GetMaxIoPerSec returns the MaxIoPerSec field value
|
||||
func (o *FlavorStorageClassesStorageClass) GetMaxIoPerSec() (ret FlavorStorageClassesStorageClassGetMaxIoPerSecRetType) {
|
||||
ret, _ = o.GetMaxIoPerSecOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMaxIoPerSecOk returns a tuple with the MaxIoPerSec field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlavorStorageClassesStorageClass) GetMaxIoPerSecOk() (ret FlavorStorageClassesStorageClassGetMaxIoPerSecRetType, ok bool) {
|
||||
return getFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeTypeOk(o.MaxIoPerSec)
|
||||
}
|
||||
|
||||
// SetMaxIoPerSec sets field value
|
||||
func (o *FlavorStorageClassesStorageClass) SetMaxIoPerSec(v FlavorStorageClassesStorageClassGetMaxIoPerSecRetType) {
|
||||
setFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeType(&o.MaxIoPerSec, v)
|
||||
}
|
||||
|
||||
// GetMaxThroughInMb returns the MaxThroughInMb field value
|
||||
func (o *FlavorStorageClassesStorageClass) GetMaxThroughInMb() (ret FlavorStorageClassesStorageClassGetMaxThroughInMbRetType) {
|
||||
ret, _ = o.GetMaxThroughInMbOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMaxThroughInMbOk returns a tuple with the MaxThroughInMb field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlavorStorageClassesStorageClass) GetMaxThroughInMbOk() (ret FlavorStorageClassesStorageClassGetMaxThroughInMbRetType, ok bool) {
|
||||
return getFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeTypeOk(o.MaxThroughInMb)
|
||||
}
|
||||
|
||||
// SetMaxThroughInMb sets field value
|
||||
func (o *FlavorStorageClassesStorageClass) SetMaxThroughInMb(v FlavorStorageClassesStorageClassGetMaxThroughInMbRetType) {
|
||||
setFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeType(&o.MaxThroughInMb, v)
|
||||
}
|
||||
|
||||
func (o FlavorStorageClassesStorageClass) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getFlavorStorageClassesStorageClassGetClassAttributeTypeOk(o.Class); ok {
|
||||
toSerialize["Class"] = val
|
||||
}
|
||||
if val, ok := getFlavorStorageClassesStorageClassGetMaxIoPerSecAttributeTypeOk(o.MaxIoPerSec); ok {
|
||||
toSerialize["MaxIoPerSec"] = val
|
||||
}
|
||||
if val, ok := getFlavorStorageClassesStorageClassGetMaxThroughInMbAttributeTypeOk(o.MaxThroughInMb); ok {
|
||||
toSerialize["MaxThroughInMb"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableFlavorStorageClassesStorageClass struct {
|
||||
value *FlavorStorageClassesStorageClass
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableFlavorStorageClassesStorageClass) Get() *FlavorStorageClassesStorageClass {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableFlavorStorageClassesStorageClass) Set(val *FlavorStorageClassesStorageClass) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableFlavorStorageClassesStorageClass) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableFlavorStorageClassesStorageClass) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableFlavorStorageClassesStorageClass(val *FlavorStorageClassesStorageClass) *NullableFlavorStorageClassesStorageClass {
|
||||
return &NullableFlavorStorageClassesStorageClass{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableFlavorStorageClassesStorageClass) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableFlavorStorageClassesStorageClass) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
172
pkg/sqlserverflexalpha/model_flavor_storage_range.go
Normal file
172
pkg/sqlserverflexalpha/model_flavor_storage_range.go
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
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 FlavorStorageRange type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &FlavorStorageRange{}
|
||||
|
||||
/*
|
||||
types and functions for max
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type FlavorStorageRangeGetMaxAttributeType = *int64
|
||||
type FlavorStorageRangeGetMaxArgType = int64
|
||||
type FlavorStorageRangeGetMaxRetType = int64
|
||||
|
||||
func getFlavorStorageRangeGetMaxAttributeTypeOk(arg FlavorStorageRangeGetMaxAttributeType) (ret FlavorStorageRangeGetMaxRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setFlavorStorageRangeGetMaxAttributeType(arg *FlavorStorageRangeGetMaxAttributeType, val FlavorStorageRangeGetMaxRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for min
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type FlavorStorageRangeGetMinAttributeType = *int64
|
||||
type FlavorStorageRangeGetMinArgType = int64
|
||||
type FlavorStorageRangeGetMinRetType = int64
|
||||
|
||||
func getFlavorStorageRangeGetMinAttributeTypeOk(arg FlavorStorageRangeGetMinAttributeType) (ret FlavorStorageRangeGetMinRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setFlavorStorageRangeGetMinAttributeType(arg *FlavorStorageRangeGetMinAttributeType, val FlavorStorageRangeGetMinRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// FlavorStorageRange range of maximum and minimum storage which can be ordered for the flavor in Gigabyte.
|
||||
type FlavorStorageRange struct {
|
||||
// maximum storage which can be ordered for the flavor in Gigabyte.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
Max FlavorStorageRangeGetMaxAttributeType `json:"max" required:"true"`
|
||||
// minimum storage which is required to order in Gigabyte.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
Min FlavorStorageRangeGetMinAttributeType `json:"min" required:"true"`
|
||||
}
|
||||
|
||||
type _FlavorStorageRange FlavorStorageRange
|
||||
|
||||
// NewFlavorStorageRange instantiates a new FlavorStorageRange 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 NewFlavorStorageRange(max FlavorStorageRangeGetMaxArgType, min FlavorStorageRangeGetMinArgType) *FlavorStorageRange {
|
||||
this := FlavorStorageRange{}
|
||||
setFlavorStorageRangeGetMaxAttributeType(&this.Max, max)
|
||||
setFlavorStorageRangeGetMinAttributeType(&this.Min, min)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewFlavorStorageRangeWithDefaults instantiates a new FlavorStorageRange 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 NewFlavorStorageRangeWithDefaults() *FlavorStorageRange {
|
||||
this := FlavorStorageRange{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetMax returns the Max field value
|
||||
func (o *FlavorStorageRange) GetMax() (ret FlavorStorageRangeGetMaxRetType) {
|
||||
ret, _ = o.GetMaxOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMaxOk returns a tuple with the Max field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlavorStorageRange) GetMaxOk() (ret FlavorStorageRangeGetMaxRetType, ok bool) {
|
||||
return getFlavorStorageRangeGetMaxAttributeTypeOk(o.Max)
|
||||
}
|
||||
|
||||
// SetMax sets field value
|
||||
func (o *FlavorStorageRange) SetMax(v FlavorStorageRangeGetMaxRetType) {
|
||||
setFlavorStorageRangeGetMaxAttributeType(&o.Max, v)
|
||||
}
|
||||
|
||||
// GetMin returns the Min field value
|
||||
func (o *FlavorStorageRange) GetMin() (ret FlavorStorageRangeGetMinRetType) {
|
||||
ret, _ = o.GetMinOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMinOk returns a tuple with the Min field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *FlavorStorageRange) GetMinOk() (ret FlavorStorageRangeGetMinRetType, ok bool) {
|
||||
return getFlavorStorageRangeGetMinAttributeTypeOk(o.Min)
|
||||
}
|
||||
|
||||
// SetMin sets field value
|
||||
func (o *FlavorStorageRange) SetMin(v FlavorStorageRangeGetMinRetType) {
|
||||
setFlavorStorageRangeGetMinAttributeType(&o.Min, v)
|
||||
}
|
||||
|
||||
func (o FlavorStorageRange) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getFlavorStorageRangeGetMaxAttributeTypeOk(o.Max); ok {
|
||||
toSerialize["Max"] = val
|
||||
}
|
||||
if val, ok := getFlavorStorageRangeGetMinAttributeTypeOk(o.Min); ok {
|
||||
toSerialize["Min"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableFlavorStorageRange struct {
|
||||
value *FlavorStorageRange
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableFlavorStorageRange) Get() *FlavorStorageRange {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableFlavorStorageRange) Set(val *FlavorStorageRange) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableFlavorStorageRange) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableFlavorStorageRange) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableFlavorStorageRange(val *FlavorStorageRange) *NullableFlavorStorageRange {
|
||||
return &NullableFlavorStorageRange{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableFlavorStorageRange) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableFlavorStorageRange) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_flavor_storage_range_test.go
Normal file
11
pkg/sqlserverflexalpha/model_flavor_storage_range_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
436
pkg/sqlserverflexalpha/model_get_backup_response.go
Normal file
436
pkg/sqlserverflexalpha/model_get_backup_response.go
Normal file
|
|
@ -0,0 +1,436 @@
|
|||
/*
|
||||
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
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type GetBackupResponseGetCompletionTimeAttributeType = any
|
||||
type GetBackupResponseGetCompletionTimeArgType = any
|
||||
type GetBackupResponseGetCompletionTimeRetType = any
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// isModel
|
||||
type GetBackupResponseGetCompletionTimeAttributeType = *string
|
||||
type GetBackupResponseGetCompletionTimeArgType = string
|
||||
type GetBackupResponseGetCompletionTimeRetType = 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
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type GetBackupResponseGetIdAttributeType = any
|
||||
type GetBackupResponseGetIdArgType = any
|
||||
type GetBackupResponseGetIdRetType = any
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// isModel
|
||||
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
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type GetBackupResponseGetNameAttributeType = any
|
||||
type GetBackupResponseGetNameArgType = any
|
||||
type GetBackupResponseGetNameRetType = any
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// isModel
|
||||
type GetBackupResponseGetNameAttributeType = *string
|
||||
type GetBackupResponseGetNameArgType = string
|
||||
type GetBackupResponseGetNameRetType = 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
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for retainedUntil
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type GetBackupResponseGetRetainedUntilAttributeType = any
|
||||
type GetBackupResponseGetRetainedUntilArgType = any
|
||||
type GetBackupResponseGetRetainedUntilRetType = any
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// isModel
|
||||
type GetBackupResponseGetRetainedUntilAttributeType = *string
|
||||
type GetBackupResponseGetRetainedUntilArgType = string
|
||||
type GetBackupResponseGetRetainedUntilRetType = 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
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type GetBackupResponseGetSizeAttributeType = any
|
||||
type GetBackupResponseGetSizeArgType = any
|
||||
type GetBackupResponseGetSizeRetType = any
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// isModel
|
||||
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
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type GetBackupResponseGetTypeAttributeType = any
|
||||
type GetBackupResponseGetTypeArgType = any
|
||||
type GetBackupResponseGetTypeRetType = any
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// isModel
|
||||
type GetBackupResponseGetTypeAttributeType = *string
|
||||
type GetBackupResponseGetTypeArgType = string
|
||||
type GetBackupResponseGetTypeRetType = 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
|
||||
}
|
||||
|
||||
// GetBackupResponse struct for GetBackupResponse
|
||||
type GetBackupResponse struct {
|
||||
// REQUIRED
|
||||
CompletionTime GetBackupResponseGetCompletionTimeAttributeType `json:"completionTime" required:"true"`
|
||||
// REQUIRED
|
||||
Id GetBackupResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
// REQUIRED
|
||||
Name GetBackupResponseGetNameAttributeType `json:"name" required:"true"`
|
||||
// REQUIRED
|
||||
RetainedUntil GetBackupResponseGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"`
|
||||
// REQUIRED
|
||||
Size GetBackupResponseGetSizeAttributeType `json:"size" required:"true"`
|
||||
// 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)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_backup_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_backup_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_get_collations_response.go
Normal file
126
pkg/sqlserverflexalpha/model_get_collations_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 GetCollationsResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetCollationsResponse{}
|
||||
|
||||
/*
|
||||
types and functions for collations
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type GetCollationsResponseGetCollationsAttributeType = *[]DatabaseGetcollation
|
||||
type GetCollationsResponseGetCollationsArgType = []DatabaseGetcollation
|
||||
type GetCollationsResponseGetCollationsRetType = []DatabaseGetcollation
|
||||
|
||||
func getGetCollationsResponseGetCollationsAttributeTypeOk(arg GetCollationsResponseGetCollationsAttributeType) (ret GetCollationsResponseGetCollationsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetCollationsResponseGetCollationsAttributeType(arg *GetCollationsResponseGetCollationsAttributeType, val GetCollationsResponseGetCollationsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// GetCollationsResponse struct for GetCollationsResponse
|
||||
type GetCollationsResponse struct {
|
||||
// List of collations available for the instance.
|
||||
// REQUIRED
|
||||
Collations GetCollationsResponseGetCollationsAttributeType `json:"collations" required:"true"`
|
||||
}
|
||||
|
||||
type _GetCollationsResponse GetCollationsResponse
|
||||
|
||||
// NewGetCollationsResponse instantiates a new GetCollationsResponse 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 NewGetCollationsResponse(collations GetCollationsResponseGetCollationsArgType) *GetCollationsResponse {
|
||||
this := GetCollationsResponse{}
|
||||
setGetCollationsResponseGetCollationsAttributeType(&this.Collations, collations)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetCollationsResponseWithDefaults instantiates a new GetCollationsResponse 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 NewGetCollationsResponseWithDefaults() *GetCollationsResponse {
|
||||
this := GetCollationsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCollations returns the Collations field value
|
||||
func (o *GetCollationsResponse) GetCollations() (ret GetCollationsResponseGetCollationsRetType) {
|
||||
ret, _ = o.GetCollationsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCollationsOk returns a tuple with the Collations field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetCollationsResponse) GetCollationsOk() (ret GetCollationsResponseGetCollationsRetType, ok bool) {
|
||||
return getGetCollationsResponseGetCollationsAttributeTypeOk(o.Collations)
|
||||
}
|
||||
|
||||
// SetCollations sets field value
|
||||
func (o *GetCollationsResponse) SetCollations(v GetCollationsResponseGetCollationsRetType) {
|
||||
setGetCollationsResponseGetCollationsAttributeType(&o.Collations, v)
|
||||
}
|
||||
|
||||
func (o GetCollationsResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetCollationsResponseGetCollationsAttributeTypeOk(o.Collations); ok {
|
||||
toSerialize["Collations"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetCollationsResponse struct {
|
||||
value *GetCollationsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetCollationsResponse) Get() *GetCollationsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetCollationsResponse) Set(val *GetCollationsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetCollationsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetCollationsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetCollationsResponse(val *GetCollationsResponse) *NullableGetCollationsResponse {
|
||||
return &NullableGetCollationsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetCollationsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetCollationsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_collations_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_collations_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
306
pkg/sqlserverflexalpha/model_get_database_response.go
Normal file
306
pkg/sqlserverflexalpha/model_get_database_response.go
Normal file
|
|
@ -0,0 +1,306 @@
|
|||
/*
|
||||
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 GetDatabaseResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetDatabaseResponse{}
|
||||
|
||||
/*
|
||||
types and functions for collationName
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetDatabaseResponseGetCollationNameAttributeType = *string
|
||||
|
||||
func getGetDatabaseResponseGetCollationNameAttributeTypeOk(arg GetDatabaseResponseGetCollationNameAttributeType) (ret GetDatabaseResponseGetCollationNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetDatabaseResponseGetCollationNameAttributeType(arg *GetDatabaseResponseGetCollationNameAttributeType, val GetDatabaseResponseGetCollationNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetDatabaseResponseGetCollationNameArgType = string
|
||||
type GetDatabaseResponseGetCollationNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for compatibilityLevel
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type GetDatabaseResponseGetCompatibilityLevelAttributeType = *int64
|
||||
type GetDatabaseResponseGetCompatibilityLevelArgType = int64
|
||||
type GetDatabaseResponseGetCompatibilityLevelRetType = int64
|
||||
|
||||
func getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(arg GetDatabaseResponseGetCompatibilityLevelAttributeType) (ret GetDatabaseResponseGetCompatibilityLevelRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetDatabaseResponseGetCompatibilityLevelAttributeType(arg *GetDatabaseResponseGetCompatibilityLevelAttributeType, val GetDatabaseResponseGetCompatibilityLevelRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type GetDatabaseResponseGetIdAttributeType = *int64
|
||||
type GetDatabaseResponseGetIdArgType = int64
|
||||
type GetDatabaseResponseGetIdRetType = int64
|
||||
|
||||
func getGetDatabaseResponseGetIdAttributeTypeOk(arg GetDatabaseResponseGetIdAttributeType) (ret GetDatabaseResponseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetDatabaseResponseGetIdAttributeType(arg *GetDatabaseResponseGetIdAttributeType, val GetDatabaseResponseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetDatabaseResponseGetNameAttributeType = *string
|
||||
|
||||
func getGetDatabaseResponseGetNameAttributeTypeOk(arg GetDatabaseResponseGetNameAttributeType) (ret GetDatabaseResponseGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetDatabaseResponseGetNameAttributeType(arg *GetDatabaseResponseGetNameAttributeType, val GetDatabaseResponseGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetDatabaseResponseGetNameArgType = string
|
||||
type GetDatabaseResponseGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for owner
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetDatabaseResponseGetOwnerAttributeType = *string
|
||||
|
||||
func getGetDatabaseResponseGetOwnerAttributeTypeOk(arg GetDatabaseResponseGetOwnerAttributeType) (ret GetDatabaseResponseGetOwnerRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetDatabaseResponseGetOwnerAttributeType(arg *GetDatabaseResponseGetOwnerAttributeType, val GetDatabaseResponseGetOwnerRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetDatabaseResponseGetOwnerArgType = string
|
||||
type GetDatabaseResponseGetOwnerRetType = string
|
||||
|
||||
// GetDatabaseResponse struct for GetDatabaseResponse
|
||||
type GetDatabaseResponse struct {
|
||||
// The collation of the database. This database collation should match the *collation_name* of one of the collations given by the **Get database collation list** endpoint.
|
||||
// REQUIRED
|
||||
CollationName GetDatabaseResponseGetCollationNameAttributeType `json:"collationName" required:"true"`
|
||||
// CompatibilityLevel of the Database.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
CompatibilityLevel GetDatabaseResponseGetCompatibilityLevelAttributeType `json:"compatibilityLevel" required:"true"`
|
||||
// The id of the database.
|
||||
// REQUIRED
|
||||
Id GetDatabaseResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
// The name of the database.
|
||||
// REQUIRED
|
||||
Name GetDatabaseResponseGetNameAttributeType `json:"name" required:"true"`
|
||||
// The owner of the database.
|
||||
// REQUIRED
|
||||
Owner GetDatabaseResponseGetOwnerAttributeType `json:"owner" required:"true"`
|
||||
}
|
||||
|
||||
type _GetDatabaseResponse GetDatabaseResponse
|
||||
|
||||
// NewGetDatabaseResponse instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponse(collationName GetDatabaseResponseGetCollationNameArgType, compatibilityLevel GetDatabaseResponseGetCompatibilityLevelArgType, id GetDatabaseResponseGetIdArgType, name GetDatabaseResponseGetNameArgType, owner GetDatabaseResponseGetOwnerArgType) *GetDatabaseResponse {
|
||||
this := GetDatabaseResponse{}
|
||||
setGetDatabaseResponseGetCollationNameAttributeType(&this.CollationName, collationName)
|
||||
setGetDatabaseResponseGetCompatibilityLevelAttributeType(&this.CompatibilityLevel, compatibilityLevel)
|
||||
setGetDatabaseResponseGetIdAttributeType(&this.Id, id)
|
||||
setGetDatabaseResponseGetNameAttributeType(&this.Name, name)
|
||||
setGetDatabaseResponseGetOwnerAttributeType(&this.Owner, owner)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetDatabaseResponseWithDefaults instantiates a new GetDatabaseResponse 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 NewGetDatabaseResponseWithDefaults() *GetDatabaseResponse {
|
||||
this := GetDatabaseResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCollationName returns the CollationName field value
|
||||
func (o *GetDatabaseResponse) GetCollationName() (ret GetDatabaseResponseGetCollationNameRetType) {
|
||||
ret, _ = o.GetCollationNameOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCollationNameOk returns a tuple with the CollationName field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetDatabaseResponse) GetCollationNameOk() (ret GetDatabaseResponseGetCollationNameRetType, ok bool) {
|
||||
return getGetDatabaseResponseGetCollationNameAttributeTypeOk(o.CollationName)
|
||||
}
|
||||
|
||||
// SetCollationName sets field value
|
||||
func (o *GetDatabaseResponse) SetCollationName(v GetDatabaseResponseGetCollationNameRetType) {
|
||||
setGetDatabaseResponseGetCollationNameAttributeType(&o.CollationName, v)
|
||||
}
|
||||
|
||||
// GetCompatibilityLevel returns the CompatibilityLevel field value
|
||||
func (o *GetDatabaseResponse) GetCompatibilityLevel() (ret GetDatabaseResponseGetCompatibilityLevelRetType) {
|
||||
ret, _ = o.GetCompatibilityLevelOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCompatibilityLevelOk returns a tuple with the CompatibilityLevel field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetDatabaseResponse) GetCompatibilityLevelOk() (ret GetDatabaseResponseGetCompatibilityLevelRetType, ok bool) {
|
||||
return getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel)
|
||||
}
|
||||
|
||||
// SetCompatibilityLevel sets field value
|
||||
func (o *GetDatabaseResponse) SetCompatibilityLevel(v GetDatabaseResponseGetCompatibilityLevelRetType) {
|
||||
setGetDatabaseResponseGetCompatibilityLevelAttributeType(&o.CompatibilityLevel, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *GetDatabaseResponse) GetId() (ret GetDatabaseResponseGetIdRetType) {
|
||||
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 *GetDatabaseResponse) GetIdOk() (ret GetDatabaseResponseGetIdRetType, ok bool) {
|
||||
return getGetDatabaseResponseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *GetDatabaseResponse) SetId(v GetDatabaseResponseGetIdRetType) {
|
||||
setGetDatabaseResponseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *GetDatabaseResponse) GetName() (ret GetDatabaseResponseGetNameRetType) {
|
||||
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 *GetDatabaseResponse) GetNameOk() (ret GetDatabaseResponseGetNameRetType, ok bool) {
|
||||
return getGetDatabaseResponseGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *GetDatabaseResponse) SetName(v GetDatabaseResponseGetNameRetType) {
|
||||
setGetDatabaseResponseGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetOwner returns the Owner field value
|
||||
func (o *GetDatabaseResponse) GetOwner() (ret GetDatabaseResponseGetOwnerRetType) {
|
||||
ret, _ = o.GetOwnerOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetOwnerOk returns a tuple with the Owner field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetDatabaseResponse) GetOwnerOk() (ret GetDatabaseResponseGetOwnerRetType, ok bool) {
|
||||
return getGetDatabaseResponseGetOwnerAttributeTypeOk(o.Owner)
|
||||
}
|
||||
|
||||
// SetOwner sets field value
|
||||
func (o *GetDatabaseResponse) SetOwner(v GetDatabaseResponseGetOwnerRetType) {
|
||||
setGetDatabaseResponseGetOwnerAttributeType(&o.Owner, v)
|
||||
}
|
||||
|
||||
func (o GetDatabaseResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetDatabaseResponseGetCollationNameAttributeTypeOk(o.CollationName); ok {
|
||||
toSerialize["CollationName"] = val
|
||||
}
|
||||
if val, ok := getGetDatabaseResponseGetCompatibilityLevelAttributeTypeOk(o.CompatibilityLevel); ok {
|
||||
toSerialize["CompatibilityLevel"] = val
|
||||
}
|
||||
if val, ok := getGetDatabaseResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getGetDatabaseResponseGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getGetDatabaseResponseGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||
toSerialize["Owner"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetDatabaseResponse struct {
|
||||
value *GetDatabaseResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetDatabaseResponse) Get() *GetDatabaseResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetDatabaseResponse) Set(val *GetDatabaseResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetDatabaseResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetDatabaseResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetDatabaseResponse(val *GetDatabaseResponse) *NullableGetDatabaseResponse {
|
||||
return &NullableGetDatabaseResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetDatabaseResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetDatabaseResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_database_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_database_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
169
pkg/sqlserverflexalpha/model_get_flavors_response.go
Normal file
169
pkg/sqlserverflexalpha/model_get_flavors_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
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 GetFlavorsResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetFlavorsResponse{}
|
||||
|
||||
/*
|
||||
types and functions for flavors
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type GetFlavorsResponseGetFlavorsAttributeType = *[]ListFlavors
|
||||
type GetFlavorsResponseGetFlavorsArgType = []ListFlavors
|
||||
type GetFlavorsResponseGetFlavorsRetType = []ListFlavors
|
||||
|
||||
func getGetFlavorsResponseGetFlavorsAttributeTypeOk(arg GetFlavorsResponseGetFlavorsAttributeType) (ret GetFlavorsResponseGetFlavorsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetFlavorsResponseGetFlavorsAttributeType(arg *GetFlavorsResponseGetFlavorsAttributeType, val GetFlavorsResponseGetFlavorsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for pagination
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type GetFlavorsResponseGetPaginationAttributeType = *Pagination
|
||||
type GetFlavorsResponseGetPaginationArgType = Pagination
|
||||
type GetFlavorsResponseGetPaginationRetType = Pagination
|
||||
|
||||
func getGetFlavorsResponseGetPaginationAttributeTypeOk(arg GetFlavorsResponseGetPaginationAttributeType) (ret GetFlavorsResponseGetPaginationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetFlavorsResponseGetPaginationAttributeType(arg *GetFlavorsResponseGetPaginationAttributeType, val GetFlavorsResponseGetPaginationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// GetFlavorsResponse struct for GetFlavorsResponse
|
||||
type GetFlavorsResponse struct {
|
||||
// List of flavors available for the project.
|
||||
// REQUIRED
|
||||
Flavors GetFlavorsResponseGetFlavorsAttributeType `json:"flavors" required:"true"`
|
||||
// REQUIRED
|
||||
Pagination GetFlavorsResponseGetPaginationAttributeType `json:"pagination" required:"true"`
|
||||
}
|
||||
|
||||
type _GetFlavorsResponse GetFlavorsResponse
|
||||
|
||||
// NewGetFlavorsResponse instantiates a new GetFlavorsResponse 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 NewGetFlavorsResponse(flavors GetFlavorsResponseGetFlavorsArgType, pagination GetFlavorsResponseGetPaginationArgType) *GetFlavorsResponse {
|
||||
this := GetFlavorsResponse{}
|
||||
setGetFlavorsResponseGetFlavorsAttributeType(&this.Flavors, flavors)
|
||||
setGetFlavorsResponseGetPaginationAttributeType(&this.Pagination, pagination)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetFlavorsResponseWithDefaults instantiates a new GetFlavorsResponse 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 NewGetFlavorsResponseWithDefaults() *GetFlavorsResponse {
|
||||
this := GetFlavorsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetFlavors returns the Flavors field value
|
||||
func (o *GetFlavorsResponse) GetFlavors() (ret GetFlavorsResponseGetFlavorsRetType) {
|
||||
ret, _ = o.GetFlavorsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetFlavorsOk returns a tuple with the Flavors field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetFlavorsResponse) GetFlavorsOk() (ret GetFlavorsResponseGetFlavorsRetType, ok bool) {
|
||||
return getGetFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors)
|
||||
}
|
||||
|
||||
// SetFlavors sets field value
|
||||
func (o *GetFlavorsResponse) SetFlavors(v GetFlavorsResponseGetFlavorsRetType) {
|
||||
setGetFlavorsResponseGetFlavorsAttributeType(&o.Flavors, v)
|
||||
}
|
||||
|
||||
// GetPagination returns the Pagination field value
|
||||
func (o *GetFlavorsResponse) GetPagination() (ret GetFlavorsResponseGetPaginationRetType) {
|
||||
ret, _ = o.GetPaginationOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPaginationOk returns a tuple with the Pagination field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetFlavorsResponse) GetPaginationOk() (ret GetFlavorsResponseGetPaginationRetType, ok bool) {
|
||||
return getGetFlavorsResponseGetPaginationAttributeTypeOk(o.Pagination)
|
||||
}
|
||||
|
||||
// SetPagination sets field value
|
||||
func (o *GetFlavorsResponse) SetPagination(v GetFlavorsResponseGetPaginationRetType) {
|
||||
setGetFlavorsResponseGetPaginationAttributeType(&o.Pagination, v)
|
||||
}
|
||||
|
||||
func (o GetFlavorsResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors); ok {
|
||||
toSerialize["Flavors"] = val
|
||||
}
|
||||
if val, ok := getGetFlavorsResponseGetPaginationAttributeTypeOk(o.Pagination); ok {
|
||||
toSerialize["Pagination"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetFlavorsResponse struct {
|
||||
value *GetFlavorsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetFlavorsResponse) Get() *GetFlavorsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetFlavorsResponse) Set(val *GetFlavorsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetFlavorsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetFlavorsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetFlavorsResponse(val *GetFlavorsResponse) *NullableGetFlavorsResponse {
|
||||
return &NullableGetFlavorsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetFlavorsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetFlavorsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_flavors_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_flavors_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
700
pkg/sqlserverflexalpha/model_get_instance_response.go
Normal file
700
pkg/sqlserverflexalpha/model_get_instance_response.go
Normal file
|
|
@ -0,0 +1,700 @@
|
|||
/*
|
||||
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 GetInstanceResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetInstanceResponse{}
|
||||
|
||||
/*
|
||||
types and functions for acl
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type GetInstanceResponseGetAclAttributeType = *[]string
|
||||
type GetInstanceResponseGetAclArgType = []string
|
||||
type GetInstanceResponseGetAclRetType = []string
|
||||
|
||||
func getGetInstanceResponseGetAclAttributeTypeOk(arg GetInstanceResponseGetAclAttributeType) (ret GetInstanceResponseGetAclRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetAclAttributeType(arg *GetInstanceResponseGetAclAttributeType, val GetInstanceResponseGetAclRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for backupSchedule
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetInstanceResponseGetBackupScheduleAttributeType = *string
|
||||
|
||||
func getGetInstanceResponseGetBackupScheduleAttributeTypeOk(arg GetInstanceResponseGetBackupScheduleAttributeType) (ret GetInstanceResponseGetBackupScheduleRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetBackupScheduleAttributeType(arg *GetInstanceResponseGetBackupScheduleAttributeType, val GetInstanceResponseGetBackupScheduleRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetInstanceResponseGetBackupScheduleArgType = string
|
||||
type GetInstanceResponseGetBackupScheduleRetType = string
|
||||
|
||||
/*
|
||||
types and functions for edition
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type GetInstanceResponseGetEditionAttributeType = *InstanceEdition
|
||||
type GetInstanceResponseGetEditionArgType = InstanceEdition
|
||||
type GetInstanceResponseGetEditionRetType = InstanceEdition
|
||||
|
||||
func getGetInstanceResponseGetEditionAttributeTypeOk(arg GetInstanceResponseGetEditionAttributeType) (ret GetInstanceResponseGetEditionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetEditionAttributeType(arg *GetInstanceResponseGetEditionAttributeType, val GetInstanceResponseGetEditionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for encryption
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type GetInstanceResponseGetEncryptionAttributeType = *InstanceEncryption
|
||||
type GetInstanceResponseGetEncryptionArgType = InstanceEncryption
|
||||
type GetInstanceResponseGetEncryptionRetType = InstanceEncryption
|
||||
|
||||
func getGetInstanceResponseGetEncryptionAttributeTypeOk(arg GetInstanceResponseGetEncryptionAttributeType) (ret GetInstanceResponseGetEncryptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetEncryptionAttributeType(arg *GetInstanceResponseGetEncryptionAttributeType, val GetInstanceResponseGetEncryptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for flavorId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetInstanceResponseGetFlavorIdAttributeType = *string
|
||||
|
||||
func getGetInstanceResponseGetFlavorIdAttributeTypeOk(arg GetInstanceResponseGetFlavorIdAttributeType) (ret GetInstanceResponseGetFlavorIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetFlavorIdAttributeType(arg *GetInstanceResponseGetFlavorIdAttributeType, val GetInstanceResponseGetFlavorIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetInstanceResponseGetFlavorIdArgType = string
|
||||
type GetInstanceResponseGetFlavorIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetInstanceResponseGetIdAttributeType = *string
|
||||
|
||||
func getGetInstanceResponseGetIdAttributeTypeOk(arg GetInstanceResponseGetIdAttributeType) (ret GetInstanceResponseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetIdAttributeType(arg *GetInstanceResponseGetIdAttributeType, val GetInstanceResponseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetInstanceResponseGetIdArgType = string
|
||||
type GetInstanceResponseGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for isDeletable
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type GetInstanceResponsegetIsDeletableAttributeType = *bool
|
||||
type GetInstanceResponsegetIsDeletableArgType = bool
|
||||
type GetInstanceResponsegetIsDeletableRetType = bool
|
||||
|
||||
func getGetInstanceResponsegetIsDeletableAttributeTypeOk(arg GetInstanceResponsegetIsDeletableAttributeType) (ret GetInstanceResponsegetIsDeletableRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponsegetIsDeletableAttributeType(arg *GetInstanceResponsegetIsDeletableAttributeType, val GetInstanceResponsegetIsDeletableRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetInstanceResponseGetNameAttributeType = *string
|
||||
|
||||
func getGetInstanceResponseGetNameAttributeTypeOk(arg GetInstanceResponseGetNameAttributeType) (ret GetInstanceResponseGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetNameAttributeType(arg *GetInstanceResponseGetNameAttributeType, val GetInstanceResponseGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetInstanceResponseGetNameArgType = string
|
||||
type GetInstanceResponseGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for network
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type GetInstanceResponseGetNetworkAttributeType = *InstanceNetwork
|
||||
type GetInstanceResponseGetNetworkArgType = InstanceNetwork
|
||||
type GetInstanceResponseGetNetworkRetType = InstanceNetwork
|
||||
|
||||
func getGetInstanceResponseGetNetworkAttributeTypeOk(arg GetInstanceResponseGetNetworkAttributeType) (ret GetInstanceResponseGetNetworkRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetNetworkAttributeType(arg *GetInstanceResponseGetNetworkAttributeType, val GetInstanceResponseGetNetworkRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for replicas
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type GetInstanceResponseGetReplicasAttributeType = *Replicas
|
||||
type GetInstanceResponseGetReplicasArgType = Replicas
|
||||
type GetInstanceResponseGetReplicasRetType = Replicas
|
||||
|
||||
func getGetInstanceResponseGetReplicasAttributeTypeOk(arg GetInstanceResponseGetReplicasAttributeType) (ret GetInstanceResponseGetReplicasRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetReplicasAttributeType(arg *GetInstanceResponseGetReplicasAttributeType, val GetInstanceResponseGetReplicasRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for retentionDays
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type GetInstanceResponseGetRetentionDaysAttributeType = *int64
|
||||
type GetInstanceResponseGetRetentionDaysArgType = int64
|
||||
type GetInstanceResponseGetRetentionDaysRetType = int64
|
||||
|
||||
func getGetInstanceResponseGetRetentionDaysAttributeTypeOk(arg GetInstanceResponseGetRetentionDaysAttributeType) (ret GetInstanceResponseGetRetentionDaysRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetRetentionDaysAttributeType(arg *GetInstanceResponseGetRetentionDaysAttributeType, val GetInstanceResponseGetRetentionDaysRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type GetInstanceResponseGetStatusAttributeType = *Status
|
||||
type GetInstanceResponseGetStatusArgType = Status
|
||||
type GetInstanceResponseGetStatusRetType = Status
|
||||
|
||||
func getGetInstanceResponseGetStatusAttributeTypeOk(arg GetInstanceResponseGetStatusAttributeType) (ret GetInstanceResponseGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetStatusAttributeType(arg *GetInstanceResponseGetStatusAttributeType, val GetInstanceResponseGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for storage
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type GetInstanceResponseGetStorageAttributeType = *Storage
|
||||
type GetInstanceResponseGetStorageArgType = Storage
|
||||
type GetInstanceResponseGetStorageRetType = Storage
|
||||
|
||||
func getGetInstanceResponseGetStorageAttributeTypeOk(arg GetInstanceResponseGetStorageAttributeType) (ret GetInstanceResponseGetStorageRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetStorageAttributeType(arg *GetInstanceResponseGetStorageAttributeType, val GetInstanceResponseGetStorageRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for version
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type GetInstanceResponseGetVersionAttributeType = *InstanceVersion
|
||||
type GetInstanceResponseGetVersionArgType = InstanceVersion
|
||||
type GetInstanceResponseGetVersionRetType = InstanceVersion
|
||||
|
||||
func getGetInstanceResponseGetVersionAttributeTypeOk(arg GetInstanceResponseGetVersionAttributeType) (ret GetInstanceResponseGetVersionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetInstanceResponseGetVersionAttributeType(arg *GetInstanceResponseGetVersionAttributeType, val GetInstanceResponseGetVersionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// GetInstanceResponse struct for GetInstanceResponse
|
||||
type GetInstanceResponse struct {
|
||||
// List of IPV4 cidr.
|
||||
// REQUIRED
|
||||
Acl GetInstanceResponseGetAclAttributeType `json:"acl" required:"true"`
|
||||
// The schedule for on what time and how often the database backup will be created. The schedule is written as a cron schedule.
|
||||
// REQUIRED
|
||||
BackupSchedule GetInstanceResponseGetBackupScheduleAttributeType `json:"backupSchedule" required:"true"`
|
||||
// REQUIRED
|
||||
Edition GetInstanceResponseGetEditionAttributeType `json:"edition" required:"true"`
|
||||
Encryption GetInstanceResponseGetEncryptionAttributeType `json:"encryption,omitempty"`
|
||||
// The id of the instance flavor.
|
||||
// REQUIRED
|
||||
FlavorId GetInstanceResponseGetFlavorIdAttributeType `json:"flavorId" required:"true"`
|
||||
// The ID of the instance.
|
||||
// REQUIRED
|
||||
Id GetInstanceResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
// Whether the instance can be deleted or not.
|
||||
// REQUIRED
|
||||
IsDeletable GetInstanceResponsegetIsDeletableAttributeType `json:"isDeletable" required:"true"`
|
||||
// The name of the instance.
|
||||
// REQUIRED
|
||||
Name GetInstanceResponseGetNameAttributeType `json:"name" required:"true"`
|
||||
// REQUIRED
|
||||
Network GetInstanceResponseGetNetworkAttributeType `json:"network" required:"true"`
|
||||
// REQUIRED
|
||||
Replicas GetInstanceResponseGetReplicasAttributeType `json:"replicas" required:"true"`
|
||||
// The days for how long the backup files should be stored before cleaned up. 30 to 365
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
RetentionDays GetInstanceResponseGetRetentionDaysAttributeType `json:"retentionDays" required:"true"`
|
||||
// REQUIRED
|
||||
Status GetInstanceResponseGetStatusAttributeType `json:"status" required:"true"`
|
||||
// REQUIRED
|
||||
Storage GetInstanceResponseGetStorageAttributeType `json:"storage" required:"true"`
|
||||
// REQUIRED
|
||||
Version GetInstanceResponseGetVersionAttributeType `json:"version" required:"true"`
|
||||
}
|
||||
|
||||
type _GetInstanceResponse GetInstanceResponse
|
||||
|
||||
// NewGetInstanceResponse instantiates a new GetInstanceResponse 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 NewGetInstanceResponse(acl GetInstanceResponseGetAclArgType, backupSchedule GetInstanceResponseGetBackupScheduleArgType, edition GetInstanceResponseGetEditionArgType, flavorId GetInstanceResponseGetFlavorIdArgType, id GetInstanceResponseGetIdArgType, isDeletable GetInstanceResponsegetIsDeletableArgType, name GetInstanceResponseGetNameArgType, network GetInstanceResponseGetNetworkArgType, replicas GetInstanceResponseGetReplicasArgType, retentionDays GetInstanceResponseGetRetentionDaysArgType, status GetInstanceResponseGetStatusArgType, storage GetInstanceResponseGetStorageArgType, version GetInstanceResponseGetVersionArgType) *GetInstanceResponse {
|
||||
this := GetInstanceResponse{}
|
||||
setGetInstanceResponseGetAclAttributeType(&this.Acl, acl)
|
||||
setGetInstanceResponseGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule)
|
||||
setGetInstanceResponseGetEditionAttributeType(&this.Edition, edition)
|
||||
setGetInstanceResponseGetFlavorIdAttributeType(&this.FlavorId, flavorId)
|
||||
setGetInstanceResponseGetIdAttributeType(&this.Id, id)
|
||||
setGetInstanceResponsegetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
|
||||
setGetInstanceResponseGetNameAttributeType(&this.Name, name)
|
||||
setGetInstanceResponseGetNetworkAttributeType(&this.Network, network)
|
||||
setGetInstanceResponseGetReplicasAttributeType(&this.Replicas, replicas)
|
||||
setGetInstanceResponseGetRetentionDaysAttributeType(&this.RetentionDays, retentionDays)
|
||||
setGetInstanceResponseGetStatusAttributeType(&this.Status, status)
|
||||
setGetInstanceResponseGetStorageAttributeType(&this.Storage, storage)
|
||||
setGetInstanceResponseGetVersionAttributeType(&this.Version, version)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetInstanceResponseWithDefaults instantiates a new GetInstanceResponse 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 NewGetInstanceResponseWithDefaults() *GetInstanceResponse {
|
||||
this := GetInstanceResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAcl returns the Acl field value
|
||||
func (o *GetInstanceResponse) GetAcl() (ret GetInstanceResponseGetAclRetType) {
|
||||
ret, _ = o.GetAclOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetAclOk returns a tuple with the Acl field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetAclOk() (ret GetInstanceResponseGetAclRetType, ok bool) {
|
||||
return getGetInstanceResponseGetAclAttributeTypeOk(o.Acl)
|
||||
}
|
||||
|
||||
// SetAcl sets field value
|
||||
func (o *GetInstanceResponse) SetAcl(v GetInstanceResponseGetAclRetType) {
|
||||
setGetInstanceResponseGetAclAttributeType(&o.Acl, v)
|
||||
}
|
||||
|
||||
// GetBackupSchedule returns the BackupSchedule field value
|
||||
func (o *GetInstanceResponse) GetBackupSchedule() (ret GetInstanceResponseGetBackupScheduleRetType) {
|
||||
ret, _ = o.GetBackupScheduleOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetBackupScheduleOk returns a tuple with the BackupSchedule field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetBackupScheduleOk() (ret GetInstanceResponseGetBackupScheduleRetType, ok bool) {
|
||||
return getGetInstanceResponseGetBackupScheduleAttributeTypeOk(o.BackupSchedule)
|
||||
}
|
||||
|
||||
// SetBackupSchedule sets field value
|
||||
func (o *GetInstanceResponse) SetBackupSchedule(v GetInstanceResponseGetBackupScheduleRetType) {
|
||||
setGetInstanceResponseGetBackupScheduleAttributeType(&o.BackupSchedule, v)
|
||||
}
|
||||
|
||||
// GetEdition returns the Edition field value
|
||||
func (o *GetInstanceResponse) GetEdition() (ret GetInstanceResponseGetEditionRetType) {
|
||||
ret, _ = o.GetEditionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetEditionOk returns a tuple with the Edition field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetEditionOk() (ret GetInstanceResponseGetEditionRetType, ok bool) {
|
||||
return getGetInstanceResponseGetEditionAttributeTypeOk(o.Edition)
|
||||
}
|
||||
|
||||
// SetEdition sets field value
|
||||
func (o *GetInstanceResponse) SetEdition(v GetInstanceResponseGetEditionRetType) {
|
||||
setGetInstanceResponseGetEditionAttributeType(&o.Edition, v)
|
||||
}
|
||||
|
||||
// GetEncryption returns the Encryption field value if set, zero value otherwise.
|
||||
func (o *GetInstanceResponse) GetEncryption() (res GetInstanceResponseGetEncryptionRetType) {
|
||||
res, _ = o.GetEncryptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEncryptionOk returns a tuple with the Encryption field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetEncryptionOk() (ret GetInstanceResponseGetEncryptionRetType, ok bool) {
|
||||
return getGetInstanceResponseGetEncryptionAttributeTypeOk(o.Encryption)
|
||||
}
|
||||
|
||||
// HasEncryption returns a boolean if a field has been set.
|
||||
func (o *GetInstanceResponse) HasEncryption() bool {
|
||||
_, ok := o.GetEncryptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEncryption gets a reference to the given InstanceEncryption and assigns it to the Encryption field.
|
||||
func (o *GetInstanceResponse) SetEncryption(v GetInstanceResponseGetEncryptionRetType) {
|
||||
setGetInstanceResponseGetEncryptionAttributeType(&o.Encryption, v)
|
||||
}
|
||||
|
||||
// GetFlavorId returns the FlavorId field value
|
||||
func (o *GetInstanceResponse) GetFlavorId() (ret GetInstanceResponseGetFlavorIdRetType) {
|
||||
ret, _ = o.GetFlavorIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetFlavorIdOk returns a tuple with the FlavorId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetFlavorIdOk() (ret GetInstanceResponseGetFlavorIdRetType, ok bool) {
|
||||
return getGetInstanceResponseGetFlavorIdAttributeTypeOk(o.FlavorId)
|
||||
}
|
||||
|
||||
// SetFlavorId sets field value
|
||||
func (o *GetInstanceResponse) SetFlavorId(v GetInstanceResponseGetFlavorIdRetType) {
|
||||
setGetInstanceResponseGetFlavorIdAttributeType(&o.FlavorId, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *GetInstanceResponse) GetId() (ret GetInstanceResponseGetIdRetType) {
|
||||
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 *GetInstanceResponse) GetIdOk() (ret GetInstanceResponseGetIdRetType, ok bool) {
|
||||
return getGetInstanceResponseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *GetInstanceResponse) SetId(v GetInstanceResponseGetIdRetType) {
|
||||
setGetInstanceResponseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetIsDeletable returns the IsDeletable field value
|
||||
func (o *GetInstanceResponse) GetIsDeletable() (ret GetInstanceResponsegetIsDeletableRetType) {
|
||||
ret, _ = o.GetIsDeletableOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetIsDeletableOk returns a tuple with the IsDeletable field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetIsDeletableOk() (ret GetInstanceResponsegetIsDeletableRetType, ok bool) {
|
||||
return getGetInstanceResponsegetIsDeletableAttributeTypeOk(o.IsDeletable)
|
||||
}
|
||||
|
||||
// SetIsDeletable sets field value
|
||||
func (o *GetInstanceResponse) SetIsDeletable(v GetInstanceResponsegetIsDeletableRetType) {
|
||||
setGetInstanceResponsegetIsDeletableAttributeType(&o.IsDeletable, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *GetInstanceResponse) GetName() (ret GetInstanceResponseGetNameRetType) {
|
||||
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 *GetInstanceResponse) GetNameOk() (ret GetInstanceResponseGetNameRetType, ok bool) {
|
||||
return getGetInstanceResponseGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *GetInstanceResponse) SetName(v GetInstanceResponseGetNameRetType) {
|
||||
setGetInstanceResponseGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetNetwork returns the Network field value
|
||||
func (o *GetInstanceResponse) GetNetwork() (ret GetInstanceResponseGetNetworkRetType) {
|
||||
ret, _ = o.GetNetworkOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetNetworkOk returns a tuple with the Network field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetNetworkOk() (ret GetInstanceResponseGetNetworkRetType, ok bool) {
|
||||
return getGetInstanceResponseGetNetworkAttributeTypeOk(o.Network)
|
||||
}
|
||||
|
||||
// SetNetwork sets field value
|
||||
func (o *GetInstanceResponse) SetNetwork(v GetInstanceResponseGetNetworkRetType) {
|
||||
setGetInstanceResponseGetNetworkAttributeType(&o.Network, v)
|
||||
}
|
||||
|
||||
// GetReplicas returns the Replicas field value
|
||||
func (o *GetInstanceResponse) GetReplicas() (ret GetInstanceResponseGetReplicasRetType) {
|
||||
ret, _ = o.GetReplicasOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetReplicasOk returns a tuple with the Replicas field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetReplicasOk() (ret GetInstanceResponseGetReplicasRetType, ok bool) {
|
||||
return getGetInstanceResponseGetReplicasAttributeTypeOk(o.Replicas)
|
||||
}
|
||||
|
||||
// SetReplicas sets field value
|
||||
func (o *GetInstanceResponse) SetReplicas(v GetInstanceResponseGetReplicasRetType) {
|
||||
setGetInstanceResponseGetReplicasAttributeType(&o.Replicas, v)
|
||||
}
|
||||
|
||||
// GetRetentionDays returns the RetentionDays field value
|
||||
func (o *GetInstanceResponse) GetRetentionDays() (ret GetInstanceResponseGetRetentionDaysRetType) {
|
||||
ret, _ = o.GetRetentionDaysOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetRetentionDaysOk returns a tuple with the RetentionDays field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetRetentionDaysOk() (ret GetInstanceResponseGetRetentionDaysRetType, ok bool) {
|
||||
return getGetInstanceResponseGetRetentionDaysAttributeTypeOk(o.RetentionDays)
|
||||
}
|
||||
|
||||
// SetRetentionDays sets field value
|
||||
func (o *GetInstanceResponse) SetRetentionDays(v GetInstanceResponseGetRetentionDaysRetType) {
|
||||
setGetInstanceResponseGetRetentionDaysAttributeType(&o.RetentionDays, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *GetInstanceResponse) GetStatus() (ret GetInstanceResponseGetStatusRetType) {
|
||||
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 *GetInstanceResponse) GetStatusOk() (ret GetInstanceResponseGetStatusRetType, ok bool) {
|
||||
return getGetInstanceResponseGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *GetInstanceResponse) SetStatus(v GetInstanceResponseGetStatusRetType) {
|
||||
setGetInstanceResponseGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetStorage returns the Storage field value
|
||||
func (o *GetInstanceResponse) GetStorage() (ret GetInstanceResponseGetStorageRetType) {
|
||||
ret, _ = o.GetStorageOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetStorageOk returns a tuple with the Storage field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetStorageOk() (ret GetInstanceResponseGetStorageRetType, ok bool) {
|
||||
return getGetInstanceResponseGetStorageAttributeTypeOk(o.Storage)
|
||||
}
|
||||
|
||||
// SetStorage sets field value
|
||||
func (o *GetInstanceResponse) SetStorage(v GetInstanceResponseGetStorageRetType) {
|
||||
setGetInstanceResponseGetStorageAttributeType(&o.Storage, v)
|
||||
}
|
||||
|
||||
// GetVersion returns the Version field value
|
||||
func (o *GetInstanceResponse) GetVersion() (ret GetInstanceResponseGetVersionRetType) {
|
||||
ret, _ = o.GetVersionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetVersionOk returns a tuple with the Version field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetInstanceResponse) GetVersionOk() (ret GetInstanceResponseGetVersionRetType, ok bool) {
|
||||
return getGetInstanceResponseGetVersionAttributeTypeOk(o.Version)
|
||||
}
|
||||
|
||||
// SetVersion sets field value
|
||||
func (o *GetInstanceResponse) SetVersion(v GetInstanceResponseGetVersionRetType) {
|
||||
setGetInstanceResponseGetVersionAttributeType(&o.Version, v)
|
||||
}
|
||||
|
||||
func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetInstanceResponseGetAclAttributeTypeOk(o.Acl); ok {
|
||||
toSerialize["Acl"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok {
|
||||
toSerialize["BackupSchedule"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetEditionAttributeTypeOk(o.Edition); ok {
|
||||
toSerialize["Edition"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetEncryptionAttributeTypeOk(o.Encryption); ok {
|
||||
toSerialize["Encryption"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetFlavorIdAttributeTypeOk(o.FlavorId); ok {
|
||||
toSerialize["FlavorId"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponsegetIsDeletableAttributeTypeOk(o.IsDeletable); ok {
|
||||
toSerialize["IsDeletable"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetNetworkAttributeTypeOk(o.Network); ok {
|
||||
toSerialize["Network"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetReplicasAttributeTypeOk(o.Replicas); ok {
|
||||
toSerialize["Replicas"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetRetentionDaysAttributeTypeOk(o.RetentionDays); ok {
|
||||
toSerialize["RetentionDays"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetStorageAttributeTypeOk(o.Storage); ok {
|
||||
toSerialize["Storage"] = val
|
||||
}
|
||||
if val, ok := getGetInstanceResponseGetVersionAttributeTypeOk(o.Version); ok {
|
||||
toSerialize["Version"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetInstanceResponse struct {
|
||||
value *GetInstanceResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetInstanceResponse) Get() *GetInstanceResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetInstanceResponse) Set(val *GetInstanceResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetInstanceResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetInstanceResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetInstanceResponse(val *GetInstanceResponse) *NullableGetInstanceResponse {
|
||||
return &NullableGetInstanceResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetInstanceResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetInstanceResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_instance_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_instance_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
169
pkg/sqlserverflexalpha/model_get_storages_response.go
Normal file
169
pkg/sqlserverflexalpha/model_get_storages_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
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 GetStoragesResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetStoragesResponse{}
|
||||
|
||||
/*
|
||||
types and functions for storageClasses
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type GetStoragesResponseGetStorageClassesAttributeType = *[]FlavorStorageClassesStorageClass
|
||||
type GetStoragesResponseGetStorageClassesArgType = []FlavorStorageClassesStorageClass
|
||||
type GetStoragesResponseGetStorageClassesRetType = []FlavorStorageClassesStorageClass
|
||||
|
||||
func getGetStoragesResponseGetStorageClassesAttributeTypeOk(arg GetStoragesResponseGetStorageClassesAttributeType) (ret GetStoragesResponseGetStorageClassesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetStoragesResponseGetStorageClassesAttributeType(arg *GetStoragesResponseGetStorageClassesAttributeType, val GetStoragesResponseGetStorageClassesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for storageRange
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type GetStoragesResponseGetStorageRangeAttributeType = *FlavorStorageRange
|
||||
type GetStoragesResponseGetStorageRangeArgType = FlavorStorageRange
|
||||
type GetStoragesResponseGetStorageRangeRetType = FlavorStorageRange
|
||||
|
||||
func getGetStoragesResponseGetStorageRangeAttributeTypeOk(arg GetStoragesResponseGetStorageRangeAttributeType) (ret GetStoragesResponseGetStorageRangeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetStoragesResponseGetStorageRangeAttributeType(arg *GetStoragesResponseGetStorageRangeAttributeType, val GetStoragesResponseGetStorageRangeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// GetStoragesResponse struct for GetStoragesResponse
|
||||
type GetStoragesResponse struct {
|
||||
// maximum storage which can be ordered for the flavor in Gigabyte.
|
||||
// REQUIRED
|
||||
StorageClasses GetStoragesResponseGetStorageClassesAttributeType `json:"storageClasses" required:"true"`
|
||||
// REQUIRED
|
||||
StorageRange GetStoragesResponseGetStorageRangeAttributeType `json:"storageRange" required:"true"`
|
||||
}
|
||||
|
||||
type _GetStoragesResponse GetStoragesResponse
|
||||
|
||||
// NewGetStoragesResponse instantiates a new GetStoragesResponse 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 NewGetStoragesResponse(storageClasses GetStoragesResponseGetStorageClassesArgType, storageRange GetStoragesResponseGetStorageRangeArgType) *GetStoragesResponse {
|
||||
this := GetStoragesResponse{}
|
||||
setGetStoragesResponseGetStorageClassesAttributeType(&this.StorageClasses, storageClasses)
|
||||
setGetStoragesResponseGetStorageRangeAttributeType(&this.StorageRange, storageRange)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetStoragesResponseWithDefaults instantiates a new GetStoragesResponse 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 NewGetStoragesResponseWithDefaults() *GetStoragesResponse {
|
||||
this := GetStoragesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetStorageClasses returns the StorageClasses field value
|
||||
func (o *GetStoragesResponse) GetStorageClasses() (ret GetStoragesResponseGetStorageClassesRetType) {
|
||||
ret, _ = o.GetStorageClassesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetStorageClassesOk returns a tuple with the StorageClasses field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetStoragesResponse) GetStorageClassesOk() (ret GetStoragesResponseGetStorageClassesRetType, ok bool) {
|
||||
return getGetStoragesResponseGetStorageClassesAttributeTypeOk(o.StorageClasses)
|
||||
}
|
||||
|
||||
// SetStorageClasses sets field value
|
||||
func (o *GetStoragesResponse) SetStorageClasses(v GetStoragesResponseGetStorageClassesRetType) {
|
||||
setGetStoragesResponseGetStorageClassesAttributeType(&o.StorageClasses, v)
|
||||
}
|
||||
|
||||
// GetStorageRange returns the StorageRange field value
|
||||
func (o *GetStoragesResponse) GetStorageRange() (ret GetStoragesResponseGetStorageRangeRetType) {
|
||||
ret, _ = o.GetStorageRangeOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetStorageRangeOk returns a tuple with the StorageRange field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetStoragesResponse) GetStorageRangeOk() (ret GetStoragesResponseGetStorageRangeRetType, ok bool) {
|
||||
return getGetStoragesResponseGetStorageRangeAttributeTypeOk(o.StorageRange)
|
||||
}
|
||||
|
||||
// SetStorageRange sets field value
|
||||
func (o *GetStoragesResponse) SetStorageRange(v GetStoragesResponseGetStorageRangeRetType) {
|
||||
setGetStoragesResponseGetStorageRangeAttributeType(&o.StorageRange, v)
|
||||
}
|
||||
|
||||
func (o GetStoragesResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetStoragesResponseGetStorageClassesAttributeTypeOk(o.StorageClasses); ok {
|
||||
toSerialize["StorageClasses"] = val
|
||||
}
|
||||
if val, ok := getGetStoragesResponseGetStorageRangeAttributeTypeOk(o.StorageRange); ok {
|
||||
toSerialize["StorageRange"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetStoragesResponse struct {
|
||||
value *GetStoragesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetStoragesResponse) Get() *GetStoragesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetStoragesResponse) Set(val *GetStoragesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetStoragesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetStoragesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetStoragesResponse(val *GetStoragesResponse) *NullableGetStoragesResponse {
|
||||
return &NullableGetStoragesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetStoragesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetStoragesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_storages_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_storages_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
395
pkg/sqlserverflexalpha/model_get_user_response.go
Normal file
395
pkg/sqlserverflexalpha/model_get_user_response.go
Normal file
|
|
@ -0,0 +1,395 @@
|
|||
/*
|
||||
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 GetUserResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetUserResponse{}
|
||||
|
||||
/*
|
||||
types and functions for default_database
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetUserResponseGetDefaultDatabaseAttributeType = *string
|
||||
|
||||
func getGetUserResponseGetDefaultDatabaseAttributeTypeOk(arg GetUserResponseGetDefaultDatabaseAttributeType) (ret GetUserResponseGetDefaultDatabaseRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetDefaultDatabaseAttributeType(arg *GetUserResponseGetDefaultDatabaseAttributeType, val GetUserResponseGetDefaultDatabaseRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetUserResponseGetDefaultDatabaseArgType = string
|
||||
type GetUserResponseGetDefaultDatabaseRetType = string
|
||||
|
||||
/*
|
||||
types and functions for host
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetUserResponseGetHostAttributeType = *string
|
||||
|
||||
func getGetUserResponseGetHostAttributeTypeOk(arg GetUserResponseGetHostAttributeType) (ret GetUserResponseGetHostRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetHostAttributeType(arg *GetUserResponseGetHostAttributeType, val GetUserResponseGetHostRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetUserResponseGetHostArgType = string
|
||||
type GetUserResponseGetHostRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type GetUserResponseGetIdAttributeType = *int64
|
||||
type GetUserResponseGetIdArgType = int64
|
||||
type GetUserResponseGetIdRetType = int64
|
||||
|
||||
func getGetUserResponseGetIdAttributeTypeOk(arg GetUserResponseGetIdAttributeType) (ret GetUserResponseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetIdAttributeType(arg *GetUserResponseGetIdAttributeType, val GetUserResponseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for port
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type GetUserResponseGetPortAttributeType = *int64
|
||||
type GetUserResponseGetPortArgType = int64
|
||||
type GetUserResponseGetPortRetType = int64
|
||||
|
||||
func getGetUserResponseGetPortAttributeTypeOk(arg GetUserResponseGetPortAttributeType) (ret GetUserResponseGetPortRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetPortAttributeType(arg *GetUserResponseGetPortAttributeType, val GetUserResponseGetPortRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for roles
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type GetUserResponseGetRolesAttributeType = *[]UserRole
|
||||
type GetUserResponseGetRolesArgType = []UserRole
|
||||
type GetUserResponseGetRolesRetType = []UserRole
|
||||
|
||||
func getGetUserResponseGetRolesAttributeTypeOk(arg GetUserResponseGetRolesAttributeType) (ret GetUserResponseGetRolesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetRolesAttributeType(arg *GetUserResponseGetRolesAttributeType, val GetUserResponseGetRolesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetUserResponseGetStatusAttributeType = *string
|
||||
|
||||
func getGetUserResponseGetStatusAttributeTypeOk(arg GetUserResponseGetStatusAttributeType) (ret GetUserResponseGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetStatusAttributeType(arg *GetUserResponseGetStatusAttributeType, val GetUserResponseGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetUserResponseGetStatusArgType = string
|
||||
type GetUserResponseGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for username
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetUserResponseGetUsernameAttributeType = *string
|
||||
|
||||
func getGetUserResponseGetUsernameAttributeTypeOk(arg GetUserResponseGetUsernameAttributeType) (ret GetUserResponseGetUsernameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetUserResponseGetUsernameAttributeType(arg *GetUserResponseGetUsernameAttributeType, val GetUserResponseGetUsernameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetUserResponseGetUsernameArgType = string
|
||||
type GetUserResponseGetUsernameRetType = string
|
||||
|
||||
// GetUserResponse struct for GetUserResponse
|
||||
type GetUserResponse struct {
|
||||
// The default database for a user of the instance.
|
||||
// REQUIRED
|
||||
DefaultDatabase GetUserResponseGetDefaultDatabaseAttributeType `json:"default_database" required:"true"`
|
||||
// The host of the instance in which the user belongs to.
|
||||
// REQUIRED
|
||||
Host GetUserResponseGetHostAttributeType `json:"host" required:"true"`
|
||||
// The ID of the user.
|
||||
// REQUIRED
|
||||
Id GetUserResponseGetIdAttributeType `json:"id" required:"true"`
|
||||
// The port of the instance in which the user belongs to.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
Port GetUserResponseGetPortAttributeType `json:"port" required:"true"`
|
||||
// A list of user roles.
|
||||
// REQUIRED
|
||||
Roles GetUserResponseGetRolesAttributeType `json:"roles" required:"true"`
|
||||
// The current status of the user.
|
||||
// REQUIRED
|
||||
Status GetUserResponseGetStatusAttributeType `json:"status" required:"true"`
|
||||
// The name of the user.
|
||||
// REQUIRED
|
||||
Username GetUserResponseGetUsernameAttributeType `json:"username" required:"true"`
|
||||
}
|
||||
|
||||
type _GetUserResponse GetUserResponse
|
||||
|
||||
// NewGetUserResponse instantiates a new GetUserResponse 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 NewGetUserResponse(defaultDatabase GetUserResponseGetDefaultDatabaseArgType, host GetUserResponseGetHostArgType, id GetUserResponseGetIdArgType, port GetUserResponseGetPortArgType, roles GetUserResponseGetRolesArgType, status GetUserResponseGetStatusArgType, username GetUserResponseGetUsernameArgType) *GetUserResponse {
|
||||
this := GetUserResponse{}
|
||||
setGetUserResponseGetDefaultDatabaseAttributeType(&this.DefaultDatabase, defaultDatabase)
|
||||
setGetUserResponseGetHostAttributeType(&this.Host, host)
|
||||
setGetUserResponseGetIdAttributeType(&this.Id, id)
|
||||
setGetUserResponseGetPortAttributeType(&this.Port, port)
|
||||
setGetUserResponseGetRolesAttributeType(&this.Roles, roles)
|
||||
setGetUserResponseGetStatusAttributeType(&this.Status, status)
|
||||
setGetUserResponseGetUsernameAttributeType(&this.Username, username)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetUserResponseWithDefaults instantiates a new GetUserResponse 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 NewGetUserResponseWithDefaults() *GetUserResponse {
|
||||
this := GetUserResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDefaultDatabase returns the DefaultDatabase field value
|
||||
func (o *GetUserResponse) GetDefaultDatabase() (ret GetUserResponseGetDefaultDatabaseRetType) {
|
||||
ret, _ = o.GetDefaultDatabaseOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDefaultDatabaseOk returns a tuple with the DefaultDatabase field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetUserResponse) GetDefaultDatabaseOk() (ret GetUserResponseGetDefaultDatabaseRetType, ok bool) {
|
||||
return getGetUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase)
|
||||
}
|
||||
|
||||
// SetDefaultDatabase sets field value
|
||||
func (o *GetUserResponse) SetDefaultDatabase(v GetUserResponseGetDefaultDatabaseRetType) {
|
||||
setGetUserResponseGetDefaultDatabaseAttributeType(&o.DefaultDatabase, v)
|
||||
}
|
||||
|
||||
// GetHost returns the Host field value
|
||||
func (o *GetUserResponse) GetHost() (ret GetUserResponseGetHostRetType) {
|
||||
ret, _ = o.GetHostOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetHostOk returns a tuple with the Host field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetUserResponse) GetHostOk() (ret GetUserResponseGetHostRetType, ok bool) {
|
||||
return getGetUserResponseGetHostAttributeTypeOk(o.Host)
|
||||
}
|
||||
|
||||
// SetHost sets field value
|
||||
func (o *GetUserResponse) SetHost(v GetUserResponseGetHostRetType) {
|
||||
setGetUserResponseGetHostAttributeType(&o.Host, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *GetUserResponse) GetId() (ret GetUserResponseGetIdRetType) {
|
||||
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 *GetUserResponse) GetIdOk() (ret GetUserResponseGetIdRetType, ok bool) {
|
||||
return getGetUserResponseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *GetUserResponse) SetId(v GetUserResponseGetIdRetType) {
|
||||
setGetUserResponseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetPort returns the Port field value
|
||||
func (o *GetUserResponse) GetPort() (ret GetUserResponseGetPortRetType) {
|
||||
ret, _ = o.GetPortOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPortOk returns a tuple with the Port field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetUserResponse) GetPortOk() (ret GetUserResponseGetPortRetType, ok bool) {
|
||||
return getGetUserResponseGetPortAttributeTypeOk(o.Port)
|
||||
}
|
||||
|
||||
// SetPort sets field value
|
||||
func (o *GetUserResponse) SetPort(v GetUserResponseGetPortRetType) {
|
||||
setGetUserResponseGetPortAttributeType(&o.Port, v)
|
||||
}
|
||||
|
||||
// GetRoles returns the Roles field value
|
||||
func (o *GetUserResponse) GetRoles() (ret GetUserResponseGetRolesRetType) {
|
||||
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 *GetUserResponse) GetRolesOk() (ret GetUserResponseGetRolesRetType, ok bool) {
|
||||
return getGetUserResponseGetRolesAttributeTypeOk(o.Roles)
|
||||
}
|
||||
|
||||
// SetRoles sets field value
|
||||
func (o *GetUserResponse) SetRoles(v GetUserResponseGetRolesRetType) {
|
||||
setGetUserResponseGetRolesAttributeType(&o.Roles, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *GetUserResponse) GetStatus() (ret GetUserResponseGetStatusRetType) {
|
||||
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 *GetUserResponse) GetStatusOk() (ret GetUserResponseGetStatusRetType, ok bool) {
|
||||
return getGetUserResponseGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *GetUserResponse) SetStatus(v GetUserResponseGetStatusRetType) {
|
||||
setGetUserResponseGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetUsername returns the Username field value
|
||||
func (o *GetUserResponse) GetUsername() (ret GetUserResponseGetUsernameRetType) {
|
||||
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 *GetUserResponse) GetUsernameOk() (ret GetUserResponseGetUsernameRetType, ok bool) {
|
||||
return getGetUserResponseGetUsernameAttributeTypeOk(o.Username)
|
||||
}
|
||||
|
||||
// SetUsername sets field value
|
||||
func (o *GetUserResponse) SetUsername(v GetUserResponseGetUsernameRetType) {
|
||||
setGetUserResponseGetUsernameAttributeType(&o.Username, v)
|
||||
}
|
||||
|
||||
func (o GetUserResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetUserResponseGetDefaultDatabaseAttributeTypeOk(o.DefaultDatabase); ok {
|
||||
toSerialize["DefaultDatabase"] = val
|
||||
}
|
||||
if val, ok := getGetUserResponseGetHostAttributeTypeOk(o.Host); ok {
|
||||
toSerialize["Host"] = val
|
||||
}
|
||||
if val, ok := getGetUserResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getGetUserResponseGetPortAttributeTypeOk(o.Port); ok {
|
||||
toSerialize["Port"] = val
|
||||
}
|
||||
if val, ok := getGetUserResponseGetRolesAttributeTypeOk(o.Roles); ok {
|
||||
toSerialize["Roles"] = val
|
||||
}
|
||||
if val, ok := getGetUserResponseGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getGetUserResponseGetUsernameAttributeTypeOk(o.Username); ok {
|
||||
toSerialize["Username"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetUserResponse struct {
|
||||
value *GetUserResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetUserResponse) Get() *GetUserResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetUserResponse) Set(val *GetUserResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetUserResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetUserResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse {
|
||||
return &NullableGetUserResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_user_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_get_versions_response.go
Normal file
126
pkg/sqlserverflexalpha/model_get_versions_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 GetVersionsResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetVersionsResponse{}
|
||||
|
||||
/*
|
||||
types and functions for versions
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type GetVersionsResponseGetVersionsAttributeType = *[]Version
|
||||
type GetVersionsResponseGetVersionsArgType = []Version
|
||||
type GetVersionsResponseGetVersionsRetType = []Version
|
||||
|
||||
func getGetVersionsResponseGetVersionsAttributeTypeOk(arg GetVersionsResponseGetVersionsAttributeType) (ret GetVersionsResponseGetVersionsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetVersionsResponseGetVersionsAttributeType(arg *GetVersionsResponseGetVersionsAttributeType, val GetVersionsResponseGetVersionsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// GetVersionsResponse struct for GetVersionsResponse
|
||||
type GetVersionsResponse struct {
|
||||
// A list containing available sqlserver versions.
|
||||
// REQUIRED
|
||||
Versions GetVersionsResponseGetVersionsAttributeType `json:"versions" required:"true"`
|
||||
}
|
||||
|
||||
type _GetVersionsResponse GetVersionsResponse
|
||||
|
||||
// NewGetVersionsResponse instantiates a new GetVersionsResponse 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 NewGetVersionsResponse(versions GetVersionsResponseGetVersionsArgType) *GetVersionsResponse {
|
||||
this := GetVersionsResponse{}
|
||||
setGetVersionsResponseGetVersionsAttributeType(&this.Versions, versions)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetVersionsResponseWithDefaults instantiates a new GetVersionsResponse 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 NewGetVersionsResponseWithDefaults() *GetVersionsResponse {
|
||||
this := GetVersionsResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetVersions returns the Versions field value
|
||||
func (o *GetVersionsResponse) GetVersions() (ret GetVersionsResponseGetVersionsRetType) {
|
||||
ret, _ = o.GetVersionsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetVersionsOk returns a tuple with the Versions field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetVersionsResponse) GetVersionsOk() (ret GetVersionsResponseGetVersionsRetType, ok bool) {
|
||||
return getGetVersionsResponseGetVersionsAttributeTypeOk(o.Versions)
|
||||
}
|
||||
|
||||
// SetVersions sets field value
|
||||
func (o *GetVersionsResponse) SetVersions(v GetVersionsResponseGetVersionsRetType) {
|
||||
setGetVersionsResponseGetVersionsAttributeType(&o.Versions, v)
|
||||
}
|
||||
|
||||
func (o GetVersionsResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetVersionsResponseGetVersionsAttributeTypeOk(o.Versions); ok {
|
||||
toSerialize["Versions"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetVersionsResponse struct {
|
||||
value *GetVersionsResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetVersionsResponse) Get() *GetVersionsResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetVersionsResponse) Set(val *GetVersionsResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetVersionsResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetVersionsResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetVersionsResponse(val *GetVersionsResponse) *NullableGetVersionsResponse {
|
||||
return &NullableGetVersionsResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetVersionsResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetVersionsResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_get_versions_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_get_versions_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
117
pkg/sqlserverflexalpha/model_instance_edition.go
Normal file
117
pkg/sqlserverflexalpha/model_instance_edition.go
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// InstanceEdition Edition of the MSSQL server instance
|
||||
type InstanceEdition string
|
||||
|
||||
// List of instance.edition
|
||||
const (
|
||||
INSTANCEEDITION_STANDARD InstanceEdition = "Standard"
|
||||
INSTANCEEDITION_ENTERPRISE_CORE InstanceEdition = "EnterpriseCore"
|
||||
INSTANCEEDITION_DEVELOPER InstanceEdition = "developer"
|
||||
)
|
||||
|
||||
// All allowed values of InstanceEdition enum
|
||||
var AllowedInstanceEditionEnumValues = []InstanceEdition{
|
||||
"Standard",
|
||||
"EnterpriseCore",
|
||||
"developer",
|
||||
}
|
||||
|
||||
func (v *InstanceEdition) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := InstanceEdition(value)
|
||||
for _, existing := range AllowedInstanceEditionEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid InstanceEdition", value)
|
||||
}
|
||||
|
||||
// NewInstanceEditionFromValue returns a pointer to a valid InstanceEdition
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewInstanceEditionFromValue(v string) (*InstanceEdition, error) {
|
||||
ev := InstanceEdition(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for InstanceEdition: valid values are %v", v, AllowedInstanceEditionEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v InstanceEdition) IsValid() bool {
|
||||
for _, existing := range AllowedInstanceEditionEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to instance.edition value
|
||||
func (v InstanceEdition) Ptr() *InstanceEdition {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableInstanceEdition struct {
|
||||
value *InstanceEdition
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceEdition) Get() *InstanceEdition {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEdition) Set(val *InstanceEdition) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceEdition) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEdition) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceEdition(val *InstanceEdition) *NullableInstanceEdition {
|
||||
return &NullableInstanceEdition{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceEdition) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEdition) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_instance_edition_test.go
Normal file
11
pkg/sqlserverflexalpha/model_instance_edition_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
261
pkg/sqlserverflexalpha/model_instance_encryption.go
Normal file
261
pkg/sqlserverflexalpha/model_instance_encryption.go
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
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 InstanceEncryption type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &InstanceEncryption{}
|
||||
|
||||
/*
|
||||
types and functions for kekKeyId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetKekKeyIdAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetKekKeyIdAttributeTypeOk(arg InstanceEncryptionGetKekKeyIdAttributeType) (ret InstanceEncryptionGetKekKeyIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetKekKeyIdAttributeType(arg *InstanceEncryptionGetKekKeyIdAttributeType, val InstanceEncryptionGetKekKeyIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetKekKeyIdArgType = string
|
||||
type InstanceEncryptionGetKekKeyIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for kekKeyRingId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetKekKeyRingIdAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(arg InstanceEncryptionGetKekKeyRingIdAttributeType) (ret InstanceEncryptionGetKekKeyRingIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetKekKeyRingIdAttributeType(arg *InstanceEncryptionGetKekKeyRingIdAttributeType, val InstanceEncryptionGetKekKeyRingIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetKekKeyRingIdArgType = string
|
||||
type InstanceEncryptionGetKekKeyRingIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for kekKeyVersion
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetKekKeyVersionAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(arg InstanceEncryptionGetKekKeyVersionAttributeType) (ret InstanceEncryptionGetKekKeyVersionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetKekKeyVersionAttributeType(arg *InstanceEncryptionGetKekKeyVersionAttributeType, val InstanceEncryptionGetKekKeyVersionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetKekKeyVersionArgType = string
|
||||
type InstanceEncryptionGetKekKeyVersionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for serviceAccount
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceEncryptionGetServiceAccountAttributeType = *string
|
||||
|
||||
func getInstanceEncryptionGetServiceAccountAttributeTypeOk(arg InstanceEncryptionGetServiceAccountAttributeType) (ret InstanceEncryptionGetServiceAccountRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceEncryptionGetServiceAccountAttributeType(arg *InstanceEncryptionGetServiceAccountAttributeType, val InstanceEncryptionGetServiceAccountRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceEncryptionGetServiceAccountArgType = string
|
||||
type InstanceEncryptionGetServiceAccountRetType = string
|
||||
|
||||
// InstanceEncryption this defines which key to use for storage encryption
|
||||
type InstanceEncryption struct {
|
||||
// The key identifier
|
||||
// REQUIRED
|
||||
KekKeyId InstanceEncryptionGetKekKeyIdAttributeType `json:"kekKeyId" required:"true"`
|
||||
// The keyring identifier
|
||||
// REQUIRED
|
||||
KekKeyRingId InstanceEncryptionGetKekKeyRingIdAttributeType `json:"kekKeyRingId" required:"true"`
|
||||
// The key version
|
||||
// REQUIRED
|
||||
KekKeyVersion InstanceEncryptionGetKekKeyVersionAttributeType `json:"kekKeyVersion" required:"true"`
|
||||
// REQUIRED
|
||||
ServiceAccount InstanceEncryptionGetServiceAccountAttributeType `json:"serviceAccount" required:"true"`
|
||||
}
|
||||
|
||||
type _InstanceEncryption InstanceEncryption
|
||||
|
||||
// NewInstanceEncryption instantiates a new InstanceEncryption 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 NewInstanceEncryption(kekKeyId InstanceEncryptionGetKekKeyIdArgType, kekKeyRingId InstanceEncryptionGetKekKeyRingIdArgType, kekKeyVersion InstanceEncryptionGetKekKeyVersionArgType, serviceAccount InstanceEncryptionGetServiceAccountArgType) *InstanceEncryption {
|
||||
this := InstanceEncryption{}
|
||||
setInstanceEncryptionGetKekKeyIdAttributeType(&this.KekKeyId, kekKeyId)
|
||||
setInstanceEncryptionGetKekKeyRingIdAttributeType(&this.KekKeyRingId, kekKeyRingId)
|
||||
setInstanceEncryptionGetKekKeyVersionAttributeType(&this.KekKeyVersion, kekKeyVersion)
|
||||
setInstanceEncryptionGetServiceAccountAttributeType(&this.ServiceAccount, serviceAccount)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInstanceEncryptionWithDefaults instantiates a new InstanceEncryption 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 NewInstanceEncryptionWithDefaults() *InstanceEncryption {
|
||||
this := InstanceEncryption{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetKekKeyId returns the KekKeyId field value
|
||||
func (o *InstanceEncryption) GetKekKeyId() (ret InstanceEncryptionGetKekKeyIdRetType) {
|
||||
ret, _ = o.GetKekKeyIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetKekKeyIdOk returns a tuple with the KekKeyId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceEncryption) GetKekKeyIdOk() (ret InstanceEncryptionGetKekKeyIdRetType, ok bool) {
|
||||
return getInstanceEncryptionGetKekKeyIdAttributeTypeOk(o.KekKeyId)
|
||||
}
|
||||
|
||||
// SetKekKeyId sets field value
|
||||
func (o *InstanceEncryption) SetKekKeyId(v InstanceEncryptionGetKekKeyIdRetType) {
|
||||
setInstanceEncryptionGetKekKeyIdAttributeType(&o.KekKeyId, v)
|
||||
}
|
||||
|
||||
// GetKekKeyRingId returns the KekKeyRingId field value
|
||||
func (o *InstanceEncryption) GetKekKeyRingId() (ret InstanceEncryptionGetKekKeyRingIdRetType) {
|
||||
ret, _ = o.GetKekKeyRingIdOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetKekKeyRingIdOk returns a tuple with the KekKeyRingId field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceEncryption) GetKekKeyRingIdOk() (ret InstanceEncryptionGetKekKeyRingIdRetType, ok bool) {
|
||||
return getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(o.KekKeyRingId)
|
||||
}
|
||||
|
||||
// SetKekKeyRingId sets field value
|
||||
func (o *InstanceEncryption) SetKekKeyRingId(v InstanceEncryptionGetKekKeyRingIdRetType) {
|
||||
setInstanceEncryptionGetKekKeyRingIdAttributeType(&o.KekKeyRingId, v)
|
||||
}
|
||||
|
||||
// GetKekKeyVersion returns the KekKeyVersion field value
|
||||
func (o *InstanceEncryption) GetKekKeyVersion() (ret InstanceEncryptionGetKekKeyVersionRetType) {
|
||||
ret, _ = o.GetKekKeyVersionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetKekKeyVersionOk returns a tuple with the KekKeyVersion field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceEncryption) GetKekKeyVersionOk() (ret InstanceEncryptionGetKekKeyVersionRetType, ok bool) {
|
||||
return getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion)
|
||||
}
|
||||
|
||||
// SetKekKeyVersion sets field value
|
||||
func (o *InstanceEncryption) SetKekKeyVersion(v InstanceEncryptionGetKekKeyVersionRetType) {
|
||||
setInstanceEncryptionGetKekKeyVersionAttributeType(&o.KekKeyVersion, v)
|
||||
}
|
||||
|
||||
// GetServiceAccount returns the ServiceAccount field value
|
||||
func (o *InstanceEncryption) GetServiceAccount() (ret InstanceEncryptionGetServiceAccountRetType) {
|
||||
ret, _ = o.GetServiceAccountOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetServiceAccountOk returns a tuple with the ServiceAccount field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceEncryption) GetServiceAccountOk() (ret InstanceEncryptionGetServiceAccountRetType, ok bool) {
|
||||
return getInstanceEncryptionGetServiceAccountAttributeTypeOk(o.ServiceAccount)
|
||||
}
|
||||
|
||||
// SetServiceAccount sets field value
|
||||
func (o *InstanceEncryption) SetServiceAccount(v InstanceEncryptionGetServiceAccountRetType) {
|
||||
setInstanceEncryptionGetServiceAccountAttributeType(&o.ServiceAccount, v)
|
||||
}
|
||||
|
||||
func (o InstanceEncryption) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getInstanceEncryptionGetKekKeyIdAttributeTypeOk(o.KekKeyId); ok {
|
||||
toSerialize["KekKeyId"] = val
|
||||
}
|
||||
if val, ok := getInstanceEncryptionGetKekKeyRingIdAttributeTypeOk(o.KekKeyRingId); ok {
|
||||
toSerialize["KekKeyRingId"] = val
|
||||
}
|
||||
if val, ok := getInstanceEncryptionGetKekKeyVersionAttributeTypeOk(o.KekKeyVersion); ok {
|
||||
toSerialize["KekKeyVersion"] = val
|
||||
}
|
||||
if val, ok := getInstanceEncryptionGetServiceAccountAttributeTypeOk(o.ServiceAccount); ok {
|
||||
toSerialize["ServiceAccount"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableInstanceEncryption struct {
|
||||
value *InstanceEncryption
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceEncryption) Get() *InstanceEncryption {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEncryption) Set(val *InstanceEncryption) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceEncryption) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEncryption) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceEncryption(val *InstanceEncryption) *NullableInstanceEncryption {
|
||||
return &NullableInstanceEncryption{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceEncryption) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceEncryption) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_instance_encryption_test.go
Normal file
11
pkg/sqlserverflexalpha/model_instance_encryption_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
273
pkg/sqlserverflexalpha/model_instance_network.go
Normal file
273
pkg/sqlserverflexalpha/model_instance_network.go
Normal file
|
|
@ -0,0 +1,273 @@
|
|||
/*
|
||||
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 InstanceNetwork type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &InstanceNetwork{}
|
||||
|
||||
/*
|
||||
types and functions for accessScope
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type InstanceNetworkGetAccessScopeAttributeType = *InstanceNetworkAccessScope
|
||||
type InstanceNetworkGetAccessScopeArgType = InstanceNetworkAccessScope
|
||||
type InstanceNetworkGetAccessScopeRetType = InstanceNetworkAccessScope
|
||||
|
||||
func getInstanceNetworkGetAccessScopeAttributeTypeOk(arg InstanceNetworkGetAccessScopeAttributeType) (ret InstanceNetworkGetAccessScopeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceNetworkGetAccessScopeAttributeType(arg *InstanceNetworkGetAccessScopeAttributeType, val InstanceNetworkGetAccessScopeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for acl
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type InstanceNetworkGetAclAttributeType = *[]string
|
||||
type InstanceNetworkGetAclArgType = []string
|
||||
type InstanceNetworkGetAclRetType = []string
|
||||
|
||||
func getInstanceNetworkGetAclAttributeTypeOk(arg InstanceNetworkGetAclAttributeType) (ret InstanceNetworkGetAclRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceNetworkGetAclAttributeType(arg *InstanceNetworkGetAclAttributeType, val InstanceNetworkGetAclRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for instanceAddress
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceNetworkGetInstanceAddressAttributeType = *string
|
||||
|
||||
func getInstanceNetworkGetInstanceAddressAttributeTypeOk(arg InstanceNetworkGetInstanceAddressAttributeType) (ret InstanceNetworkGetInstanceAddressRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceNetworkGetInstanceAddressAttributeType(arg *InstanceNetworkGetInstanceAddressAttributeType, val InstanceNetworkGetInstanceAddressRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceNetworkGetInstanceAddressArgType = string
|
||||
type InstanceNetworkGetInstanceAddressRetType = string
|
||||
|
||||
/*
|
||||
types and functions for routerAddress
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type InstanceNetworkGetRouterAddressAttributeType = *string
|
||||
|
||||
func getInstanceNetworkGetRouterAddressAttributeTypeOk(arg InstanceNetworkGetRouterAddressAttributeType) (ret InstanceNetworkGetRouterAddressRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setInstanceNetworkGetRouterAddressAttributeType(arg *InstanceNetworkGetRouterAddressAttributeType, val InstanceNetworkGetRouterAddressRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type InstanceNetworkGetRouterAddressArgType = string
|
||||
type InstanceNetworkGetRouterAddressRetType = string
|
||||
|
||||
// InstanceNetwork The access configuration of the instance
|
||||
type InstanceNetwork struct {
|
||||
AccessScope InstanceNetworkGetAccessScopeAttributeType `json:"accessScope,omitempty"`
|
||||
// List of IPV4 cidr.
|
||||
Acl InstanceNetworkGetAclAttributeType `json:"acl,omitempty"`
|
||||
InstanceAddress InstanceNetworkGetInstanceAddressAttributeType `json:"instanceAddress,omitempty"`
|
||||
RouterAddress InstanceNetworkGetRouterAddressAttributeType `json:"routerAddress,omitempty"`
|
||||
}
|
||||
|
||||
// NewInstanceNetwork instantiates a new InstanceNetwork 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 NewInstanceNetwork() *InstanceNetwork {
|
||||
this := InstanceNetwork{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewInstanceNetworkWithDefaults instantiates a new InstanceNetwork 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 NewInstanceNetworkWithDefaults() *InstanceNetwork {
|
||||
this := InstanceNetwork{}
|
||||
var accessScope InstanceNetworkAccessScope = INSTANCENETWORKACCESSSCOPE_PUBLIC
|
||||
this.AccessScope = &accessScope
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAccessScope returns the AccessScope field value if set, zero value otherwise.
|
||||
func (o *InstanceNetwork) GetAccessScope() (res InstanceNetworkGetAccessScopeRetType) {
|
||||
res, _ = o.GetAccessScopeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAccessScopeOk returns a tuple with the AccessScope field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceNetwork) GetAccessScopeOk() (ret InstanceNetworkGetAccessScopeRetType, ok bool) {
|
||||
return getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope)
|
||||
}
|
||||
|
||||
// HasAccessScope returns a boolean if a field has been set.
|
||||
func (o *InstanceNetwork) HasAccessScope() bool {
|
||||
_, ok := o.GetAccessScopeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAccessScope gets a reference to the given InstanceNetworkAccessScope and assigns it to the AccessScope field.
|
||||
func (o *InstanceNetwork) SetAccessScope(v InstanceNetworkGetAccessScopeRetType) {
|
||||
setInstanceNetworkGetAccessScopeAttributeType(&o.AccessScope, v)
|
||||
}
|
||||
|
||||
// GetAcl returns the Acl field value if set, zero value otherwise.
|
||||
func (o *InstanceNetwork) GetAcl() (res InstanceNetworkGetAclRetType) {
|
||||
res, _ = o.GetAclOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAclOk returns a tuple with the Acl field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceNetwork) GetAclOk() (ret InstanceNetworkGetAclRetType, ok bool) {
|
||||
return getInstanceNetworkGetAclAttributeTypeOk(o.Acl)
|
||||
}
|
||||
|
||||
// HasAcl returns a boolean if a field has been set.
|
||||
func (o *InstanceNetwork) HasAcl() bool {
|
||||
_, ok := o.GetAclOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAcl gets a reference to the given []string and assigns it to the Acl field.
|
||||
func (o *InstanceNetwork) SetAcl(v InstanceNetworkGetAclRetType) {
|
||||
setInstanceNetworkGetAclAttributeType(&o.Acl, v)
|
||||
}
|
||||
|
||||
// GetInstanceAddress returns the InstanceAddress field value if set, zero value otherwise.
|
||||
func (o *InstanceNetwork) GetInstanceAddress() (res InstanceNetworkGetInstanceAddressRetType) {
|
||||
res, _ = o.GetInstanceAddressOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetInstanceAddressOk returns a tuple with the InstanceAddress field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceNetwork) GetInstanceAddressOk() (ret InstanceNetworkGetInstanceAddressRetType, ok bool) {
|
||||
return getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress)
|
||||
}
|
||||
|
||||
// HasInstanceAddress returns a boolean if a field has been set.
|
||||
func (o *InstanceNetwork) HasInstanceAddress() bool {
|
||||
_, ok := o.GetInstanceAddressOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetInstanceAddress gets a reference to the given string and assigns it to the InstanceAddress field.
|
||||
func (o *InstanceNetwork) SetInstanceAddress(v InstanceNetworkGetInstanceAddressRetType) {
|
||||
setInstanceNetworkGetInstanceAddressAttributeType(&o.InstanceAddress, v)
|
||||
}
|
||||
|
||||
// GetRouterAddress returns the RouterAddress field value if set, zero value otherwise.
|
||||
func (o *InstanceNetwork) GetRouterAddress() (res InstanceNetworkGetRouterAddressRetType) {
|
||||
res, _ = o.GetRouterAddressOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRouterAddressOk returns a tuple with the RouterAddress field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *InstanceNetwork) GetRouterAddressOk() (ret InstanceNetworkGetRouterAddressRetType, ok bool) {
|
||||
return getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress)
|
||||
}
|
||||
|
||||
// HasRouterAddress returns a boolean if a field has been set.
|
||||
func (o *InstanceNetwork) HasRouterAddress() bool {
|
||||
_, ok := o.GetRouterAddressOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRouterAddress gets a reference to the given string and assigns it to the RouterAddress field.
|
||||
func (o *InstanceNetwork) SetRouterAddress(v InstanceNetworkGetRouterAddressRetType) {
|
||||
setInstanceNetworkGetRouterAddressAttributeType(&o.RouterAddress, v)
|
||||
}
|
||||
|
||||
func (o InstanceNetwork) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok {
|
||||
toSerialize["AccessScope"] = val
|
||||
}
|
||||
if val, ok := getInstanceNetworkGetAclAttributeTypeOk(o.Acl); ok {
|
||||
toSerialize["Acl"] = val
|
||||
}
|
||||
if val, ok := getInstanceNetworkGetInstanceAddressAttributeTypeOk(o.InstanceAddress); ok {
|
||||
toSerialize["InstanceAddress"] = val
|
||||
}
|
||||
if val, ok := getInstanceNetworkGetRouterAddressAttributeTypeOk(o.RouterAddress); ok {
|
||||
toSerialize["RouterAddress"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableInstanceNetwork struct {
|
||||
value *InstanceNetwork
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetwork) Get() *InstanceNetwork {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetwork) Set(val *InstanceNetwork) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetwork) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetwork) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceNetwork(val *InstanceNetwork) *NullableInstanceNetwork {
|
||||
return &NullableInstanceNetwork{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetwork) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetwork) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
115
pkg/sqlserverflexalpha/model_instance_network_access_scope.go
Normal file
115
pkg/sqlserverflexalpha/model_instance_network_access_scope.go
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// InstanceNetworkAccessScope The network access scope of the instance ⚠️ **Note:** This feature is in private preview. Supplying this object is only permitted for enabled accounts. If your account does not have access, the request will be rejected.
|
||||
type InstanceNetworkAccessScope string
|
||||
|
||||
// List of instance.network.accessScope
|
||||
const (
|
||||
INSTANCENETWORKACCESSSCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC"
|
||||
INSTANCENETWORKACCESSSCOPE_SNA InstanceNetworkAccessScope = "SNA"
|
||||
)
|
||||
|
||||
// All allowed values of InstanceNetworkAccessScope enum
|
||||
var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{
|
||||
"PUBLIC",
|
||||
"SNA",
|
||||
}
|
||||
|
||||
func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := InstanceNetworkAccessScope(value)
|
||||
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid InstanceNetworkAccessScope", value)
|
||||
}
|
||||
|
||||
// NewInstanceNetworkAccessScopeFromValue returns a pointer to a valid InstanceNetworkAccessScope
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewInstanceNetworkAccessScopeFromValue(v string) (*InstanceNetworkAccessScope, error) {
|
||||
ev := InstanceNetworkAccessScope(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for InstanceNetworkAccessScope: valid values are %v", v, AllowedInstanceNetworkAccessScopeEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v InstanceNetworkAccessScope) IsValid() bool {
|
||||
for _, existing := range AllowedInstanceNetworkAccessScopeEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to instance.network.accessScope value
|
||||
func (v InstanceNetworkAccessScope) Ptr() *InstanceNetworkAccessScope {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableInstanceNetworkAccessScope struct {
|
||||
value *InstanceNetworkAccessScope
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetworkAccessScope) Get() *InstanceNetworkAccessScope {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetworkAccessScope) Set(val *InstanceNetworkAccessScope) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetworkAccessScope) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetworkAccessScope) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceNetworkAccessScope(val *InstanceNetworkAccessScope) *NullableInstanceNetworkAccessScope {
|
||||
return &NullableInstanceNetworkAccessScope{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceNetworkAccessScope) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
11
pkg/sqlserverflexalpha/model_instance_network_test.go
Normal file
11
pkg/sqlserverflexalpha/model_instance_network_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
131
pkg/sqlserverflexalpha/model_instance_sort.go
Normal file
131
pkg/sqlserverflexalpha/model_instance_sort.go
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// InstanceSort the model 'InstanceSort'
|
||||
type InstanceSort string
|
||||
|
||||
// List of instance.sort
|
||||
const (
|
||||
INSTANCESORT_INDEX_DESC InstanceSort = "index.desc"
|
||||
INSTANCESORT_INDEX_ASC InstanceSort = "index.asc"
|
||||
INSTANCESORT_ID_DESC InstanceSort = "id.desc"
|
||||
INSTANCESORT_ID_ASC InstanceSort = "id.asc"
|
||||
INSTANCESORT_IS_DELETABLE_DESC InstanceSort = "is_deletable.desc"
|
||||
INSTANCESORT_IS_DELETABLE_ASC InstanceSort = "is_deletable.asc"
|
||||
INSTANCESORT_NAME_ASC InstanceSort = "name.asc"
|
||||
INSTANCESORT_NAME_DESC InstanceSort = "name.desc"
|
||||
INSTANCESORT_STATUS_ASC InstanceSort = "status.asc"
|
||||
INSTANCESORT_STATUS_DESC InstanceSort = "status.desc"
|
||||
)
|
||||
|
||||
// All allowed values of InstanceSort enum
|
||||
var AllowedInstanceSortEnumValues = []InstanceSort{
|
||||
"index.desc",
|
||||
"index.asc",
|
||||
"id.desc",
|
||||
"id.asc",
|
||||
"is_deletable.desc",
|
||||
"is_deletable.asc",
|
||||
"name.asc",
|
||||
"name.desc",
|
||||
"status.asc",
|
||||
"status.desc",
|
||||
}
|
||||
|
||||
func (v *InstanceSort) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := InstanceSort(value)
|
||||
for _, existing := range AllowedInstanceSortEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid InstanceSort", value)
|
||||
}
|
||||
|
||||
// NewInstanceSortFromValue returns a pointer to a valid InstanceSort
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewInstanceSortFromValue(v string) (*InstanceSort, error) {
|
||||
ev := InstanceSort(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for InstanceSort: valid values are %v", v, AllowedInstanceSortEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v InstanceSort) IsValid() bool {
|
||||
for _, existing := range AllowedInstanceSortEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to instance.sort value
|
||||
func (v InstanceSort) Ptr() *InstanceSort {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableInstanceSort struct {
|
||||
value *InstanceSort
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceSort) Get() *InstanceSort {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceSort) Set(val *InstanceSort) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceSort) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceSort) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceSort(val *InstanceSort) *NullableInstanceSort {
|
||||
return &NullableInstanceSort{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceSort) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceSort) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_instance_sort_test.go
Normal file
11
pkg/sqlserverflexalpha/model_instance_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
113
pkg/sqlserverflexalpha/model_instance_version.go
Normal file
113
pkg/sqlserverflexalpha/model_instance_version.go
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// InstanceVersion The sqlserver version used for the instance.
|
||||
type InstanceVersion string
|
||||
|
||||
// List of instance.version
|
||||
const (
|
||||
INSTANCEVERSION__2022 InstanceVersion = "2022"
|
||||
)
|
||||
|
||||
// All allowed values of InstanceVersion enum
|
||||
var AllowedInstanceVersionEnumValues = []InstanceVersion{
|
||||
"2022",
|
||||
}
|
||||
|
||||
func (v *InstanceVersion) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := InstanceVersion(value)
|
||||
for _, existing := range AllowedInstanceVersionEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid InstanceVersion", value)
|
||||
}
|
||||
|
||||
// NewInstanceVersionFromValue returns a pointer to a valid InstanceVersion
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewInstanceVersionFromValue(v string) (*InstanceVersion, error) {
|
||||
ev := InstanceVersion(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for InstanceVersion: valid values are %v", v, AllowedInstanceVersionEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v InstanceVersion) IsValid() bool {
|
||||
for _, existing := range AllowedInstanceVersionEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to instance.version value
|
||||
func (v InstanceVersion) Ptr() *InstanceVersion {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableInstanceVersion struct {
|
||||
value *InstanceVersion
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceVersion) Get() *InstanceVersion {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceVersion) Set(val *InstanceVersion) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceVersion) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceVersion) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceVersion(val *InstanceVersion) *NullableInstanceVersion {
|
||||
return &NullableInstanceVersion{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceVersion) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceVersion) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
113
pkg/sqlserverflexalpha/model_instance_version_opt.go
Normal file
113
pkg/sqlserverflexalpha/model_instance_version_opt.go
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
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"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// InstanceVersionOpt the model 'InstanceVersionOpt'
|
||||
type InstanceVersionOpt string
|
||||
|
||||
// List of instance.version.opt
|
||||
const (
|
||||
INSTANCEVERSIONOPT__2022 InstanceVersionOpt = "2022"
|
||||
)
|
||||
|
||||
// All allowed values of InstanceVersionOpt enum
|
||||
var AllowedInstanceVersionOptEnumValues = []InstanceVersionOpt{
|
||||
"2022",
|
||||
}
|
||||
|
||||
func (v *InstanceVersionOpt) UnmarshalJSON(src []byte) error {
|
||||
var value string
|
||||
err := json.Unmarshal(src, &value)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Allow unmarshalling zero value for testing purposes
|
||||
var zeroValue string
|
||||
if value == zeroValue {
|
||||
return nil
|
||||
}
|
||||
enumTypeValue := InstanceVersionOpt(value)
|
||||
for _, existing := range AllowedInstanceVersionOptEnumValues {
|
||||
if existing == enumTypeValue {
|
||||
*v = enumTypeValue
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
return fmt.Errorf("%+v is not a valid InstanceVersionOpt", value)
|
||||
}
|
||||
|
||||
// NewInstanceVersionOptFromValue returns a pointer to a valid InstanceVersionOpt
|
||||
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||
func NewInstanceVersionOptFromValue(v string) (*InstanceVersionOpt, error) {
|
||||
ev := InstanceVersionOpt(v)
|
||||
if ev.IsValid() {
|
||||
return &ev, nil
|
||||
} else {
|
||||
return nil, fmt.Errorf("invalid value '%v' for InstanceVersionOpt: valid values are %v", v, AllowedInstanceVersionOptEnumValues)
|
||||
}
|
||||
}
|
||||
|
||||
// IsValid return true if the value is valid for the enum, false otherwise
|
||||
func (v InstanceVersionOpt) IsValid() bool {
|
||||
for _, existing := range AllowedInstanceVersionOptEnumValues {
|
||||
if existing == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// Ptr returns reference to instance.version.opt value
|
||||
func (v InstanceVersionOpt) Ptr() *InstanceVersionOpt {
|
||||
return &v
|
||||
}
|
||||
|
||||
type NullableInstanceVersionOpt struct {
|
||||
value *InstanceVersionOpt
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableInstanceVersionOpt) Get() *InstanceVersionOpt {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableInstanceVersionOpt) Set(val *InstanceVersionOpt) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableInstanceVersionOpt) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableInstanceVersionOpt) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableInstanceVersionOpt(val *InstanceVersionOpt) *NullableInstanceVersionOpt {
|
||||
return &NullableInstanceVersionOpt{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableInstanceVersionOpt) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableInstanceVersionOpt) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_instance_version_opt_test.go
Normal file
11
pkg/sqlserverflexalpha/model_instance_version_opt_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
11
pkg/sqlserverflexalpha/model_instance_version_test.go
Normal file
11
pkg/sqlserverflexalpha/model_instance_version_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
436
pkg/sqlserverflexalpha/model_list_backup.go
Normal file
436
pkg/sqlserverflexalpha/model_list_backup.go
Normal file
|
|
@ -0,0 +1,436 @@
|
|||
/*
|
||||
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 ListBackup type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListBackup{}
|
||||
|
||||
/*
|
||||
types and functions for completionTime
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type ListBackupGetCompletionTimeAttributeType = any
|
||||
type ListBackupGetCompletionTimeArgType = any
|
||||
type ListBackupGetCompletionTimeRetType = any
|
||||
|
||||
func getListBackupGetCompletionTimeAttributeTypeOk(arg ListBackupGetCompletionTimeAttributeType) (ret ListBackupGetCompletionTimeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetCompletionTimeAttributeType(arg *ListBackupGetCompletionTimeAttributeType, val ListBackupGetCompletionTimeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// isModel
|
||||
type ListBackupGetCompletionTimeAttributeType = *string
|
||||
type ListBackupGetCompletionTimeArgType = string
|
||||
type ListBackupGetCompletionTimeRetType = string
|
||||
|
||||
func getListBackupGetCompletionTimeAttributeTypeOk(arg ListBackupGetCompletionTimeAttributeType) (ret ListBackupGetCompletionTimeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetCompletionTimeAttributeType(arg *ListBackupGetCompletionTimeAttributeType, val ListBackupGetCompletionTimeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type ListBackupGetIdAttributeType = any
|
||||
type ListBackupGetIdArgType = any
|
||||
type ListBackupGetIdRetType = any
|
||||
|
||||
func getListBackupGetIdAttributeTypeOk(arg ListBackupGetIdAttributeType) (ret ListBackupGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetIdAttributeType(arg *ListBackupGetIdAttributeType, val ListBackupGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// isModel
|
||||
type ListBackupGetIdAttributeType = *int64
|
||||
type ListBackupGetIdArgType = int64
|
||||
type ListBackupGetIdRetType = int64
|
||||
|
||||
func getListBackupGetIdAttributeTypeOk(arg ListBackupGetIdAttributeType) (ret ListBackupGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetIdAttributeType(arg *ListBackupGetIdAttributeType, val ListBackupGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type ListBackupGetNameAttributeType = any
|
||||
type ListBackupGetNameArgType = any
|
||||
type ListBackupGetNameRetType = any
|
||||
|
||||
func getListBackupGetNameAttributeTypeOk(arg ListBackupGetNameAttributeType) (ret ListBackupGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetNameAttributeType(arg *ListBackupGetNameAttributeType, val ListBackupGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// isModel
|
||||
type ListBackupGetNameAttributeType = *string
|
||||
type ListBackupGetNameArgType = string
|
||||
type ListBackupGetNameRetType = string
|
||||
|
||||
func getListBackupGetNameAttributeTypeOk(arg ListBackupGetNameAttributeType) (ret ListBackupGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetNameAttributeType(arg *ListBackupGetNameAttributeType, val ListBackupGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for retainedUntil
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type ListBackupGetRetainedUntilAttributeType = any
|
||||
type ListBackupGetRetainedUntilArgType = any
|
||||
type ListBackupGetRetainedUntilRetType = any
|
||||
|
||||
func getListBackupGetRetainedUntilAttributeTypeOk(arg ListBackupGetRetainedUntilAttributeType) (ret ListBackupGetRetainedUntilRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetRetainedUntilAttributeType(arg *ListBackupGetRetainedUntilAttributeType, val ListBackupGetRetainedUntilRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// isModel
|
||||
type ListBackupGetRetainedUntilAttributeType = *string
|
||||
type ListBackupGetRetainedUntilArgType = string
|
||||
type ListBackupGetRetainedUntilRetType = string
|
||||
|
||||
func getListBackupGetRetainedUntilAttributeTypeOk(arg ListBackupGetRetainedUntilAttributeType) (ret ListBackupGetRetainedUntilRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetRetainedUntilAttributeType(arg *ListBackupGetRetainedUntilAttributeType, val ListBackupGetRetainedUntilRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type ListBackupGetSizeAttributeType = any
|
||||
type ListBackupGetSizeArgType = any
|
||||
type ListBackupGetSizeRetType = any
|
||||
|
||||
func getListBackupGetSizeAttributeTypeOk(arg ListBackupGetSizeAttributeType) (ret ListBackupGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetSizeAttributeType(arg *ListBackupGetSizeAttributeType, val ListBackupGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// isModel
|
||||
type ListBackupGetSizeAttributeType = *int64
|
||||
type ListBackupGetSizeArgType = int64
|
||||
type ListBackupGetSizeRetType = int64
|
||||
|
||||
func getListBackupGetSizeAttributeTypeOk(arg ListBackupGetSizeAttributeType) (ret ListBackupGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetSizeAttributeType(arg *ListBackupGetSizeAttributeType, val ListBackupGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isAny
|
||||
type ListBackupGetTypeAttributeType = any
|
||||
type ListBackupGetTypeArgType = any
|
||||
type ListBackupGetTypeRetType = any
|
||||
|
||||
func getListBackupGetTypeAttributeTypeOk(arg ListBackupGetTypeAttributeType) (ret ListBackupGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetTypeAttributeType(arg *ListBackupGetTypeAttributeType, val ListBackupGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// isModel
|
||||
type ListBackupGetTypeAttributeType = *string
|
||||
type ListBackupGetTypeArgType = string
|
||||
type ListBackupGetTypeRetType = string
|
||||
|
||||
func getListBackupGetTypeAttributeTypeOk(arg ListBackupGetTypeAttributeType) (ret ListBackupGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupGetTypeAttributeType(arg *ListBackupGetTypeAttributeType, val ListBackupGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListBackup struct for ListBackup
|
||||
type ListBackup struct {
|
||||
// REQUIRED
|
||||
CompletionTime ListBackupGetCompletionTimeAttributeType `json:"completionTime" required:"true"`
|
||||
// REQUIRED
|
||||
Id ListBackupGetIdAttributeType `json:"id" required:"true"`
|
||||
// REQUIRED
|
||||
Name ListBackupGetNameAttributeType `json:"name" required:"true"`
|
||||
// REQUIRED
|
||||
RetainedUntil ListBackupGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"`
|
||||
// REQUIRED
|
||||
Size ListBackupGetSizeAttributeType `json:"size" required:"true"`
|
||||
// REQUIRED
|
||||
Type ListBackupGetTypeAttributeType `json:"type" required:"true"`
|
||||
}
|
||||
|
||||
type _ListBackup ListBackup
|
||||
|
||||
// NewListBackup instantiates a new ListBackup 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 NewListBackup(completionTime ListBackupGetCompletionTimeArgType, id ListBackupGetIdArgType, name ListBackupGetNameArgType, retainedUntil ListBackupGetRetainedUntilArgType, size ListBackupGetSizeArgType, types ListBackupGetTypeArgType) *ListBackup {
|
||||
this := ListBackup{}
|
||||
setListBackupGetCompletionTimeAttributeType(&this.CompletionTime, completionTime)
|
||||
setListBackupGetIdAttributeType(&this.Id, id)
|
||||
setListBackupGetNameAttributeType(&this.Name, name)
|
||||
setListBackupGetRetainedUntilAttributeType(&this.RetainedUntil, retainedUntil)
|
||||
setListBackupGetSizeAttributeType(&this.Size, size)
|
||||
setListBackupGetTypeAttributeType(&this.Type, types)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListBackupWithDefaults instantiates a new ListBackup 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 NewListBackupWithDefaults() *ListBackup {
|
||||
this := ListBackup{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCompletionTime returns the CompletionTime field value
|
||||
func (o *ListBackup) GetCompletionTime() (ret ListBackupGetCompletionTimeRetType) {
|
||||
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 *ListBackup) GetCompletionTimeOk() (ret ListBackupGetCompletionTimeRetType, ok bool) {
|
||||
return getListBackupGetCompletionTimeAttributeTypeOk(o.CompletionTime)
|
||||
}
|
||||
|
||||
// SetCompletionTime sets field value
|
||||
func (o *ListBackup) SetCompletionTime(v ListBackupGetCompletionTimeRetType) {
|
||||
setListBackupGetCompletionTimeAttributeType(&o.CompletionTime, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ListBackup) GetId() (ret ListBackupGetIdRetType) {
|
||||
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 *ListBackup) GetIdOk() (ret ListBackupGetIdRetType, ok bool) {
|
||||
return getListBackupGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ListBackup) SetId(v ListBackupGetIdRetType) {
|
||||
setListBackupGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *ListBackup) GetName() (ret ListBackupGetNameRetType) {
|
||||
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 *ListBackup) GetNameOk() (ret ListBackupGetNameRetType, ok bool) {
|
||||
return getListBackupGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *ListBackup) SetName(v ListBackupGetNameRetType) {
|
||||
setListBackupGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetRetainedUntil returns the RetainedUntil field value
|
||||
func (o *ListBackup) GetRetainedUntil() (ret ListBackupGetRetainedUntilRetType) {
|
||||
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 *ListBackup) GetRetainedUntilOk() (ret ListBackupGetRetainedUntilRetType, ok bool) {
|
||||
return getListBackupGetRetainedUntilAttributeTypeOk(o.RetainedUntil)
|
||||
}
|
||||
|
||||
// SetRetainedUntil sets field value
|
||||
func (o *ListBackup) SetRetainedUntil(v ListBackupGetRetainedUntilRetType) {
|
||||
setListBackupGetRetainedUntilAttributeType(&o.RetainedUntil, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value
|
||||
func (o *ListBackup) GetSize() (ret ListBackupGetSizeRetType) {
|
||||
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 *ListBackup) GetSizeOk() (ret ListBackupGetSizeRetType, ok bool) {
|
||||
return getListBackupGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// SetSize sets field value
|
||||
func (o *ListBackup) SetSize(v ListBackupGetSizeRetType) {
|
||||
setListBackupGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *ListBackup) GetType() (ret ListBackupGetTypeRetType) {
|
||||
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 *ListBackup) GetTypeOk() (ret ListBackupGetTypeRetType, ok bool) {
|
||||
return getListBackupGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *ListBackup) SetType(v ListBackupGetTypeRetType) {
|
||||
setListBackupGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o ListBackup) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListBackupGetCompletionTimeAttributeTypeOk(o.CompletionTime); ok {
|
||||
toSerialize["CompletionTime"] = val
|
||||
}
|
||||
if val, ok := getListBackupGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getListBackupGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getListBackupGetRetainedUntilAttributeTypeOk(o.RetainedUntil); ok {
|
||||
toSerialize["RetainedUntil"] = val
|
||||
}
|
||||
if val, ok := getListBackupGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getListBackupGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListBackup struct {
|
||||
value *ListBackup
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListBackup) Get() *ListBackup {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListBackup) Set(val *ListBackup) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListBackup) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListBackup) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListBackup(val *ListBackup) *NullableListBackup {
|
||||
return &NullableListBackup{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListBackup) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListBackup) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
169
pkg/sqlserverflexalpha/model_list_backup_response.go
Normal file
169
pkg/sqlserverflexalpha/model_list_backup_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
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 ListBackupResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListBackupResponse{}
|
||||
|
||||
/*
|
||||
types and functions for backups
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListBackupResponseGetBackupsAttributeType = *[]ListBackupsResponse
|
||||
type ListBackupResponseGetBackupsArgType = []ListBackupsResponse
|
||||
type ListBackupResponseGetBackupsRetType = []ListBackupsResponse
|
||||
|
||||
func getListBackupResponseGetBackupsAttributeTypeOk(arg ListBackupResponseGetBackupsAttributeType) (ret ListBackupResponseGetBackupsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupResponseGetBackupsAttributeType(arg *ListBackupResponseGetBackupsAttributeType, val ListBackupResponseGetBackupsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for pagination
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ListBackupResponseGetPaginationAttributeType = *Pagination
|
||||
type ListBackupResponseGetPaginationArgType = Pagination
|
||||
type ListBackupResponseGetPaginationRetType = Pagination
|
||||
|
||||
func getListBackupResponseGetPaginationAttributeTypeOk(arg ListBackupResponseGetPaginationAttributeType) (ret ListBackupResponseGetPaginationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListBackupResponseGetPaginationAttributeType(arg *ListBackupResponseGetPaginationAttributeType, val ListBackupResponseGetPaginationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListBackupResponse struct for ListBackupResponse
|
||||
type ListBackupResponse struct {
|
||||
// The list containing the information about the backups.
|
||||
// REQUIRED
|
||||
Backups ListBackupResponseGetBackupsAttributeType `json:"backups" required:"true"`
|
||||
// REQUIRED
|
||||
Pagination ListBackupResponseGetPaginationAttributeType `json:"pagination" required:"true"`
|
||||
}
|
||||
|
||||
type _ListBackupResponse ListBackupResponse
|
||||
|
||||
// NewListBackupResponse instantiates a new ListBackupResponse 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 NewListBackupResponse(backups ListBackupResponseGetBackupsArgType, pagination ListBackupResponseGetPaginationArgType) *ListBackupResponse {
|
||||
this := ListBackupResponse{}
|
||||
setListBackupResponseGetBackupsAttributeType(&this.Backups, backups)
|
||||
setListBackupResponseGetPaginationAttributeType(&this.Pagination, pagination)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListBackupResponseWithDefaults instantiates a new ListBackupResponse 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 NewListBackupResponseWithDefaults() *ListBackupResponse {
|
||||
this := ListBackupResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetBackups returns the Backups field value
|
||||
func (o *ListBackupResponse) GetBackups() (ret ListBackupResponseGetBackupsRetType) {
|
||||
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 *ListBackupResponse) GetBackupsOk() (ret ListBackupResponseGetBackupsRetType, ok bool) {
|
||||
return getListBackupResponseGetBackupsAttributeTypeOk(o.Backups)
|
||||
}
|
||||
|
||||
// SetBackups sets field value
|
||||
func (o *ListBackupResponse) SetBackups(v ListBackupResponseGetBackupsRetType) {
|
||||
setListBackupResponseGetBackupsAttributeType(&o.Backups, v)
|
||||
}
|
||||
|
||||
// GetPagination returns the Pagination field value
|
||||
func (o *ListBackupResponse) GetPagination() (ret ListBackupResponseGetPaginationRetType) {
|
||||
ret, _ = o.GetPaginationOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPaginationOk returns a tuple with the Pagination field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListBackupResponse) GetPaginationOk() (ret ListBackupResponseGetPaginationRetType, ok bool) {
|
||||
return getListBackupResponseGetPaginationAttributeTypeOk(o.Pagination)
|
||||
}
|
||||
|
||||
// SetPagination sets field value
|
||||
func (o *ListBackupResponse) SetPagination(v ListBackupResponseGetPaginationRetType) {
|
||||
setListBackupResponseGetPaginationAttributeType(&o.Pagination, v)
|
||||
}
|
||||
|
||||
func (o ListBackupResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListBackupResponseGetBackupsAttributeTypeOk(o.Backups); ok {
|
||||
toSerialize["Backups"] = val
|
||||
}
|
||||
if val, ok := getListBackupResponseGetPaginationAttributeTypeOk(o.Pagination); ok {
|
||||
toSerialize["Pagination"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListBackupResponse struct {
|
||||
value *ListBackupResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListBackupResponse) Get() *ListBackupResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListBackupResponse) Set(val *ListBackupResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListBackupResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListBackupResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListBackupResponse(val *ListBackupResponse) *NullableListBackupResponse {
|
||||
return &NullableListBackupResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListBackupResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListBackupResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_backup_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_backup_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
11
pkg/sqlserverflexalpha/model_list_backup_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_backup_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
171
pkg/sqlserverflexalpha/model_list_backups_response.go
Normal file
171
pkg/sqlserverflexalpha/model_list_backups_response.go
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
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)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_backups_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_backups_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_list_compatibility_response.go
Normal file
126
pkg/sqlserverflexalpha/model_list_compatibility_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 ListCompatibilityResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListCompatibilityResponse{}
|
||||
|
||||
/*
|
||||
types and functions for compatibilities
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListCompatibilityResponseGetCompatibilitiesAttributeType = *[]DatabaseGetcompatibility
|
||||
type ListCompatibilityResponseGetCompatibilitiesArgType = []DatabaseGetcompatibility
|
||||
type ListCompatibilityResponseGetCompatibilitiesRetType = []DatabaseGetcompatibility
|
||||
|
||||
func getListCompatibilityResponseGetCompatibilitiesAttributeTypeOk(arg ListCompatibilityResponseGetCompatibilitiesAttributeType) (ret ListCompatibilityResponseGetCompatibilitiesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListCompatibilityResponseGetCompatibilitiesAttributeType(arg *ListCompatibilityResponseGetCompatibilitiesAttributeType, val ListCompatibilityResponseGetCompatibilitiesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListCompatibilityResponse struct for ListCompatibilityResponse
|
||||
type ListCompatibilityResponse struct {
|
||||
// List of compatibilities available for a d
|
||||
// REQUIRED
|
||||
Compatibilities ListCompatibilityResponseGetCompatibilitiesAttributeType `json:"compatibilities" required:"true"`
|
||||
}
|
||||
|
||||
type _ListCompatibilityResponse ListCompatibilityResponse
|
||||
|
||||
// NewListCompatibilityResponse instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponse(compatibilities ListCompatibilityResponseGetCompatibilitiesArgType) *ListCompatibilityResponse {
|
||||
this := ListCompatibilityResponse{}
|
||||
setListCompatibilityResponseGetCompatibilitiesAttributeType(&this.Compatibilities, compatibilities)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListCompatibilityResponseWithDefaults instantiates a new ListCompatibilityResponse 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 NewListCompatibilityResponseWithDefaults() *ListCompatibilityResponse {
|
||||
this := ListCompatibilityResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCompatibilities returns the Compatibilities field value
|
||||
func (o *ListCompatibilityResponse) GetCompatibilities() (ret ListCompatibilityResponseGetCompatibilitiesRetType) {
|
||||
ret, _ = o.GetCompatibilitiesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCompatibilitiesOk returns a tuple with the Compatibilities field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListCompatibilityResponse) GetCompatibilitiesOk() (ret ListCompatibilityResponseGetCompatibilitiesRetType, ok bool) {
|
||||
return getListCompatibilityResponseGetCompatibilitiesAttributeTypeOk(o.Compatibilities)
|
||||
}
|
||||
|
||||
// SetCompatibilities sets field value
|
||||
func (o *ListCompatibilityResponse) SetCompatibilities(v ListCompatibilityResponseGetCompatibilitiesRetType) {
|
||||
setListCompatibilityResponseGetCompatibilitiesAttributeType(&o.Compatibilities, v)
|
||||
}
|
||||
|
||||
func (o ListCompatibilityResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListCompatibilityResponseGetCompatibilitiesAttributeTypeOk(o.Compatibilities); ok {
|
||||
toSerialize["Compatibilities"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListCompatibilityResponse struct {
|
||||
value *ListCompatibilityResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListCompatibilityResponse) Get() *ListCompatibilityResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListCompatibilityResponse) Set(val *ListCompatibilityResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListCompatibilityResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListCompatibilityResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListCompatibilityResponse(val *ListCompatibilityResponse) *NullableListCompatibilityResponse {
|
||||
return &NullableListCompatibilityResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListCompatibilityResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListCompatibilityResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 ListCurrentRunningRestoreJobs type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListCurrentRunningRestoreJobs{}
|
||||
|
||||
/*
|
||||
types and functions for runningRestores
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType = *[]BackupRunningRestore
|
||||
type ListCurrentRunningRestoreJobsGetRunningRestoresArgType = []BackupRunningRestore
|
||||
type ListCurrentRunningRestoreJobsGetRunningRestoresRetType = []BackupRunningRestore
|
||||
|
||||
func getListCurrentRunningRestoreJobsGetRunningRestoresAttributeTypeOk(arg ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType) (ret ListCurrentRunningRestoreJobsGetRunningRestoresRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListCurrentRunningRestoreJobsGetRunningRestoresAttributeType(arg *ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType, val ListCurrentRunningRestoreJobsGetRunningRestoresRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListCurrentRunningRestoreJobs struct for ListCurrentRunningRestoreJobs
|
||||
type ListCurrentRunningRestoreJobs struct {
|
||||
// List of the currently running Restore jobs
|
||||
// REQUIRED
|
||||
RunningRestores ListCurrentRunningRestoreJobsGetRunningRestoresAttributeType `json:"runningRestores" required:"true"`
|
||||
}
|
||||
|
||||
type _ListCurrentRunningRestoreJobs ListCurrentRunningRestoreJobs
|
||||
|
||||
// NewListCurrentRunningRestoreJobs instantiates a new ListCurrentRunningRestoreJobs 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 NewListCurrentRunningRestoreJobs(runningRestores ListCurrentRunningRestoreJobsGetRunningRestoresArgType) *ListCurrentRunningRestoreJobs {
|
||||
this := ListCurrentRunningRestoreJobs{}
|
||||
setListCurrentRunningRestoreJobsGetRunningRestoresAttributeType(&this.RunningRestores, runningRestores)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListCurrentRunningRestoreJobsWithDefaults instantiates a new ListCurrentRunningRestoreJobs 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 NewListCurrentRunningRestoreJobsWithDefaults() *ListCurrentRunningRestoreJobs {
|
||||
this := ListCurrentRunningRestoreJobs{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetRunningRestores returns the RunningRestores field value
|
||||
func (o *ListCurrentRunningRestoreJobs) GetRunningRestores() (ret ListCurrentRunningRestoreJobsGetRunningRestoresRetType) {
|
||||
ret, _ = o.GetRunningRestoresOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetRunningRestoresOk returns a tuple with the RunningRestores field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListCurrentRunningRestoreJobs) GetRunningRestoresOk() (ret ListCurrentRunningRestoreJobsGetRunningRestoresRetType, ok bool) {
|
||||
return getListCurrentRunningRestoreJobsGetRunningRestoresAttributeTypeOk(o.RunningRestores)
|
||||
}
|
||||
|
||||
// SetRunningRestores sets field value
|
||||
func (o *ListCurrentRunningRestoreJobs) SetRunningRestores(v ListCurrentRunningRestoreJobsGetRunningRestoresRetType) {
|
||||
setListCurrentRunningRestoreJobsGetRunningRestoresAttributeType(&o.RunningRestores, v)
|
||||
}
|
||||
|
||||
func (o ListCurrentRunningRestoreJobs) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListCurrentRunningRestoreJobsGetRunningRestoresAttributeTypeOk(o.RunningRestores); ok {
|
||||
toSerialize["RunningRestores"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListCurrentRunningRestoreJobs struct {
|
||||
value *ListCurrentRunningRestoreJobs
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListCurrentRunningRestoreJobs) Get() *ListCurrentRunningRestoreJobs {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListCurrentRunningRestoreJobs) Set(val *ListCurrentRunningRestoreJobs) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListCurrentRunningRestoreJobs) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListCurrentRunningRestoreJobs) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListCurrentRunningRestoreJobs(val *ListCurrentRunningRestoreJobs) *NullableListCurrentRunningRestoreJobs {
|
||||
return &NullableListCurrentRunningRestoreJobs{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListCurrentRunningRestoreJobs) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListCurrentRunningRestoreJobs) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
261
pkg/sqlserverflexalpha/model_list_database.go
Normal file
261
pkg/sqlserverflexalpha/model_list_database.go
Normal file
|
|
@ -0,0 +1,261 @@
|
|||
/*
|
||||
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 ListDatabase type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListDatabase{}
|
||||
|
||||
/*
|
||||
types and functions for created
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListDatabaseGetCreatedAttributeType = *string
|
||||
|
||||
func getListDatabaseGetCreatedAttributeTypeOk(arg ListDatabaseGetCreatedAttributeType) (ret ListDatabaseGetCreatedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListDatabaseGetCreatedAttributeType(arg *ListDatabaseGetCreatedAttributeType, val ListDatabaseGetCreatedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListDatabaseGetCreatedArgType = string
|
||||
type ListDatabaseGetCreatedRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ListDatabaseGetIdAttributeType = *int64
|
||||
type ListDatabaseGetIdArgType = int64
|
||||
type ListDatabaseGetIdRetType = int64
|
||||
|
||||
func getListDatabaseGetIdAttributeTypeOk(arg ListDatabaseGetIdAttributeType) (ret ListDatabaseGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListDatabaseGetIdAttributeType(arg *ListDatabaseGetIdAttributeType, val ListDatabaseGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListDatabaseGetNameAttributeType = *string
|
||||
|
||||
func getListDatabaseGetNameAttributeTypeOk(arg ListDatabaseGetNameAttributeType) (ret ListDatabaseGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListDatabaseGetNameAttributeType(arg *ListDatabaseGetNameAttributeType, val ListDatabaseGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListDatabaseGetNameArgType = string
|
||||
type ListDatabaseGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for owner
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListDatabaseGetOwnerAttributeType = *string
|
||||
|
||||
func getListDatabaseGetOwnerAttributeTypeOk(arg ListDatabaseGetOwnerAttributeType) (ret ListDatabaseGetOwnerRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListDatabaseGetOwnerAttributeType(arg *ListDatabaseGetOwnerAttributeType, val ListDatabaseGetOwnerRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListDatabaseGetOwnerArgType = string
|
||||
type ListDatabaseGetOwnerRetType = string
|
||||
|
||||
// ListDatabase struct for ListDatabase
|
||||
type ListDatabase struct {
|
||||
// The date when the database was created in RFC3339 format.
|
||||
// REQUIRED
|
||||
Created ListDatabaseGetCreatedAttributeType `json:"created" required:"true"`
|
||||
// The id of the database.
|
||||
// REQUIRED
|
||||
Id ListDatabaseGetIdAttributeType `json:"id" required:"true"`
|
||||
// The name of the database.
|
||||
// REQUIRED
|
||||
Name ListDatabaseGetNameAttributeType `json:"name" required:"true"`
|
||||
// The owner of the database.
|
||||
// REQUIRED
|
||||
Owner ListDatabaseGetOwnerAttributeType `json:"owner" required:"true"`
|
||||
}
|
||||
|
||||
type _ListDatabase ListDatabase
|
||||
|
||||
// NewListDatabase instantiates a new ListDatabase 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 NewListDatabase(created ListDatabaseGetCreatedArgType, id ListDatabaseGetIdArgType, name ListDatabaseGetNameArgType, owner ListDatabaseGetOwnerArgType) *ListDatabase {
|
||||
this := ListDatabase{}
|
||||
setListDatabaseGetCreatedAttributeType(&this.Created, created)
|
||||
setListDatabaseGetIdAttributeType(&this.Id, id)
|
||||
setListDatabaseGetNameAttributeType(&this.Name, name)
|
||||
setListDatabaseGetOwnerAttributeType(&this.Owner, owner)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListDatabaseWithDefaults instantiates a new ListDatabase 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 NewListDatabaseWithDefaults() *ListDatabase {
|
||||
this := ListDatabase{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreated returns the Created field value
|
||||
func (o *ListDatabase) GetCreated() (ret ListDatabaseGetCreatedRetType) {
|
||||
ret, _ = o.GetCreatedOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCreatedOk returns a tuple with the Created field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListDatabase) GetCreatedOk() (ret ListDatabaseGetCreatedRetType, ok bool) {
|
||||
return getListDatabaseGetCreatedAttributeTypeOk(o.Created)
|
||||
}
|
||||
|
||||
// SetCreated sets field value
|
||||
func (o *ListDatabase) SetCreated(v ListDatabaseGetCreatedRetType) {
|
||||
setListDatabaseGetCreatedAttributeType(&o.Created, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ListDatabase) GetId() (ret ListDatabaseGetIdRetType) {
|
||||
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 *ListDatabase) GetIdOk() (ret ListDatabaseGetIdRetType, ok bool) {
|
||||
return getListDatabaseGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ListDatabase) SetId(v ListDatabaseGetIdRetType) {
|
||||
setListDatabaseGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *ListDatabase) GetName() (ret ListDatabaseGetNameRetType) {
|
||||
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 *ListDatabase) GetNameOk() (ret ListDatabaseGetNameRetType, ok bool) {
|
||||
return getListDatabaseGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *ListDatabase) SetName(v ListDatabaseGetNameRetType) {
|
||||
setListDatabaseGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetOwner returns the Owner field value
|
||||
func (o *ListDatabase) GetOwner() (ret ListDatabaseGetOwnerRetType) {
|
||||
ret, _ = o.GetOwnerOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetOwnerOk returns a tuple with the Owner field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListDatabase) GetOwnerOk() (ret ListDatabaseGetOwnerRetType, ok bool) {
|
||||
return getListDatabaseGetOwnerAttributeTypeOk(o.Owner)
|
||||
}
|
||||
|
||||
// SetOwner sets field value
|
||||
func (o *ListDatabase) SetOwner(v ListDatabaseGetOwnerRetType) {
|
||||
setListDatabaseGetOwnerAttributeType(&o.Owner, v)
|
||||
}
|
||||
|
||||
func (o ListDatabase) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListDatabaseGetCreatedAttributeTypeOk(o.Created); ok {
|
||||
toSerialize["Created"] = val
|
||||
}
|
||||
if val, ok := getListDatabaseGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getListDatabaseGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getListDatabaseGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||
toSerialize["Owner"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListDatabase struct {
|
||||
value *ListDatabase
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListDatabase) Get() *ListDatabase {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListDatabase) Set(val *ListDatabase) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListDatabase) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListDatabase) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListDatabase(val *ListDatabase) *NullableListDatabase {
|
||||
return &NullableListDatabase{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListDatabase) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListDatabase) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_database_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_database_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
169
pkg/sqlserverflexalpha/model_list_databases_response.go
Normal file
169
pkg/sqlserverflexalpha/model_list_databases_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
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 ListDatabasesResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListDatabasesResponse{}
|
||||
|
||||
/*
|
||||
types and functions for databases
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListDatabasesResponseGetDatabasesAttributeType = *[]ListDatabase
|
||||
type ListDatabasesResponseGetDatabasesArgType = []ListDatabase
|
||||
type ListDatabasesResponseGetDatabasesRetType = []ListDatabase
|
||||
|
||||
func getListDatabasesResponseGetDatabasesAttributeTypeOk(arg ListDatabasesResponseGetDatabasesAttributeType) (ret ListDatabasesResponseGetDatabasesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListDatabasesResponseGetDatabasesAttributeType(arg *ListDatabasesResponseGetDatabasesAttributeType, val ListDatabasesResponseGetDatabasesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for pagination
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ListDatabasesResponseGetPaginationAttributeType = *Pagination
|
||||
type ListDatabasesResponseGetPaginationArgType = Pagination
|
||||
type ListDatabasesResponseGetPaginationRetType = Pagination
|
||||
|
||||
func getListDatabasesResponseGetPaginationAttributeTypeOk(arg ListDatabasesResponseGetPaginationAttributeType) (ret ListDatabasesResponseGetPaginationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListDatabasesResponseGetPaginationAttributeType(arg *ListDatabasesResponseGetPaginationAttributeType, val ListDatabasesResponseGetPaginationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListDatabasesResponse struct for ListDatabasesResponse
|
||||
type ListDatabasesResponse struct {
|
||||
// A list containing all databases for the instance.
|
||||
// REQUIRED
|
||||
Databases ListDatabasesResponseGetDatabasesAttributeType `json:"databases" required:"true"`
|
||||
// REQUIRED
|
||||
Pagination ListDatabasesResponseGetPaginationAttributeType `json:"pagination" required:"true"`
|
||||
}
|
||||
|
||||
type _ListDatabasesResponse ListDatabasesResponse
|
||||
|
||||
// NewListDatabasesResponse instantiates a new ListDatabasesResponse 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 NewListDatabasesResponse(databases ListDatabasesResponseGetDatabasesArgType, pagination ListDatabasesResponseGetPaginationArgType) *ListDatabasesResponse {
|
||||
this := ListDatabasesResponse{}
|
||||
setListDatabasesResponseGetDatabasesAttributeType(&this.Databases, databases)
|
||||
setListDatabasesResponseGetPaginationAttributeType(&this.Pagination, pagination)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListDatabasesResponseWithDefaults instantiates a new ListDatabasesResponse 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 NewListDatabasesResponseWithDefaults() *ListDatabasesResponse {
|
||||
this := ListDatabasesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDatabases returns the Databases field value
|
||||
func (o *ListDatabasesResponse) GetDatabases() (ret ListDatabasesResponseGetDatabasesRetType) {
|
||||
ret, _ = o.GetDatabasesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDatabasesOk returns a tuple with the Databases field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListDatabasesResponse) GetDatabasesOk() (ret ListDatabasesResponseGetDatabasesRetType, ok bool) {
|
||||
return getListDatabasesResponseGetDatabasesAttributeTypeOk(o.Databases)
|
||||
}
|
||||
|
||||
// SetDatabases sets field value
|
||||
func (o *ListDatabasesResponse) SetDatabases(v ListDatabasesResponseGetDatabasesRetType) {
|
||||
setListDatabasesResponseGetDatabasesAttributeType(&o.Databases, v)
|
||||
}
|
||||
|
||||
// GetPagination returns the Pagination field value
|
||||
func (o *ListDatabasesResponse) GetPagination() (ret ListDatabasesResponseGetPaginationRetType) {
|
||||
ret, _ = o.GetPaginationOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPaginationOk returns a tuple with the Pagination field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListDatabasesResponse) GetPaginationOk() (ret ListDatabasesResponseGetPaginationRetType, ok bool) {
|
||||
return getListDatabasesResponseGetPaginationAttributeTypeOk(o.Pagination)
|
||||
}
|
||||
|
||||
// SetPagination sets field value
|
||||
func (o *ListDatabasesResponse) SetPagination(v ListDatabasesResponseGetPaginationRetType) {
|
||||
setListDatabasesResponseGetPaginationAttributeType(&o.Pagination, v)
|
||||
}
|
||||
|
||||
func (o ListDatabasesResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListDatabasesResponseGetDatabasesAttributeTypeOk(o.Databases); ok {
|
||||
toSerialize["Databases"] = val
|
||||
}
|
||||
if val, ok := getListDatabasesResponseGetPaginationAttributeTypeOk(o.Pagination); ok {
|
||||
toSerialize["Pagination"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListDatabasesResponse struct {
|
||||
value *ListDatabasesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListDatabasesResponse) Get() *ListDatabasesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListDatabasesResponse) Set(val *ListDatabasesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListDatabasesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListDatabasesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListDatabasesResponse(val *ListDatabasesResponse) *NullableListDatabasesResponse {
|
||||
return &NullableListDatabasesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListDatabasesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListDatabasesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_databases_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_databases_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
439
pkg/sqlserverflexalpha/model_list_flavors.go
Normal file
439
pkg/sqlserverflexalpha/model_list_flavors.go
Normal file
|
|
@ -0,0 +1,439 @@
|
|||
/*
|
||||
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 ListFlavors type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListFlavors{}
|
||||
|
||||
/*
|
||||
types and functions for cpu
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ListFlavorsGetCpuAttributeType = *int64
|
||||
type ListFlavorsGetCpuArgType = int64
|
||||
type ListFlavorsGetCpuRetType = int64
|
||||
|
||||
func getListFlavorsGetCpuAttributeTypeOk(arg ListFlavorsGetCpuAttributeType) (ret ListFlavorsGetCpuRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetCpuAttributeType(arg *ListFlavorsGetCpuAttributeType, val ListFlavorsGetCpuRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListFlavorsGetDescriptionAttributeType = *string
|
||||
|
||||
func getListFlavorsGetDescriptionAttributeTypeOk(arg ListFlavorsGetDescriptionAttributeType) (ret ListFlavorsGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetDescriptionAttributeType(arg *ListFlavorsGetDescriptionAttributeType, val ListFlavorsGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListFlavorsGetDescriptionArgType = string
|
||||
type ListFlavorsGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListFlavorsGetIdAttributeType = *string
|
||||
|
||||
func getListFlavorsGetIdAttributeTypeOk(arg ListFlavorsGetIdAttributeType) (ret ListFlavorsGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetIdAttributeType(arg *ListFlavorsGetIdAttributeType, val ListFlavorsGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListFlavorsGetIdArgType = string
|
||||
type ListFlavorsGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for maxGB
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type ListFlavorsGetMaxGBAttributeType = *int64
|
||||
type ListFlavorsGetMaxGBArgType = int64
|
||||
type ListFlavorsGetMaxGBRetType = int64
|
||||
|
||||
func getListFlavorsGetMaxGBAttributeTypeOk(arg ListFlavorsGetMaxGBAttributeType) (ret ListFlavorsGetMaxGBRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetMaxGBAttributeType(arg *ListFlavorsGetMaxGBAttributeType, val ListFlavorsGetMaxGBRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for memory
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ListFlavorsGetMemoryAttributeType = *int64
|
||||
type ListFlavorsGetMemoryArgType = int64
|
||||
type ListFlavorsGetMemoryRetType = int64
|
||||
|
||||
func getListFlavorsGetMemoryAttributeTypeOk(arg ListFlavorsGetMemoryAttributeType) (ret ListFlavorsGetMemoryRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetMemoryAttributeType(arg *ListFlavorsGetMemoryAttributeType, val ListFlavorsGetMemoryRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for minGB
|
||||
*/
|
||||
|
||||
// isInteger
|
||||
type ListFlavorsGetMinGBAttributeType = *int64
|
||||
type ListFlavorsGetMinGBArgType = int64
|
||||
type ListFlavorsGetMinGBRetType = int64
|
||||
|
||||
func getListFlavorsGetMinGBAttributeTypeOk(arg ListFlavorsGetMinGBAttributeType) (ret ListFlavorsGetMinGBRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetMinGBAttributeType(arg *ListFlavorsGetMinGBAttributeType, val ListFlavorsGetMinGBRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for nodeType
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListFlavorsGetNodeTypeAttributeType = *string
|
||||
|
||||
func getListFlavorsGetNodeTypeAttributeTypeOk(arg ListFlavorsGetNodeTypeAttributeType) (ret ListFlavorsGetNodeTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetNodeTypeAttributeType(arg *ListFlavorsGetNodeTypeAttributeType, val ListFlavorsGetNodeTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListFlavorsGetNodeTypeArgType = string
|
||||
type ListFlavorsGetNodeTypeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for storageClasses
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListFlavorsGetStorageClassesAttributeType = *[]FlavorStorageClassesStorageClass
|
||||
type ListFlavorsGetStorageClassesArgType = []FlavorStorageClassesStorageClass
|
||||
type ListFlavorsGetStorageClassesRetType = []FlavorStorageClassesStorageClass
|
||||
|
||||
func getListFlavorsGetStorageClassesAttributeTypeOk(arg ListFlavorsGetStorageClassesAttributeType) (ret ListFlavorsGetStorageClassesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListFlavorsGetStorageClassesAttributeType(arg *ListFlavorsGetStorageClassesAttributeType, val ListFlavorsGetStorageClassesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListFlavors The flavor of the instance containing the technical features.
|
||||
type ListFlavors struct {
|
||||
// The cpu count of the instance.
|
||||
// REQUIRED
|
||||
Cpu ListFlavorsGetCpuAttributeType `json:"cpu" required:"true"`
|
||||
// The flavor description.
|
||||
// REQUIRED
|
||||
Description ListFlavorsGetDescriptionAttributeType `json:"description" required:"true"`
|
||||
// The id of the instance flavor.
|
||||
// REQUIRED
|
||||
Id ListFlavorsGetIdAttributeType `json:"id" required:"true"`
|
||||
// maximum storage which can be ordered for the flavor in Gigabyte.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
MaxGB ListFlavorsGetMaxGBAttributeType `json:"maxGB" required:"true"`
|
||||
// The memory of the instance in Gibibyte.
|
||||
// REQUIRED
|
||||
Memory ListFlavorsGetMemoryAttributeType `json:"memory" required:"true"`
|
||||
// minimum storage which is required to order in Gigabyte.
|
||||
// Can be cast to int32 without loss of precision.
|
||||
// REQUIRED
|
||||
MinGB ListFlavorsGetMinGBAttributeType `json:"minGB" required:"true"`
|
||||
// defines the nodeType it can be either single or HA
|
||||
// REQUIRED
|
||||
NodeType ListFlavorsGetNodeTypeAttributeType `json:"nodeType" required:"true"`
|
||||
// maximum storage which can be ordered for the flavor in Gigabyte.
|
||||
// REQUIRED
|
||||
StorageClasses ListFlavorsGetStorageClassesAttributeType `json:"storageClasses" required:"true"`
|
||||
}
|
||||
|
||||
type _ListFlavors ListFlavors
|
||||
|
||||
// NewListFlavors instantiates a new ListFlavors 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 NewListFlavors(cpu ListFlavorsGetCpuArgType, description ListFlavorsGetDescriptionArgType, id ListFlavorsGetIdArgType, maxGB ListFlavorsGetMaxGBArgType, memory ListFlavorsGetMemoryArgType, minGB ListFlavorsGetMinGBArgType, nodeType ListFlavorsGetNodeTypeArgType, storageClasses ListFlavorsGetStorageClassesArgType) *ListFlavors {
|
||||
this := ListFlavors{}
|
||||
setListFlavorsGetCpuAttributeType(&this.Cpu, cpu)
|
||||
setListFlavorsGetDescriptionAttributeType(&this.Description, description)
|
||||
setListFlavorsGetIdAttributeType(&this.Id, id)
|
||||
setListFlavorsGetMaxGBAttributeType(&this.MaxGB, maxGB)
|
||||
setListFlavorsGetMemoryAttributeType(&this.Memory, memory)
|
||||
setListFlavorsGetMinGBAttributeType(&this.MinGB, minGB)
|
||||
setListFlavorsGetNodeTypeAttributeType(&this.NodeType, nodeType)
|
||||
setListFlavorsGetStorageClassesAttributeType(&this.StorageClasses, storageClasses)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListFlavorsWithDefaults instantiates a new ListFlavors 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 NewListFlavorsWithDefaults() *ListFlavors {
|
||||
this := ListFlavors{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCpu returns the Cpu field value
|
||||
func (o *ListFlavors) GetCpu() (ret ListFlavorsGetCpuRetType) {
|
||||
ret, _ = o.GetCpuOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCpuOk returns a tuple with the Cpu field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetCpuOk() (ret ListFlavorsGetCpuRetType, ok bool) {
|
||||
return getListFlavorsGetCpuAttributeTypeOk(o.Cpu)
|
||||
}
|
||||
|
||||
// SetCpu sets field value
|
||||
func (o *ListFlavors) SetCpu(v ListFlavorsGetCpuRetType) {
|
||||
setListFlavorsGetCpuAttributeType(&o.Cpu, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value
|
||||
func (o *ListFlavors) GetDescription() (ret ListFlavorsGetDescriptionRetType) {
|
||||
ret, _ = o.GetDescriptionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetDescriptionOk() (ret ListFlavorsGetDescriptionRetType, ok bool) {
|
||||
return getListFlavorsGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// SetDescription sets field value
|
||||
func (o *ListFlavors) SetDescription(v ListFlavorsGetDescriptionRetType) {
|
||||
setListFlavorsGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ListFlavors) GetId() (ret ListFlavorsGetIdRetType) {
|
||||
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 *ListFlavors) GetIdOk() (ret ListFlavorsGetIdRetType, ok bool) {
|
||||
return getListFlavorsGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ListFlavors) SetId(v ListFlavorsGetIdRetType) {
|
||||
setListFlavorsGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetMaxGB returns the MaxGB field value
|
||||
func (o *ListFlavors) GetMaxGB() (ret ListFlavorsGetMaxGBRetType) {
|
||||
ret, _ = o.GetMaxGBOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMaxGBOk returns a tuple with the MaxGB field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetMaxGBOk() (ret ListFlavorsGetMaxGBRetType, ok bool) {
|
||||
return getListFlavorsGetMaxGBAttributeTypeOk(o.MaxGB)
|
||||
}
|
||||
|
||||
// SetMaxGB sets field value
|
||||
func (o *ListFlavors) SetMaxGB(v ListFlavorsGetMaxGBRetType) {
|
||||
setListFlavorsGetMaxGBAttributeType(&o.MaxGB, v)
|
||||
}
|
||||
|
||||
// GetMemory returns the Memory field value
|
||||
func (o *ListFlavors) GetMemory() (ret ListFlavorsGetMemoryRetType) {
|
||||
ret, _ = o.GetMemoryOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMemoryOk returns a tuple with the Memory field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetMemoryOk() (ret ListFlavorsGetMemoryRetType, ok bool) {
|
||||
return getListFlavorsGetMemoryAttributeTypeOk(o.Memory)
|
||||
}
|
||||
|
||||
// SetMemory sets field value
|
||||
func (o *ListFlavors) SetMemory(v ListFlavorsGetMemoryRetType) {
|
||||
setListFlavorsGetMemoryAttributeType(&o.Memory, v)
|
||||
}
|
||||
|
||||
// GetMinGB returns the MinGB field value
|
||||
func (o *ListFlavors) GetMinGB() (ret ListFlavorsGetMinGBRetType) {
|
||||
ret, _ = o.GetMinGBOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMinGBOk returns a tuple with the MinGB field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetMinGBOk() (ret ListFlavorsGetMinGBRetType, ok bool) {
|
||||
return getListFlavorsGetMinGBAttributeTypeOk(o.MinGB)
|
||||
}
|
||||
|
||||
// SetMinGB sets field value
|
||||
func (o *ListFlavors) SetMinGB(v ListFlavorsGetMinGBRetType) {
|
||||
setListFlavorsGetMinGBAttributeType(&o.MinGB, v)
|
||||
}
|
||||
|
||||
// GetNodeType returns the NodeType field value
|
||||
func (o *ListFlavors) GetNodeType() (ret ListFlavorsGetNodeTypeRetType) {
|
||||
ret, _ = o.GetNodeTypeOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetNodeTypeOk returns a tuple with the NodeType field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetNodeTypeOk() (ret ListFlavorsGetNodeTypeRetType, ok bool) {
|
||||
return getListFlavorsGetNodeTypeAttributeTypeOk(o.NodeType)
|
||||
}
|
||||
|
||||
// SetNodeType sets field value
|
||||
func (o *ListFlavors) SetNodeType(v ListFlavorsGetNodeTypeRetType) {
|
||||
setListFlavorsGetNodeTypeAttributeType(&o.NodeType, v)
|
||||
}
|
||||
|
||||
// GetStorageClasses returns the StorageClasses field value
|
||||
func (o *ListFlavors) GetStorageClasses() (ret ListFlavorsGetStorageClassesRetType) {
|
||||
ret, _ = o.GetStorageClassesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetStorageClassesOk returns a tuple with the StorageClasses field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListFlavors) GetStorageClassesOk() (ret ListFlavorsGetStorageClassesRetType, ok bool) {
|
||||
return getListFlavorsGetStorageClassesAttributeTypeOk(o.StorageClasses)
|
||||
}
|
||||
|
||||
// SetStorageClasses sets field value
|
||||
func (o *ListFlavors) SetStorageClasses(v ListFlavorsGetStorageClassesRetType) {
|
||||
setListFlavorsGetStorageClassesAttributeType(&o.StorageClasses, v)
|
||||
}
|
||||
|
||||
func (o ListFlavors) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListFlavorsGetCpuAttributeTypeOk(o.Cpu); ok {
|
||||
toSerialize["Cpu"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetMaxGBAttributeTypeOk(o.MaxGB); ok {
|
||||
toSerialize["MaxGB"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetMemoryAttributeTypeOk(o.Memory); ok {
|
||||
toSerialize["Memory"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetMinGBAttributeTypeOk(o.MinGB); ok {
|
||||
toSerialize["MinGB"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetNodeTypeAttributeTypeOk(o.NodeType); ok {
|
||||
toSerialize["NodeType"] = val
|
||||
}
|
||||
if val, ok := getListFlavorsGetStorageClassesAttributeTypeOk(o.StorageClasses); ok {
|
||||
toSerialize["StorageClasses"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListFlavors struct {
|
||||
value *ListFlavors
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListFlavors) Get() *ListFlavors {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListFlavors) Set(val *ListFlavors) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListFlavors) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListFlavors) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListFlavors(val *ListFlavors) *NullableListFlavors {
|
||||
return &NullableListFlavors{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListFlavors) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListFlavors) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_flavors_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_flavors_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
259
pkg/sqlserverflexalpha/model_list_instance.go
Normal file
259
pkg/sqlserverflexalpha/model_list_instance.go
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
/*
|
||||
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 ListInstance type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListInstance{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListInstanceGetIdAttributeType = *string
|
||||
|
||||
func getListInstanceGetIdAttributeTypeOk(arg ListInstanceGetIdAttributeType) (ret ListInstanceGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListInstanceGetIdAttributeType(arg *ListInstanceGetIdAttributeType, val ListInstanceGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListInstanceGetIdArgType = string
|
||||
type ListInstanceGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for isDeletable
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type ListInstancegetIsDeletableAttributeType = *bool
|
||||
type ListInstancegetIsDeletableArgType = bool
|
||||
type ListInstancegetIsDeletableRetType = bool
|
||||
|
||||
func getListInstancegetIsDeletableAttributeTypeOk(arg ListInstancegetIsDeletableAttributeType) (ret ListInstancegetIsDeletableRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListInstancegetIsDeletableAttributeType(arg *ListInstancegetIsDeletableAttributeType, val ListInstancegetIsDeletableRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ListInstanceGetNameAttributeType = *string
|
||||
|
||||
func getListInstanceGetNameAttributeTypeOk(arg ListInstanceGetNameAttributeType) (ret ListInstanceGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListInstanceGetNameAttributeType(arg *ListInstanceGetNameAttributeType, val ListInstanceGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ListInstanceGetNameArgType = string
|
||||
type ListInstanceGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type ListInstanceGetStatusAttributeType = *Status
|
||||
type ListInstanceGetStatusArgType = Status
|
||||
type ListInstanceGetStatusRetType = Status
|
||||
|
||||
func getListInstanceGetStatusAttributeTypeOk(arg ListInstanceGetStatusAttributeType) (ret ListInstanceGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListInstanceGetStatusAttributeType(arg *ListInstanceGetStatusAttributeType, val ListInstanceGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListInstance struct for ListInstance
|
||||
type ListInstance struct {
|
||||
// The ID of the instance.
|
||||
// REQUIRED
|
||||
Id ListInstanceGetIdAttributeType `json:"id" required:"true"`
|
||||
// Whether the instance can be deleted or not.
|
||||
// REQUIRED
|
||||
IsDeletable ListInstancegetIsDeletableAttributeType `json:"isDeletable" required:"true"`
|
||||
// The name of the instance.
|
||||
// REQUIRED
|
||||
Name ListInstanceGetNameAttributeType `json:"name" required:"true"`
|
||||
// REQUIRED
|
||||
Status ListInstanceGetStatusAttributeType `json:"status" required:"true"`
|
||||
}
|
||||
|
||||
type _ListInstance ListInstance
|
||||
|
||||
// NewListInstance instantiates a new ListInstance 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 NewListInstance(id ListInstanceGetIdArgType, isDeletable ListInstancegetIsDeletableArgType, name ListInstanceGetNameArgType, status ListInstanceGetStatusArgType) *ListInstance {
|
||||
this := ListInstance{}
|
||||
setListInstanceGetIdAttributeType(&this.Id, id)
|
||||
setListInstancegetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
|
||||
setListInstanceGetNameAttributeType(&this.Name, name)
|
||||
setListInstanceGetStatusAttributeType(&this.Status, status)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListInstanceWithDefaults instantiates a new ListInstance 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 NewListInstanceWithDefaults() *ListInstance {
|
||||
this := ListInstance{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *ListInstance) GetId() (ret ListInstanceGetIdRetType) {
|
||||
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 *ListInstance) GetIdOk() (ret ListInstanceGetIdRetType, ok bool) {
|
||||
return getListInstanceGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *ListInstance) SetId(v ListInstanceGetIdRetType) {
|
||||
setListInstanceGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetIsDeletable returns the IsDeletable field value
|
||||
func (o *ListInstance) GetIsDeletable() (ret ListInstancegetIsDeletableRetType) {
|
||||
ret, _ = o.GetIsDeletableOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetIsDeletableOk returns a tuple with the IsDeletable field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListInstance) GetIsDeletableOk() (ret ListInstancegetIsDeletableRetType, ok bool) {
|
||||
return getListInstancegetIsDeletableAttributeTypeOk(o.IsDeletable)
|
||||
}
|
||||
|
||||
// SetIsDeletable sets field value
|
||||
func (o *ListInstance) SetIsDeletable(v ListInstancegetIsDeletableRetType) {
|
||||
setListInstancegetIsDeletableAttributeType(&o.IsDeletable, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *ListInstance) GetName() (ret ListInstanceGetNameRetType) {
|
||||
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 *ListInstance) GetNameOk() (ret ListInstanceGetNameRetType, ok bool) {
|
||||
return getListInstanceGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *ListInstance) SetName(v ListInstanceGetNameRetType) {
|
||||
setListInstanceGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value
|
||||
func (o *ListInstance) GetStatus() (ret ListInstanceGetStatusRetType) {
|
||||
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 *ListInstance) GetStatusOk() (ret ListInstanceGetStatusRetType, ok bool) {
|
||||
return getListInstanceGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// SetStatus sets field value
|
||||
func (o *ListInstance) SetStatus(v ListInstanceGetStatusRetType) {
|
||||
setListInstanceGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
func (o ListInstance) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListInstanceGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getListInstancegetIsDeletableAttributeTypeOk(o.IsDeletable); ok {
|
||||
toSerialize["IsDeletable"] = val
|
||||
}
|
||||
if val, ok := getListInstanceGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getListInstanceGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListInstance struct {
|
||||
value *ListInstance
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListInstance) Get() *ListInstance {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListInstance) Set(val *ListInstance) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListInstance) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListInstance) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListInstance(val *ListInstance) *NullableListInstance {
|
||||
return &NullableListInstance{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListInstance) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListInstance) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_instance_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_instance_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
169
pkg/sqlserverflexalpha/model_list_instances_response.go
Normal file
169
pkg/sqlserverflexalpha/model_list_instances_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
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 ListInstancesResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListInstancesResponse{}
|
||||
|
||||
/*
|
||||
types and functions for instances
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListInstancesResponseGetInstancesAttributeType = *[]ListInstance
|
||||
type ListInstancesResponseGetInstancesArgType = []ListInstance
|
||||
type ListInstancesResponseGetInstancesRetType = []ListInstance
|
||||
|
||||
func getListInstancesResponseGetInstancesAttributeTypeOk(arg ListInstancesResponseGetInstancesAttributeType) (ret ListInstancesResponseGetInstancesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListInstancesResponseGetInstancesAttributeType(arg *ListInstancesResponseGetInstancesAttributeType, val ListInstancesResponseGetInstancesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for pagination
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ListInstancesResponseGetPaginationAttributeType = *Pagination
|
||||
type ListInstancesResponseGetPaginationArgType = Pagination
|
||||
type ListInstancesResponseGetPaginationRetType = Pagination
|
||||
|
||||
func getListInstancesResponseGetPaginationAttributeTypeOk(arg ListInstancesResponseGetPaginationAttributeType) (ret ListInstancesResponseGetPaginationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListInstancesResponseGetPaginationAttributeType(arg *ListInstancesResponseGetPaginationAttributeType, val ListInstancesResponseGetPaginationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListInstancesResponse struct for ListInstancesResponse
|
||||
type ListInstancesResponse struct {
|
||||
// List of owned instances and their current status.
|
||||
// REQUIRED
|
||||
Instances ListInstancesResponseGetInstancesAttributeType `json:"instances" required:"true"`
|
||||
// REQUIRED
|
||||
Pagination ListInstancesResponseGetPaginationAttributeType `json:"pagination" required:"true"`
|
||||
}
|
||||
|
||||
type _ListInstancesResponse ListInstancesResponse
|
||||
|
||||
// NewListInstancesResponse instantiates a new ListInstancesResponse 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 NewListInstancesResponse(instances ListInstancesResponseGetInstancesArgType, pagination ListInstancesResponseGetPaginationArgType) *ListInstancesResponse {
|
||||
this := ListInstancesResponse{}
|
||||
setListInstancesResponseGetInstancesAttributeType(&this.Instances, instances)
|
||||
setListInstancesResponseGetPaginationAttributeType(&this.Pagination, pagination)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse 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 NewListInstancesResponseWithDefaults() *ListInstancesResponse {
|
||||
this := ListInstancesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetInstances returns the Instances field value
|
||||
func (o *ListInstancesResponse) GetInstances() (ret ListInstancesResponseGetInstancesRetType) {
|
||||
ret, _ = o.GetInstancesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetInstancesOk returns a tuple with the Instances field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListInstancesResponse) GetInstancesOk() (ret ListInstancesResponseGetInstancesRetType, ok bool) {
|
||||
return getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances)
|
||||
}
|
||||
|
||||
// SetInstances sets field value
|
||||
func (o *ListInstancesResponse) SetInstances(v ListInstancesResponseGetInstancesRetType) {
|
||||
setListInstancesResponseGetInstancesAttributeType(&o.Instances, v)
|
||||
}
|
||||
|
||||
// GetPagination returns the Pagination field value
|
||||
func (o *ListInstancesResponse) GetPagination() (ret ListInstancesResponseGetPaginationRetType) {
|
||||
ret, _ = o.GetPaginationOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPaginationOk returns a tuple with the Pagination field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListInstancesResponse) GetPaginationOk() (ret ListInstancesResponseGetPaginationRetType, ok bool) {
|
||||
return getListInstancesResponseGetPaginationAttributeTypeOk(o.Pagination)
|
||||
}
|
||||
|
||||
// SetPagination sets field value
|
||||
func (o *ListInstancesResponse) SetPagination(v ListInstancesResponseGetPaginationRetType) {
|
||||
setListInstancesResponseGetPaginationAttributeType(&o.Pagination, v)
|
||||
}
|
||||
|
||||
func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListInstancesResponseGetInstancesAttributeTypeOk(o.Instances); ok {
|
||||
toSerialize["Instances"] = val
|
||||
}
|
||||
if val, ok := getListInstancesResponseGetPaginationAttributeTypeOk(o.Pagination); ok {
|
||||
toSerialize["Pagination"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListInstancesResponse struct {
|
||||
value *ListInstancesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListInstancesResponse) Get() *ListInstancesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListInstancesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListInstancesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse {
|
||||
return &NullableListInstancesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_instances_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_instances_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_list_roles_response.go
Normal file
126
pkg/sqlserverflexalpha/model_list_roles_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 ListRolesResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListRolesResponse{}
|
||||
|
||||
/*
|
||||
types and functions for roles
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListRolesResponseGetRolesAttributeType = *[]UserRole
|
||||
type ListRolesResponseGetRolesArgType = []UserRole
|
||||
type ListRolesResponseGetRolesRetType = []UserRole
|
||||
|
||||
func getListRolesResponseGetRolesAttributeTypeOk(arg ListRolesResponseGetRolesAttributeType) (ret ListRolesResponseGetRolesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListRolesResponseGetRolesAttributeType(arg *ListRolesResponseGetRolesAttributeType, val ListRolesResponseGetRolesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListRolesResponse struct for ListRolesResponse
|
||||
type ListRolesResponse struct {
|
||||
// List of roles available for an instance.
|
||||
// REQUIRED
|
||||
Roles ListRolesResponseGetRolesAttributeType `json:"roles" required:"true"`
|
||||
}
|
||||
|
||||
type _ListRolesResponse ListRolesResponse
|
||||
|
||||
// NewListRolesResponse instantiates a new ListRolesResponse 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 NewListRolesResponse(roles ListRolesResponseGetRolesArgType) *ListRolesResponse {
|
||||
this := ListRolesResponse{}
|
||||
setListRolesResponseGetRolesAttributeType(&this.Roles, roles)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListRolesResponseWithDefaults instantiates a new ListRolesResponse 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 NewListRolesResponseWithDefaults() *ListRolesResponse {
|
||||
this := ListRolesResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetRoles returns the Roles field value
|
||||
func (o *ListRolesResponse) GetRoles() (ret ListRolesResponseGetRolesRetType) {
|
||||
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 *ListRolesResponse) GetRolesOk() (ret ListRolesResponseGetRolesRetType, ok bool) {
|
||||
return getListRolesResponseGetRolesAttributeTypeOk(o.Roles)
|
||||
}
|
||||
|
||||
// SetRoles sets field value
|
||||
func (o *ListRolesResponse) SetRoles(v ListRolesResponseGetRolesRetType) {
|
||||
setListRolesResponseGetRolesAttributeType(&o.Roles, v)
|
||||
}
|
||||
|
||||
func (o ListRolesResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListRolesResponseGetRolesAttributeTypeOk(o.Roles); ok {
|
||||
toSerialize["Roles"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListRolesResponse struct {
|
||||
value *ListRolesResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListRolesResponse) Get() *ListRolesResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListRolesResponse) Set(val *ListRolesResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListRolesResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListRolesResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListRolesResponse(val *ListRolesResponse) *NullableListRolesResponse {
|
||||
return &NullableListRolesResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListRolesResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListRolesResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_roles_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_roles_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
216
pkg/sqlserverflexalpha/model_list_user.go
Normal file
216
pkg/sqlserverflexalpha/model_list_user.go
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
/*
|
||||
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)
|
||||
}
|
||||
169
pkg/sqlserverflexalpha/model_list_user_response.go
Normal file
169
pkg/sqlserverflexalpha/model_list_user_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
/*
|
||||
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 ListUserResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ListUserResponse{}
|
||||
|
||||
/*
|
||||
types and functions for pagination
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ListUserResponseGetPaginationAttributeType = *Pagination
|
||||
type ListUserResponseGetPaginationArgType = Pagination
|
||||
type ListUserResponseGetPaginationRetType = Pagination
|
||||
|
||||
func getListUserResponseGetPaginationAttributeTypeOk(arg ListUserResponseGetPaginationAttributeType) (ret ListUserResponseGetPaginationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListUserResponseGetPaginationAttributeType(arg *ListUserResponseGetPaginationAttributeType, val ListUserResponseGetPaginationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for users
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type ListUserResponseGetUsersAttributeType = *[]ListUser
|
||||
type ListUserResponseGetUsersArgType = []ListUser
|
||||
type ListUserResponseGetUsersRetType = []ListUser
|
||||
|
||||
func getListUserResponseGetUsersAttributeTypeOk(arg ListUserResponseGetUsersAttributeType) (ret ListUserResponseGetUsersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setListUserResponseGetUsersAttributeType(arg *ListUserResponseGetUsersAttributeType, val ListUserResponseGetUsersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ListUserResponse struct for ListUserResponse
|
||||
type ListUserResponse struct {
|
||||
// REQUIRED
|
||||
Pagination ListUserResponseGetPaginationAttributeType `json:"pagination" required:"true"`
|
||||
// List of all users inside an instance
|
||||
// REQUIRED
|
||||
Users ListUserResponseGetUsersAttributeType `json:"users" required:"true"`
|
||||
}
|
||||
|
||||
type _ListUserResponse ListUserResponse
|
||||
|
||||
// NewListUserResponse instantiates a new ListUserResponse 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 NewListUserResponse(pagination ListUserResponseGetPaginationArgType, users ListUserResponseGetUsersArgType) *ListUserResponse {
|
||||
this := ListUserResponse{}
|
||||
setListUserResponseGetPaginationAttributeType(&this.Pagination, pagination)
|
||||
setListUserResponseGetUsersAttributeType(&this.Users, users)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewListUserResponseWithDefaults instantiates a new ListUserResponse 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 NewListUserResponseWithDefaults() *ListUserResponse {
|
||||
this := ListUserResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPagination returns the Pagination field value
|
||||
func (o *ListUserResponse) GetPagination() (ret ListUserResponseGetPaginationRetType) {
|
||||
ret, _ = o.GetPaginationOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPaginationOk returns a tuple with the Pagination field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListUserResponse) GetPaginationOk() (ret ListUserResponseGetPaginationRetType, ok bool) {
|
||||
return getListUserResponseGetPaginationAttributeTypeOk(o.Pagination)
|
||||
}
|
||||
|
||||
// SetPagination sets field value
|
||||
func (o *ListUserResponse) SetPagination(v ListUserResponseGetPaginationRetType) {
|
||||
setListUserResponseGetPaginationAttributeType(&o.Pagination, v)
|
||||
}
|
||||
|
||||
// GetUsers returns the Users field value
|
||||
func (o *ListUserResponse) GetUsers() (ret ListUserResponseGetUsersRetType) {
|
||||
ret, _ = o.GetUsersOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetUsersOk returns a tuple with the Users field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ListUserResponse) GetUsersOk() (ret ListUserResponseGetUsersRetType, ok bool) {
|
||||
return getListUserResponseGetUsersAttributeTypeOk(o.Users)
|
||||
}
|
||||
|
||||
// SetUsers sets field value
|
||||
func (o *ListUserResponse) SetUsers(v ListUserResponseGetUsersRetType) {
|
||||
setListUserResponseGetUsersAttributeType(&o.Users, v)
|
||||
}
|
||||
|
||||
func (o ListUserResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getListUserResponseGetPaginationAttributeTypeOk(o.Pagination); ok {
|
||||
toSerialize["Pagination"] = val
|
||||
}
|
||||
if val, ok := getListUserResponseGetUsersAttributeTypeOk(o.Users); ok {
|
||||
toSerialize["Users"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableListUserResponse struct {
|
||||
value *ListUserResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableListUserResponse) Get() *ListUserResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableListUserResponse) Set(val *ListUserResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableListUserResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableListUserResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableListUserResponse(val *ListUserResponse) *NullableListUserResponse {
|
||||
return &NullableListUserResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableListUserResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableListUserResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_list_user_response_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
11
pkg/sqlserverflexalpha/model_list_user_test.go
Normal file
11
pkg/sqlserverflexalpha/model_list_user_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
298
pkg/sqlserverflexalpha/model_pagination.go
Normal file
298
pkg/sqlserverflexalpha/model_pagination.go
Normal file
|
|
@ -0,0 +1,298 @@
|
|||
/*
|
||||
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 Pagination type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Pagination{}
|
||||
|
||||
/*
|
||||
types and functions for page
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetPageAttributeType = *int64
|
||||
type PaginationGetPageArgType = int64
|
||||
type PaginationGetPageRetType = int64
|
||||
|
||||
func getPaginationGetPageAttributeTypeOk(arg PaginationGetPageAttributeType) (ret PaginationGetPageRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetPageAttributeType(arg *PaginationGetPageAttributeType, val PaginationGetPageRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetSizeAttributeType = *int64
|
||||
type PaginationGetSizeArgType = int64
|
||||
type PaginationGetSizeRetType = int64
|
||||
|
||||
func getPaginationGetSizeAttributeTypeOk(arg PaginationGetSizeAttributeType) (ret PaginationGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetSizeAttributeType(arg *PaginationGetSizeAttributeType, val PaginationGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for sort
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type PaginationGetSortAttributeType = *string
|
||||
|
||||
func getPaginationGetSortAttributeTypeOk(arg PaginationGetSortAttributeType) (ret PaginationGetSortRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetSortAttributeType(arg *PaginationGetSortAttributeType, val PaginationGetSortRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type PaginationGetSortArgType = string
|
||||
type PaginationGetSortRetType = string
|
||||
|
||||
/*
|
||||
types and functions for totalPages
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetTotalPagesAttributeType = *int64
|
||||
type PaginationGetTotalPagesArgType = int64
|
||||
type PaginationGetTotalPagesRetType = int64
|
||||
|
||||
func getPaginationGetTotalPagesAttributeTypeOk(arg PaginationGetTotalPagesAttributeType) (ret PaginationGetTotalPagesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetTotalPagesAttributeType(arg *PaginationGetTotalPagesAttributeType, val PaginationGetTotalPagesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for totalRows
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type PaginationGetTotalRowsAttributeType = *int64
|
||||
type PaginationGetTotalRowsArgType = int64
|
||||
type PaginationGetTotalRowsRetType = int64
|
||||
|
||||
func getPaginationGetTotalRowsAttributeTypeOk(arg PaginationGetTotalRowsAttributeType) (ret PaginationGetTotalRowsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPaginationGetTotalRowsAttributeType(arg *PaginationGetTotalRowsAttributeType, val PaginationGetTotalRowsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// Pagination struct for Pagination
|
||||
type Pagination struct {
|
||||
// REQUIRED
|
||||
Page PaginationGetPageAttributeType `json:"page" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
Size PaginationGetSizeAttributeType `json:"size" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
Sort PaginationGetSortAttributeType `json:"sort" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
TotalPages PaginationGetTotalPagesAttributeType `json:"totalPages" required:"true" validate:"required"`
|
||||
// REQUIRED
|
||||
TotalRows PaginationGetTotalRowsAttributeType `json:"totalRows" required:"true" validate:"required"`
|
||||
}
|
||||
|
||||
type _Pagination Pagination
|
||||
|
||||
// NewPagination instantiates a new Pagination 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 NewPagination(page PaginationGetPageArgType, size PaginationGetSizeArgType, sort PaginationGetSortArgType, totalPages PaginationGetTotalPagesArgType, totalRows PaginationGetTotalRowsArgType) *Pagination {
|
||||
this := Pagination{}
|
||||
setPaginationGetPageAttributeType(&this.Page, page)
|
||||
setPaginationGetSizeAttributeType(&this.Size, size)
|
||||
setPaginationGetSortAttributeType(&this.Sort, sort)
|
||||
setPaginationGetTotalPagesAttributeType(&this.TotalPages, totalPages)
|
||||
setPaginationGetTotalRowsAttributeType(&this.TotalRows, totalRows)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewPaginationWithDefaults instantiates a new Pagination 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 NewPaginationWithDefaults() *Pagination {
|
||||
this := Pagination{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetPage returns the Page field value
|
||||
func (o *Pagination) GetPage() (ret PaginationGetPageRetType) {
|
||||
ret, _ = o.GetPageOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPageOk returns a tuple with the Page field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetPageOk() (ret PaginationGetPageRetType, ok bool) {
|
||||
return getPaginationGetPageAttributeTypeOk(o.Page)
|
||||
}
|
||||
|
||||
// SetPage sets field value
|
||||
func (o *Pagination) SetPage(v PaginationGetPageRetType) {
|
||||
setPaginationGetPageAttributeType(&o.Page, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value
|
||||
func (o *Pagination) GetSize() (ret PaginationGetSizeRetType) {
|
||||
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 *Pagination) GetSizeOk() (ret PaginationGetSizeRetType, ok bool) {
|
||||
return getPaginationGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// SetSize sets field value
|
||||
func (o *Pagination) SetSize(v PaginationGetSizeRetType) {
|
||||
setPaginationGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetSort returns the Sort field value
|
||||
func (o *Pagination) GetSort() (ret PaginationGetSortRetType) {
|
||||
ret, _ = o.GetSortOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetSortOk returns a tuple with the Sort field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetSortOk() (ret PaginationGetSortRetType, ok bool) {
|
||||
return getPaginationGetSortAttributeTypeOk(o.Sort)
|
||||
}
|
||||
|
||||
// SetSort sets field value
|
||||
func (o *Pagination) SetSort(v PaginationGetSortRetType) {
|
||||
setPaginationGetSortAttributeType(&o.Sort, v)
|
||||
}
|
||||
|
||||
// GetTotalPages returns the TotalPages field value
|
||||
func (o *Pagination) GetTotalPages() (ret PaginationGetTotalPagesRetType) {
|
||||
ret, _ = o.GetTotalPagesOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetTotalPagesOk returns a tuple with the TotalPages field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetTotalPagesOk() (ret PaginationGetTotalPagesRetType, ok bool) {
|
||||
return getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages)
|
||||
}
|
||||
|
||||
// SetTotalPages sets field value
|
||||
func (o *Pagination) SetTotalPages(v PaginationGetTotalPagesRetType) {
|
||||
setPaginationGetTotalPagesAttributeType(&o.TotalPages, v)
|
||||
}
|
||||
|
||||
// GetTotalRows returns the TotalRows field value
|
||||
func (o *Pagination) GetTotalRows() (ret PaginationGetTotalRowsRetType) {
|
||||
ret, _ = o.GetTotalRowsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetTotalRowsOk returns a tuple with the TotalRows field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Pagination) GetTotalRowsOk() (ret PaginationGetTotalRowsRetType, ok bool) {
|
||||
return getPaginationGetTotalRowsAttributeTypeOk(o.TotalRows)
|
||||
}
|
||||
|
||||
// SetTotalRows sets field value
|
||||
func (o *Pagination) SetTotalRows(v PaginationGetTotalRowsRetType) {
|
||||
setPaginationGetTotalRowsAttributeType(&o.TotalRows, v)
|
||||
}
|
||||
|
||||
func (o Pagination) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getPaginationGetPageAttributeTypeOk(o.Page); ok {
|
||||
toSerialize["Page"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetSortAttributeTypeOk(o.Sort); ok {
|
||||
toSerialize["Sort"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetTotalPagesAttributeTypeOk(o.TotalPages); ok {
|
||||
toSerialize["TotalPages"] = val
|
||||
}
|
||||
if val, ok := getPaginationGetTotalRowsAttributeTypeOk(o.TotalRows); ok {
|
||||
toSerialize["TotalRows"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullablePagination struct {
|
||||
value *Pagination
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullablePagination) Get() *Pagination {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullablePagination) Set(val *Pagination) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullablePagination) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullablePagination) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullablePagination(val *Pagination) *NullablePagination {
|
||||
return &NullablePagination{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullablePagination) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullablePagination) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/sqlserverflexalpha/model_pagination_test.go
Normal file
11
pkg/sqlserverflexalpha/model_pagination_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_protect_instance_request_payload.go
Normal file
126
pkg/sqlserverflexalpha/model_protect_instance_request_payload.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 ProtectInstanceRequestPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ProtectInstanceRequestPayload{}
|
||||
|
||||
/*
|
||||
types and functions for isDeletable
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type ProtectInstanceRequestPayloadgetIsDeletableAttributeType = *bool
|
||||
type ProtectInstanceRequestPayloadgetIsDeletableArgType = bool
|
||||
type ProtectInstanceRequestPayloadgetIsDeletableRetType = bool
|
||||
|
||||
func getProtectInstanceRequestPayloadgetIsDeletableAttributeTypeOk(arg ProtectInstanceRequestPayloadgetIsDeletableAttributeType) (ret ProtectInstanceRequestPayloadgetIsDeletableRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setProtectInstanceRequestPayloadgetIsDeletableAttributeType(arg *ProtectInstanceRequestPayloadgetIsDeletableAttributeType, val ProtectInstanceRequestPayloadgetIsDeletableRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ProtectInstanceRequestPayload struct for ProtectInstanceRequestPayload
|
||||
type ProtectInstanceRequestPayload struct {
|
||||
// Protect instance from deletion.
|
||||
// REQUIRED
|
||||
IsDeletable ProtectInstanceRequestPayloadgetIsDeletableAttributeType `json:"isDeletable" required:"true"`
|
||||
}
|
||||
|
||||
type _ProtectInstanceRequestPayload ProtectInstanceRequestPayload
|
||||
|
||||
// NewProtectInstanceRequestPayload instantiates a new ProtectInstanceRequestPayload 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 NewProtectInstanceRequestPayload(isDeletable ProtectInstanceRequestPayloadgetIsDeletableArgType) *ProtectInstanceRequestPayload {
|
||||
this := ProtectInstanceRequestPayload{}
|
||||
setProtectInstanceRequestPayloadgetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewProtectInstanceRequestPayloadWithDefaults instantiates a new ProtectInstanceRequestPayload 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 NewProtectInstanceRequestPayloadWithDefaults() *ProtectInstanceRequestPayload {
|
||||
this := ProtectInstanceRequestPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetIsDeletable returns the IsDeletable field value
|
||||
func (o *ProtectInstanceRequestPayload) GetIsDeletable() (ret ProtectInstanceRequestPayloadgetIsDeletableRetType) {
|
||||
ret, _ = o.GetIsDeletableOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetIsDeletableOk returns a tuple with the IsDeletable field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ProtectInstanceRequestPayload) GetIsDeletableOk() (ret ProtectInstanceRequestPayloadgetIsDeletableRetType, ok bool) {
|
||||
return getProtectInstanceRequestPayloadgetIsDeletableAttributeTypeOk(o.IsDeletable)
|
||||
}
|
||||
|
||||
// SetIsDeletable sets field value
|
||||
func (o *ProtectInstanceRequestPayload) SetIsDeletable(v ProtectInstanceRequestPayloadgetIsDeletableRetType) {
|
||||
setProtectInstanceRequestPayloadgetIsDeletableAttributeType(&o.IsDeletable, v)
|
||||
}
|
||||
|
||||
func (o ProtectInstanceRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getProtectInstanceRequestPayloadgetIsDeletableAttributeTypeOk(o.IsDeletable); ok {
|
||||
toSerialize["IsDeletable"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableProtectInstanceRequestPayload struct {
|
||||
value *ProtectInstanceRequestPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableProtectInstanceRequestPayload) Get() *ProtectInstanceRequestPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableProtectInstanceRequestPayload) Set(val *ProtectInstanceRequestPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableProtectInstanceRequestPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableProtectInstanceRequestPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableProtectInstanceRequestPayload(val *ProtectInstanceRequestPayload) *NullableProtectInstanceRequestPayload {
|
||||
return &NullableProtectInstanceRequestPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableProtectInstanceRequestPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableProtectInstanceRequestPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
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
|
||||
126
pkg/sqlserverflexalpha/model_protect_instance_response.go
Normal file
126
pkg/sqlserverflexalpha/model_protect_instance_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
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 ProtectInstanceResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ProtectInstanceResponse{}
|
||||
|
||||
/*
|
||||
types and functions for isDeletable
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type ProtectInstanceResponsegetIsDeletableAttributeType = *bool
|
||||
type ProtectInstanceResponsegetIsDeletableArgType = bool
|
||||
type ProtectInstanceResponsegetIsDeletableRetType = bool
|
||||
|
||||
func getProtectInstanceResponsegetIsDeletableAttributeTypeOk(arg ProtectInstanceResponsegetIsDeletableAttributeType) (ret ProtectInstanceResponsegetIsDeletableRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setProtectInstanceResponsegetIsDeletableAttributeType(arg *ProtectInstanceResponsegetIsDeletableAttributeType, val ProtectInstanceResponsegetIsDeletableRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ProtectInstanceResponse struct for ProtectInstanceResponse
|
||||
type ProtectInstanceResponse struct {
|
||||
// Protect instance from deletion.
|
||||
// REQUIRED
|
||||
IsDeletable ProtectInstanceResponsegetIsDeletableAttributeType `json:"isDeletable" required:"true"`
|
||||
}
|
||||
|
||||
type _ProtectInstanceResponse ProtectInstanceResponse
|
||||
|
||||
// NewProtectInstanceResponse instantiates a new ProtectInstanceResponse 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 NewProtectInstanceResponse(isDeletable ProtectInstanceResponsegetIsDeletableArgType) *ProtectInstanceResponse {
|
||||
this := ProtectInstanceResponse{}
|
||||
setProtectInstanceResponsegetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewProtectInstanceResponseWithDefaults instantiates a new ProtectInstanceResponse 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 NewProtectInstanceResponseWithDefaults() *ProtectInstanceResponse {
|
||||
this := ProtectInstanceResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetIsDeletable returns the IsDeletable field value
|
||||
func (o *ProtectInstanceResponse) GetIsDeletable() (ret ProtectInstanceResponsegetIsDeletableRetType) {
|
||||
ret, _ = o.GetIsDeletableOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetIsDeletableOk returns a tuple with the IsDeletable field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ProtectInstanceResponse) GetIsDeletableOk() (ret ProtectInstanceResponsegetIsDeletableRetType, ok bool) {
|
||||
return getProtectInstanceResponsegetIsDeletableAttributeTypeOk(o.IsDeletable)
|
||||
}
|
||||
|
||||
// SetIsDeletable sets field value
|
||||
func (o *ProtectInstanceResponse) SetIsDeletable(v ProtectInstanceResponsegetIsDeletableRetType) {
|
||||
setProtectInstanceResponsegetIsDeletableAttributeType(&o.IsDeletable, v)
|
||||
}
|
||||
|
||||
func (o ProtectInstanceResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getProtectInstanceResponsegetIsDeletableAttributeTypeOk(o.IsDeletable); ok {
|
||||
toSerialize["IsDeletable"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableProtectInstanceResponse struct {
|
||||
value *ProtectInstanceResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableProtectInstanceResponse) Get() *ProtectInstanceResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableProtectInstanceResponse) Set(val *ProtectInstanceResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableProtectInstanceResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableProtectInstanceResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableProtectInstanceResponse(val *ProtectInstanceResponse) *NullableProtectInstanceResponse {
|
||||
return &NullableProtectInstanceResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableProtectInstanceResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableProtectInstanceResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue