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
2
Makefile
2
Makefile
|
|
@ -25,7 +25,7 @@ generate-docs:
|
||||||
@$(SCRIPTS_BASE)/tfplugindocs.sh
|
@$(SCRIPTS_BASE)/tfplugindocs.sh
|
||||||
|
|
||||||
build:
|
build:
|
||||||
@go build -o bin/terraform-provider-stackit
|
@go build -o bin/terraform-provider-stackitalpha
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@gofmt -s -w .
|
@gofmt -s -w .
|
||||||
|
|
|
||||||
1
pkg/postgresflexalpha/.openapi-generator/VERSION
Normal file
1
pkg/postgresflexalpha/.openapi-generator/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
6.6.0
|
||||||
6257
pkg/postgresflexalpha/api_default.go
Normal file
6257
pkg/postgresflexalpha/api_default.go
Normal file
File diff suppressed because it is too large
Load diff
1571
pkg/postgresflexalpha/api_default_test.go
Normal file
1571
pkg/postgresflexalpha/api_default_test.go
Normal file
File diff suppressed because it is too large
Load diff
631
pkg/postgresflexalpha/client.go
Normal file
631
pkg/postgresflexalpha/client.go
Normal file
|
|
@ -0,0 +1,631 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 PostgreSQL Flex 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/postgresflexalpha/configuration.go
Normal file
41
pkg/postgresflexalpha/configuration.go
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexa",
|
||||||
|
Debug: false,
|
||||||
|
Servers: config.ServerConfigurations{
|
||||||
|
{
|
||||||
|
URL: "https://postgres-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
|
||||||
|
}
|
||||||
139
pkg/postgresflexalpha/model_backup_sort.go
Normal file
139
pkg/postgresflexalpha/model_backup_sort.go
Normal file
|
|
@ -0,0 +1,139 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// BackupSort the model 'BackupSort'
|
||||||
|
type BackupSort string
|
||||||
|
|
||||||
|
// List of backup.sort
|
||||||
|
const (
|
||||||
|
BACKUPSORT_COMPLETION_TIME_DESC BackupSort = "completion_time.desc"
|
||||||
|
BACKUPSORT_COMPLETION_TIME_ASC BackupSort = "completion_time.asc"
|
||||||
|
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{
|
||||||
|
"completion_time.desc",
|
||||||
|
"completion_time.asc",
|
||||||
|
"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/postgresflexalpha/model_backup_sort_test.go
Normal file
11
pkg/postgresflexalpha/model_backup_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
176
pkg/postgresflexalpha/model_create_database_request_payload.go
Normal file
176
pkg/postgresflexalpha/model_create_database_request_payload.go
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateDatabaseRequestPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateDatabaseRequestPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
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 name of the database.
|
||||||
|
// REQUIRED
|
||||||
|
Name CreateDatabaseRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The owner of the database.
|
||||||
|
Owner CreateDatabaseRequestPayloadGetOwnerAttributeType `json:"owner,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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) *CreateDatabaseRequestPayload {
|
||||||
|
this := CreateDatabaseRequestPayload{}
|
||||||
|
setCreateDatabaseRequestPayloadGetNameAttributeType(&this.Name, name)
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 if set, zero value otherwise.
|
||||||
|
func (o *CreateDatabaseRequestPayload) GetOwner() (res CreateDatabaseRequestPayloadGetOwnerRetType) {
|
||||||
|
res, _ = o.GetOwnerOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateDatabaseRequestPayload) GetOwnerOk() (ret CreateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
||||||
|
return getCreateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOwner returns a boolean if a field has been set.
|
||||||
|
func (o *CreateDatabaseRequestPayload) HasOwner() bool {
|
||||||
|
_, ok := o.GetOwnerOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
||||||
|
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 := 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 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
126
pkg/postgresflexalpha/model_create_database_response.go
Normal file
126
pkg/postgresflexalpha/model_create_database_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_create_database_response_test.go
Normal file
11
pkg/postgresflexalpha/model_create_database_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
531
pkg/postgresflexalpha/model_create_instance_request_payload.go
Normal file
531
pkg/postgresflexalpha/model_create_instance_request_payload.go
Normal file
|
|
@ -0,0 +1,531 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 = *InstanceNetwork
|
||||||
|
type CreateInstanceRequestPayloadGetNetworkArgType = InstanceNetwork
|
||||||
|
type CreateInstanceRequestPayloadGetNetworkRetType = InstanceNetwork
|
||||||
|
|
||||||
|
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 replicas
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isEnumRef
|
||||||
|
type CreateInstanceRequestPayloadGetReplicasAttributeType = *Replicas
|
||||||
|
type CreateInstanceRequestPayloadGetReplicasArgType = Replicas
|
||||||
|
type CreateInstanceRequestPayloadGetReplicasRetType = Replicas
|
||||||
|
|
||||||
|
func getCreateInstanceRequestPayloadGetReplicasAttributeTypeOk(arg CreateInstanceRequestPayloadGetReplicasAttributeType) (ret CreateInstanceRequestPayloadGetReplicasRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateInstanceRequestPayloadGetReplicasAttributeType(arg *CreateInstanceRequestPayloadGetReplicasAttributeType, val CreateInstanceRequestPayloadGetReplicasRetType) {
|
||||||
|
*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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateInstanceRequestPayloadGetVersionAttributeType = *string
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateInstanceRequestPayloadGetVersionArgType = string
|
||||||
|
type CreateInstanceRequestPayloadGetVersionRetType = string
|
||||||
|
|
||||||
|
// CreateInstanceRequestPayload struct for CreateInstanceRequestPayload
|
||||||
|
type CreateInstanceRequestPayload struct {
|
||||||
|
// 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"`
|
||||||
|
// REQUIRED
|
||||||
|
Replicas CreateInstanceRequestPayloadGetReplicasAttributeType `json:"replicas" required:"true"`
|
||||||
|
// How long backups are retained. The value can only be between 32 and 365 days.
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
// REQUIRED
|
||||||
|
RetentionDays CreateInstanceRequestPayloadGetRetentionDaysAttributeType `json:"retentionDays" required:"true"`
|
||||||
|
// REQUIRED
|
||||||
|
Storage CreateInstanceRequestPayloadGetStorageAttributeType `json:"storage" required:"true"`
|
||||||
|
// The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3alpha1#tag/Version) for supported version parameters.
|
||||||
|
// 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, replicas CreateInstanceRequestPayloadGetReplicasArgType, 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)
|
||||||
|
setCreateInstanceRequestPayloadGetReplicasAttributeType(&this.Replicas, replicas)
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
func (o *CreateInstanceRequestPayload) GetAclOk() (ret CreateInstanceRequestPayloadGetAclRetType, ok bool) {
|
||||||
|
return getCreateInstanceRequestPayloadGetAclAttributeTypeOk(o.Acl)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAcl sets field value
|
||||||
|
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 InstanceNetwork and assigns it to the Network field.
|
||||||
|
func (o *CreateInstanceRequestPayload) SetNetwork(v CreateInstanceRequestPayloadGetNetworkRetType) {
|
||||||
|
setCreateInstanceRequestPayloadGetNetworkAttributeType(&o.Network, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetReplicas returns the Replicas field value
|
||||||
|
func (o *CreateInstanceRequestPayload) GetReplicas() (ret CreateInstanceRequestPayloadGetReplicasRetType) {
|
||||||
|
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 *CreateInstanceRequestPayload) GetReplicasOk() (ret CreateInstanceRequestPayloadGetReplicasRetType, ok bool) {
|
||||||
|
return getCreateInstanceRequestPayloadGetReplicasAttributeTypeOk(o.Replicas)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetReplicas sets field value
|
||||||
|
func (o *CreateInstanceRequestPayload) SetReplicas(v CreateInstanceRequestPayloadGetReplicasRetType) {
|
||||||
|
setCreateInstanceRequestPayloadGetReplicasAttributeType(&o.Replicas, 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 := getCreateInstanceRequestPayloadGetReplicasAttributeTypeOk(o.Replicas); ok {
|
||||||
|
toSerialize["Replicas"] = 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,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
127
pkg/postgresflexalpha/model_create_instance_response.go
Normal file
127
pkg/postgresflexalpha/model_create_instance_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_create_instance_response_test.go
Normal file
11
pkg/postgresflexalpha/model_create_instance_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
175
pkg/postgresflexalpha/model_create_user_request_payload.go
Normal file
175
pkg/postgresflexalpha/model_create_user_request_payload.go
Normal file
|
|
@ -0,0 +1,175 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateUserRequestPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateUserRequestPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateUserRequestPayloadGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateUserRequestPayloadGetNameAttributeTypeOk(arg CreateUserRequestPayloadGetNameAttributeType) (ret CreateUserRequestPayloadGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateUserRequestPayloadGetNameAttributeType(arg *CreateUserRequestPayloadGetNameAttributeType, val CreateUserRequestPayloadGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateUserRequestPayloadGetNameArgType = string
|
||||||
|
type CreateUserRequestPayloadGetNameRetType = 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
|
||||||
|
}
|
||||||
|
|
||||||
|
// CreateUserRequestPayload struct for CreateUserRequestPayload
|
||||||
|
type CreateUserRequestPayload struct {
|
||||||
|
// The name of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Name CreateUserRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// A list containing the user roles for the instance.
|
||||||
|
Roles CreateUserRequestPayloadGetRolesAttributeType `json:"roles,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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(name CreateUserRequestPayloadGetNameArgType) *CreateUserRequestPayload {
|
||||||
|
this := CreateUserRequestPayload{}
|
||||||
|
setCreateUserRequestPayloadGetNameAttributeType(&this.Name, name)
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *CreateUserRequestPayload) GetName() (ret CreateUserRequestPayloadGetNameRetType) {
|
||||||
|
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 *CreateUserRequestPayload) GetNameOk() (ret CreateUserRequestPayloadGetNameRetType, ok bool) {
|
||||||
|
return getCreateUserRequestPayloadGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *CreateUserRequestPayload) SetName(v CreateUserRequestPayloadGetNameRetType) {
|
||||||
|
setCreateUserRequestPayloadGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRoles returns the Roles field value if set, zero value otherwise.
|
||||||
|
func (o *CreateUserRequestPayload) GetRoles() (res CreateUserRequestPayloadGetRolesRetType) {
|
||||||
|
res, _ = o.GetRolesOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateUserRequestPayload) GetRolesOk() (ret CreateUserRequestPayloadGetRolesRetType, ok bool) {
|
||||||
|
return getCreateUserRequestPayloadGetRolesAttributeTypeOk(o.Roles)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasRoles returns a boolean if a field has been set.
|
||||||
|
func (o *CreateUserRequestPayload) HasRoles() bool {
|
||||||
|
_, ok := o.GetRolesOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRoles gets a reference to the given []UserRole and assigns it to the Roles field.
|
||||||
|
func (o *CreateUserRequestPayload) SetRoles(v CreateUserRequestPayloadGetRolesRetType) {
|
||||||
|
setCreateUserRequestPayloadGetRolesAttributeType(&o.Roles, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateUserRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateUserRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateUserRequestPayloadGetRolesAttributeTypeOk(o.Roles); ok {
|
||||||
|
toSerialize["Roles"] = 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 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
306
pkg/postgresflexalpha/model_create_user_response.go
Normal file
306
pkg/postgresflexalpha/model_create_user_response.go
Normal file
|
|
@ -0,0 +1,306 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &CreateUserResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for connectionString
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateUserResponseGetConnectionStringAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateUserResponseGetConnectionStringAttributeTypeOk(arg CreateUserResponseGetConnectionStringAttributeType) (ret CreateUserResponseGetConnectionStringRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateUserResponseGetConnectionStringAttributeType(arg *CreateUserResponseGetConnectionStringAttributeType, val CreateUserResponseGetConnectionStringRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateUserResponseGetConnectionStringArgType = string
|
||||||
|
type CreateUserResponseGetConnectionStringRetType = 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 name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type CreateUserResponseGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getCreateUserResponseGetNameAttributeTypeOk(arg CreateUserResponseGetNameAttributeType) (ret CreateUserResponseGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setCreateUserResponseGetNameAttributeType(arg *CreateUserResponseGetNameAttributeType, val CreateUserResponseGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type CreateUserResponseGetNameArgType = string
|
||||||
|
type CreateUserResponseGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
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 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
|
||||||
|
|
||||||
|
// CreateUserResponse struct for CreateUserResponse
|
||||||
|
type CreateUserResponse struct {
|
||||||
|
// The connection string for the user to the instance.
|
||||||
|
// REQUIRED
|
||||||
|
ConnectionString CreateUserResponseGetConnectionStringAttributeType `json:"connectionString" required:"true"`
|
||||||
|
// The ID of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Id CreateUserResponseGetIdAttributeType `json:"id" required:"true"`
|
||||||
|
// The name of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Name CreateUserResponseGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The password for the user.
|
||||||
|
// REQUIRED
|
||||||
|
Password CreateUserResponseGetPasswordAttributeType `json:"password" required:"true"`
|
||||||
|
// The current status of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Status CreateUserResponseGetStatusAttributeType `json:"status" 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(connectionString CreateUserResponseGetConnectionStringArgType, id CreateUserResponseGetIdArgType, name CreateUserResponseGetNameArgType, password CreateUserResponseGetPasswordArgType, status CreateUserResponseGetStatusArgType) *CreateUserResponse {
|
||||||
|
this := CreateUserResponse{}
|
||||||
|
setCreateUserResponseGetConnectionStringAttributeType(&this.ConnectionString, connectionString)
|
||||||
|
setCreateUserResponseGetIdAttributeType(&this.Id, id)
|
||||||
|
setCreateUserResponseGetNameAttributeType(&this.Name, name)
|
||||||
|
setCreateUserResponseGetPasswordAttributeType(&this.Password, password)
|
||||||
|
setCreateUserResponseGetStatusAttributeType(&this.Status, status)
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConnectionString returns the ConnectionString field value
|
||||||
|
func (o *CreateUserResponse) GetConnectionString() (ret CreateUserResponseGetConnectionStringRetType) {
|
||||||
|
ret, _ = o.GetConnectionStringOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConnectionStringOk returns a tuple with the ConnectionString field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *CreateUserResponse) GetConnectionStringOk() (ret CreateUserResponseGetConnectionStringRetType, ok bool) {
|
||||||
|
return getCreateUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetConnectionString sets field value
|
||||||
|
func (o *CreateUserResponse) SetConnectionString(v CreateUserResponseGetConnectionStringRetType) {
|
||||||
|
setCreateUserResponseGetConnectionStringAttributeType(&o.ConnectionString, 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *CreateUserResponse) GetName() (ret CreateUserResponseGetNameRetType) {
|
||||||
|
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 *CreateUserResponse) GetNameOk() (ret CreateUserResponseGetNameRetType, ok bool) {
|
||||||
|
return getCreateUserResponseGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *CreateUserResponse) SetName(v CreateUserResponseGetNameRetType) {
|
||||||
|
setCreateUserResponseGetNameAttributeType(&o.Name, 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o CreateUserResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getCreateUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString); ok {
|
||||||
|
toSerialize["ConnectionString"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateUserResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||||
|
toSerialize["Id"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateUserResponseGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateUserResponseGetPasswordAttributeTypeOk(o.Password); ok {
|
||||||
|
toSerialize["Password"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getCreateUserResponseGetStatusAttributeTypeOk(o.Status); ok {
|
||||||
|
toSerialize["Status"] = 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/postgresflexalpha/model_create_user_response_test.go
Normal file
11
pkg/postgresflexalpha/model_create_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
171
pkg/postgresflexalpha/model_database_roles.go
Normal file
171
pkg/postgresflexalpha/model_database_roles.go
Normal file
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_database_roles_test.go
Normal file
11
pkg/postgresflexalpha/model_database_roles_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
131
pkg/postgresflexalpha/model_database_sort.go
Normal file
131
pkg/postgresflexalpha/model_database_sort.go
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_database_sort_test.go
Normal file
11
pkg/postgresflexalpha/model_database_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
262
pkg/postgresflexalpha/model_error.go
Normal file
262
pkg/postgresflexalpha/model_error.go
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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"`
|
||||||
|
// More detailed information about the error.
|
||||||
|
// REQUIRED
|
||||||
|
Message ErrorGetMessageAttributeType `json:"message" required:"true"`
|
||||||
|
// The trace id of the request.
|
||||||
|
// REQUIRED
|
||||||
|
TraceId ErrorGetTraceIdAttributeType `json:"traceId" required:"true"`
|
||||||
|
// Describes in which state the api was when the error happened.
|
||||||
|
// REQUIRED
|
||||||
|
Type ErrorGetTypeAttributeType `json:"type" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_error_test.go
Normal file
11
pkg/postgresflexalpha/model_error_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
147
pkg/postgresflexalpha/model_flavor_sort.go
Normal file
147
pkg/postgresflexalpha/model_flavor_sort.go
Normal file
|
|
@ -0,0 +1,147 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_flavor_sort_test.go
Normal file
11
pkg/postgresflexalpha/model_flavor_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
@ -0,0 +1,214 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
350
pkg/postgresflexalpha/model_get_backup_response.go
Normal file
350
pkg/postgresflexalpha/model_get_backup_response.go
Normal file
|
|
@ -0,0 +1,350 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &GetBackupResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for completionTime
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetBackupResponseGetCompletionTimeAttributeType = *string
|
||||||
|
|
||||||
|
func getGetBackupResponseGetCompletionTimeAttributeTypeOk(arg GetBackupResponseGetCompletionTimeAttributeType) (ret GetBackupResponseGetCompletionTimeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetBackupResponseGetCompletionTimeAttributeType(arg *GetBackupResponseGetCompletionTimeAttributeType, val GetBackupResponseGetCompletionTimeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetBackupResponseGetCompletionTimeArgType = string
|
||||||
|
type GetBackupResponseGetCompletionTimeRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for id
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
type GetBackupResponseGetIdAttributeType = *int64
|
||||||
|
type GetBackupResponseGetIdArgType = int64
|
||||||
|
type GetBackupResponseGetIdRetType = int64
|
||||||
|
|
||||||
|
func getGetBackupResponseGetIdAttributeTypeOk(arg GetBackupResponseGetIdAttributeType) (ret GetBackupResponseGetIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetBackupResponseGetIdAttributeType(arg *GetBackupResponseGetIdAttributeType, val GetBackupResponseGetIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetBackupResponseGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getGetBackupResponseGetNameAttributeTypeOk(arg GetBackupResponseGetNameAttributeType) (ret GetBackupResponseGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetBackupResponseGetNameAttributeType(arg *GetBackupResponseGetNameAttributeType, val GetBackupResponseGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetBackupResponseGetNameArgType = string
|
||||||
|
type GetBackupResponseGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for retainedUntil
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetBackupResponseGetRetainedUntilAttributeType = *string
|
||||||
|
|
||||||
|
func getGetBackupResponseGetRetainedUntilAttributeTypeOk(arg GetBackupResponseGetRetainedUntilAttributeType) (ret GetBackupResponseGetRetainedUntilRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetBackupResponseGetRetainedUntilAttributeType(arg *GetBackupResponseGetRetainedUntilAttributeType, val GetBackupResponseGetRetainedUntilRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetBackupResponseGetRetainedUntilArgType = string
|
||||||
|
type GetBackupResponseGetRetainedUntilRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for size
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
type GetBackupResponseGetSizeAttributeType = *int64
|
||||||
|
type GetBackupResponseGetSizeArgType = int64
|
||||||
|
type GetBackupResponseGetSizeRetType = int64
|
||||||
|
|
||||||
|
func getGetBackupResponseGetSizeAttributeTypeOk(arg GetBackupResponseGetSizeAttributeType) (ret GetBackupResponseGetSizeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetBackupResponseGetSizeAttributeType(arg *GetBackupResponseGetSizeAttributeType, val GetBackupResponseGetSizeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for type
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetBackupResponseGetTypeAttributeType = *string
|
||||||
|
|
||||||
|
func getGetBackupResponseGetTypeAttributeTypeOk(arg GetBackupResponseGetTypeAttributeType) (ret GetBackupResponseGetTypeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetBackupResponseGetTypeAttributeType(arg *GetBackupResponseGetTypeAttributeType, val GetBackupResponseGetTypeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetBackupResponseGetTypeArgType = string
|
||||||
|
type GetBackupResponseGetTypeRetType = string
|
||||||
|
|
||||||
|
// GetBackupResponse struct for GetBackupResponse
|
||||||
|
type GetBackupResponse struct {
|
||||||
|
// The time when the backup was completed in RFC3339 format.
|
||||||
|
// REQUIRED
|
||||||
|
CompletionTime GetBackupResponseGetCompletionTimeAttributeType `json:"completionTime" required:"true"`
|
||||||
|
// The ID of the backup.
|
||||||
|
// REQUIRED
|
||||||
|
Id GetBackupResponseGetIdAttributeType `json:"id" required:"true"`
|
||||||
|
// The name of the backup.
|
||||||
|
// REQUIRED
|
||||||
|
Name GetBackupResponseGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The time until the backup will be retained.
|
||||||
|
// REQUIRED
|
||||||
|
RetainedUntil GetBackupResponseGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"`
|
||||||
|
// The size of the backup in bytes.
|
||||||
|
// REQUIRED
|
||||||
|
Size GetBackupResponseGetSizeAttributeType `json:"size" required:"true"`
|
||||||
|
// The type of the backup, which can be automated or manual triggered.
|
||||||
|
// REQUIRED
|
||||||
|
Type GetBackupResponseGetTypeAttributeType `json:"type" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _GetBackupResponse GetBackupResponse
|
||||||
|
|
||||||
|
// NewGetBackupResponse instantiates a new GetBackupResponse object
|
||||||
|
// This constructor will assign default values to properties that have it defined,
|
||||||
|
// and makes sure properties required by API are set, but the set of arguments
|
||||||
|
// will change when the set of required properties is changed
|
||||||
|
func NewGetBackupResponse(completionTime GetBackupResponseGetCompletionTimeArgType, id GetBackupResponseGetIdArgType, name GetBackupResponseGetNameArgType, retainedUntil GetBackupResponseGetRetainedUntilArgType, size GetBackupResponseGetSizeArgType, types GetBackupResponseGetTypeArgType) *GetBackupResponse {
|
||||||
|
this := GetBackupResponse{}
|
||||||
|
setGetBackupResponseGetCompletionTimeAttributeType(&this.CompletionTime, completionTime)
|
||||||
|
setGetBackupResponseGetIdAttributeType(&this.Id, id)
|
||||||
|
setGetBackupResponseGetNameAttributeType(&this.Name, name)
|
||||||
|
setGetBackupResponseGetRetainedUntilAttributeType(&this.RetainedUntil, retainedUntil)
|
||||||
|
setGetBackupResponseGetSizeAttributeType(&this.Size, size)
|
||||||
|
setGetBackupResponseGetTypeAttributeType(&this.Type, types)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse object
|
||||||
|
// This constructor will only assign default values to properties that have it defined,
|
||||||
|
// but it doesn't guarantee that properties required by API are set
|
||||||
|
func NewGetBackupResponseWithDefaults() *GetBackupResponse {
|
||||||
|
this := GetBackupResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCompletionTime returns the CompletionTime field value
|
||||||
|
func (o *GetBackupResponse) GetCompletionTime() (ret GetBackupResponseGetCompletionTimeRetType) {
|
||||||
|
ret, _ = o.GetCompletionTimeOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetCompletionTimeOk returns a tuple with the CompletionTime field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetBackupResponse) GetCompletionTimeOk() (ret GetBackupResponseGetCompletionTimeRetType, ok bool) {
|
||||||
|
return getGetBackupResponseGetCompletionTimeAttributeTypeOk(o.CompletionTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetCompletionTime sets field value
|
||||||
|
func (o *GetBackupResponse) SetCompletionTime(v GetBackupResponseGetCompletionTimeRetType) {
|
||||||
|
setGetBackupResponseGetCompletionTimeAttributeType(&o.CompletionTime, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetId returns the Id field value
|
||||||
|
func (o *GetBackupResponse) GetId() (ret GetBackupResponseGetIdRetType) {
|
||||||
|
ret, _ = o.GetIdOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetIdOk returns a tuple with the Id field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetBackupResponse) GetIdOk() (ret GetBackupResponseGetIdRetType, ok bool) {
|
||||||
|
return getGetBackupResponseGetIdAttributeTypeOk(o.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetId sets field value
|
||||||
|
func (o *GetBackupResponse) SetId(v GetBackupResponseGetIdRetType) {
|
||||||
|
setGetBackupResponseGetIdAttributeType(&o.Id, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *GetBackupResponse) GetName() (ret GetBackupResponseGetNameRetType) {
|
||||||
|
ret, _ = o.GetNameOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetBackupResponse) GetNameOk() (ret GetBackupResponseGetNameRetType, ok bool) {
|
||||||
|
return getGetBackupResponseGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *GetBackupResponse) SetName(v GetBackupResponseGetNameRetType) {
|
||||||
|
setGetBackupResponseGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRetainedUntil returns the RetainedUntil field value
|
||||||
|
func (o *GetBackupResponse) GetRetainedUntil() (ret GetBackupResponseGetRetainedUntilRetType) {
|
||||||
|
ret, _ = o.GetRetainedUntilOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRetainedUntilOk returns a tuple with the RetainedUntil field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetBackupResponse) GetRetainedUntilOk() (ret GetBackupResponseGetRetainedUntilRetType, ok bool) {
|
||||||
|
return getGetBackupResponseGetRetainedUntilAttributeTypeOk(o.RetainedUntil)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRetainedUntil sets field value
|
||||||
|
func (o *GetBackupResponse) SetRetainedUntil(v GetBackupResponseGetRetainedUntilRetType) {
|
||||||
|
setGetBackupResponseGetRetainedUntilAttributeType(&o.RetainedUntil, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSize returns the Size field value
|
||||||
|
func (o *GetBackupResponse) GetSize() (ret GetBackupResponseGetSizeRetType) {
|
||||||
|
ret, _ = o.GetSizeOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSizeOk returns a tuple with the Size field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetBackupResponse) GetSizeOk() (ret GetBackupResponseGetSizeRetType, ok bool) {
|
||||||
|
return getGetBackupResponseGetSizeAttributeTypeOk(o.Size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSize sets field value
|
||||||
|
func (o *GetBackupResponse) SetSize(v GetBackupResponseGetSizeRetType) {
|
||||||
|
setGetBackupResponseGetSizeAttributeType(&o.Size, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetType returns the Type field value
|
||||||
|
func (o *GetBackupResponse) GetType() (ret GetBackupResponseGetTypeRetType) {
|
||||||
|
ret, _ = o.GetTypeOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetTypeOk returns a tuple with the Type field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetBackupResponse) GetTypeOk() (ret GetBackupResponseGetTypeRetType, ok bool) {
|
||||||
|
return getGetBackupResponseGetTypeAttributeTypeOk(o.Type)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetType sets field value
|
||||||
|
func (o *GetBackupResponse) SetType(v GetBackupResponseGetTypeRetType) {
|
||||||
|
setGetBackupResponseGetTypeAttributeType(&o.Type, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o GetBackupResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getGetBackupResponseGetCompletionTimeAttributeTypeOk(o.CompletionTime); ok {
|
||||||
|
toSerialize["CompletionTime"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetBackupResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||||
|
toSerialize["Id"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetBackupResponseGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetBackupResponseGetRetainedUntilAttributeTypeOk(o.RetainedUntil); ok {
|
||||||
|
toSerialize["RetainedUntil"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetBackupResponseGetSizeAttributeTypeOk(o.Size); ok {
|
||||||
|
toSerialize["Size"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetBackupResponseGetTypeAttributeTypeOk(o.Type); ok {
|
||||||
|
toSerialize["Type"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableGetBackupResponse struct {
|
||||||
|
value *GetBackupResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetBackupResponse) Get() *GetBackupResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetBackupResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetBackupResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse {
|
||||||
|
return &NullableGetBackupResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_get_backup_response_test.go
Normal file
11
pkg/postgresflexalpha/model_get_backup_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
126
pkg/postgresflexalpha/model_get_collations_response.go
Normal file
126
pkg/postgresflexalpha/model_get_collations_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 = *[]string
|
||||||
|
type GetCollationsResponseGetCollationsArgType = []string
|
||||||
|
type GetCollationsResponseGetCollationsRetType = []string
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_get_collations_response_test.go
Normal file
11
pkg/postgresflexalpha/model_get_collations_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
169
pkg/postgresflexalpha/model_get_flavors_response.go
Normal file
169
pkg/postgresflexalpha/model_get_flavors_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_get_flavors_response_test.go
Normal file
11
pkg/postgresflexalpha/model_get_flavors_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
569
pkg/postgresflexalpha/model_get_instance_response.go
Normal file
569
pkg/postgresflexalpha/model_get_instance_response.go
Normal file
|
|
@ -0,0 +1,569 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 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 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetInstanceResponseGetVersionAttributeType = *string
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetInstanceResponseGetVersionArgType = string
|
||||||
|
type GetInstanceResponseGetVersionRetType = string
|
||||||
|
|
||||||
|
// 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"`
|
||||||
|
// 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
|
||||||
|
Replicas GetInstanceResponseGetReplicasAttributeType `json:"replicas" required:"true"`
|
||||||
|
// How long backups are retained. The value can only be between 32 and 365 days.
|
||||||
|
// 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"`
|
||||||
|
// The Postgres version used for the instance. See [Versions Endpoint](/documentation/postgres-flex-service/version/v3alpha1#tag/Version) for supported version parameters.
|
||||||
|
// 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, flavorId GetInstanceResponseGetFlavorIdArgType, id GetInstanceResponseGetIdArgType, isDeletable GetInstanceResponsegetIsDeletableArgType, name GetInstanceResponseGetNameArgType, replicas GetInstanceResponseGetReplicasArgType, retentionDays GetInstanceResponseGetRetentionDaysArgType, status GetInstanceResponseGetStatusArgType, storage GetInstanceResponseGetStorageArgType, version GetInstanceResponseGetVersionArgType) *GetInstanceResponse {
|
||||||
|
this := GetInstanceResponse{}
|
||||||
|
setGetInstanceResponseGetAclAttributeType(&this.Acl, acl)
|
||||||
|
setGetInstanceResponseGetBackupScheduleAttributeType(&this.BackupSchedule, backupSchedule)
|
||||||
|
setGetInstanceResponseGetFlavorIdAttributeType(&this.FlavorId, flavorId)
|
||||||
|
setGetInstanceResponseGetIdAttributeType(&this.Id, id)
|
||||||
|
setGetInstanceResponsegetIsDeletableAttributeType(&this.IsDeletable, isDeletable)
|
||||||
|
setGetInstanceResponseGetNameAttributeType(&this.Name, name)
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 := 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 := 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/postgresflexalpha/model_get_instance_response_test.go
Normal file
11
pkg/postgresflexalpha/model_get_instance_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
395
pkg/postgresflexalpha/model_get_user_response.go
Normal file
395
pkg/postgresflexalpha/model_get_user_response.go
Normal file
|
|
@ -0,0 +1,395 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &GetUserResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for connectionString
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetUserResponseGetConnectionStringAttributeType = *string
|
||||||
|
|
||||||
|
func getGetUserResponseGetConnectionStringAttributeTypeOk(arg GetUserResponseGetConnectionStringAttributeType) (ret GetUserResponseGetConnectionStringRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetUserResponseGetConnectionStringAttributeType(arg *GetUserResponseGetConnectionStringAttributeType, val GetUserResponseGetConnectionStringRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetUserResponseGetConnectionStringArgType = string
|
||||||
|
type GetUserResponseGetConnectionStringRetType = 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 name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type GetUserResponseGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getGetUserResponseGetNameAttributeTypeOk(arg GetUserResponseGetNameAttributeType) (ret GetUserResponseGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setGetUserResponseGetNameAttributeType(arg *GetUserResponseGetNameAttributeType, val GetUserResponseGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetUserResponseGetNameArgType = string
|
||||||
|
type GetUserResponseGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
// GetUserResponse struct for GetUserResponse
|
||||||
|
type GetUserResponse struct {
|
||||||
|
// The connection string for the user to the instance.
|
||||||
|
// REQUIRED
|
||||||
|
ConnectionString GetUserResponseGetConnectionStringAttributeType `json:"connectionString" 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 name of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Name GetUserResponseGetNameAttributeType `json:"name" 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"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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(connectionString GetUserResponseGetConnectionStringArgType, host GetUserResponseGetHostArgType, id GetUserResponseGetIdArgType, name GetUserResponseGetNameArgType, port GetUserResponseGetPortArgType, roles GetUserResponseGetRolesArgType, status GetUserResponseGetStatusArgType) *GetUserResponse {
|
||||||
|
this := GetUserResponse{}
|
||||||
|
setGetUserResponseGetConnectionStringAttributeType(&this.ConnectionString, connectionString)
|
||||||
|
setGetUserResponseGetHostAttributeType(&this.Host, host)
|
||||||
|
setGetUserResponseGetIdAttributeType(&this.Id, id)
|
||||||
|
setGetUserResponseGetNameAttributeType(&this.Name, name)
|
||||||
|
setGetUserResponseGetPortAttributeType(&this.Port, port)
|
||||||
|
setGetUserResponseGetRolesAttributeType(&this.Roles, roles)
|
||||||
|
setGetUserResponseGetStatusAttributeType(&this.Status, status)
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConnectionString returns the ConnectionString field value
|
||||||
|
func (o *GetUserResponse) GetConnectionString() (ret GetUserResponseGetConnectionStringRetType) {
|
||||||
|
ret, _ = o.GetConnectionStringOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConnectionStringOk returns a tuple with the ConnectionString field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *GetUserResponse) GetConnectionStringOk() (ret GetUserResponseGetConnectionStringRetType, ok bool) {
|
||||||
|
return getGetUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetConnectionString sets field value
|
||||||
|
func (o *GetUserResponse) SetConnectionString(v GetUserResponseGetConnectionStringRetType) {
|
||||||
|
setGetUserResponseGetConnectionStringAttributeType(&o.ConnectionString, 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *GetUserResponse) GetName() (ret GetUserResponseGetNameRetType) {
|
||||||
|
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 *GetUserResponse) GetNameOk() (ret GetUserResponseGetNameRetType, ok bool) {
|
||||||
|
return getGetUserResponseGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *GetUserResponse) SetName(v GetUserResponseGetNameRetType) {
|
||||||
|
setGetUserResponseGetNameAttributeType(&o.Name, 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o GetUserResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getGetUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString); ok {
|
||||||
|
toSerialize["ConnectionString"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetUserResponseGetHostAttributeTypeOk(o.Host); ok {
|
||||||
|
toSerialize["Host"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetUserResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||||
|
toSerialize["Id"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getGetUserResponseGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = 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
|
||||||
|
}
|
||||||
|
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/postgresflexalpha/model_get_user_response_test.go
Normal file
11
pkg/postgresflexalpha/model_get_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
126
pkg/postgresflexalpha/model_get_versions_response.go
Normal file
126
pkg/postgresflexalpha/model_get_versions_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 postgres 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/postgresflexalpha/model_get_versions_response_test.go
Normal file
11
pkg/postgresflexalpha/model_get_versions_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
261
pkg/postgresflexalpha/model_instance_encryption.go
Normal file
261
pkg/postgresflexalpha/model_instance_encryption.go
Normal file
|
|
@ -0,0 +1,261 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 The configuration for instance's volume and backup storage encryption. ⚠️ **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 InstanceEncryption struct {
|
||||||
|
// The encryption-key key identifier
|
||||||
|
// REQUIRED
|
||||||
|
KekKeyId InstanceEncryptionGetKekKeyIdAttributeType `json:"kekKeyId" required:"true"`
|
||||||
|
// The encryption-key keyring identifier
|
||||||
|
// REQUIRED
|
||||||
|
KekKeyRingId InstanceEncryptionGetKekKeyRingIdAttributeType `json:"kekKeyRingId" required:"true"`
|
||||||
|
// The encryption-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/postgresflexalpha/model_instance_encryption_test.go
Normal file
11
pkg/postgresflexalpha/model_instance_encryption_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
233
pkg/postgresflexalpha/model_instance_network.go
Normal file
233
pkg/postgresflexalpha/model_instance_network.go
Normal file
|
|
@ -0,0 +1,233 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the InstanceNetwork type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &InstanceNetwork{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for accessScope
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
// InstanceNetworkAccessScope The access scope of the instance. It defines if the instance is public or airgapped.
|
||||||
|
// value type for enums
|
||||||
|
type InstanceNetworkAccessScope string
|
||||||
|
|
||||||
|
// List of AccessScope
|
||||||
|
const (
|
||||||
|
INSTANCENETWORKACCESS_SCOPE_PUBLIC InstanceNetworkAccessScope = "PUBLIC"
|
||||||
|
INSTANCENETWORKACCESS_SCOPE_SNA InstanceNetworkAccessScope = "SNA"
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of InstanceNetwork enum
|
||||||
|
var AllowedInstanceNetworkAccessScopeEnumValues = []InstanceNetworkAccessScope{
|
||||||
|
"PUBLIC",
|
||||||
|
"SNA",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *InstanceNetworkAccessScope) UnmarshalJSON(src []byte) error {
|
||||||
|
// use a type alias to prevent infinite recursion during unmarshal,
|
||||||
|
// see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers
|
||||||
|
type TmpJson InstanceNetworkAccessScope
|
||||||
|
var value TmpJson
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue TmpJson
|
||||||
|
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 InstanceNetwork", 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 InstanceNetworkAccessScope) (*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 AccessScopeAccessScope 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
// InstanceNetwork The network configuration 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 InstanceNetwork struct {
|
||||||
|
// The access scope of the instance. It defines if the instance is public or airgapped.
|
||||||
|
// REQUIRED
|
||||||
|
AccessScope InstanceNetworkGetAccessScopeAttributeType `json:"accessScope" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _InstanceNetwork InstanceNetwork
|
||||||
|
|
||||||
|
// 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(accessScope InstanceNetworkGetAccessScopeArgType) *InstanceNetwork {
|
||||||
|
this := InstanceNetwork{}
|
||||||
|
setInstanceNetworkGetAccessScopeAttributeType(&this.AccessScope, accessScope)
|
||||||
|
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 = "PUBLIC"
|
||||||
|
this.AccessScope = &accessScope
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAccessScope returns the AccessScope field value
|
||||||
|
func (o *InstanceNetwork) GetAccessScope() (ret InstanceNetworkGetAccessScopeRetType) {
|
||||||
|
ret, _ = o.GetAccessScopeOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetAccessScopeOk returns a tuple with the AccessScope field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *InstanceNetwork) GetAccessScopeOk() (ret InstanceNetworkGetAccessScopeRetType, ok bool) {
|
||||||
|
return getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetAccessScope sets field value
|
||||||
|
func (o *InstanceNetwork) SetAccessScope(v InstanceNetworkGetAccessScopeRetType) {
|
||||||
|
setInstanceNetworkGetAccessScopeAttributeType(&o.AccessScope, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o InstanceNetwork) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getInstanceNetworkGetAccessScopeAttributeTypeOk(o.AccessScope); ok {
|
||||||
|
toSerialize["AccessScope"] = 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)
|
||||||
|
}
|
||||||
58
pkg/postgresflexalpha/model_instance_network_test.go
Normal file
58
pkg/postgresflexalpha/model_instance_network_test.go
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
// isEnum
|
||||||
|
|
||||||
|
func TestInstanceNetworkAccessScope_UnmarshalJSON(t *testing.T) {
|
||||||
|
type args struct {
|
||||||
|
src []byte
|
||||||
|
}
|
||||||
|
tests := []struct {
|
||||||
|
name string
|
||||||
|
args args
|
||||||
|
wantErr bool
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 1`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"PUBLIC"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: `success - possible enum value no. 2`,
|
||||||
|
args: args{
|
||||||
|
src: []byte(`"SNA"`),
|
||||||
|
},
|
||||||
|
wantErr: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "fail",
|
||||||
|
args: args{
|
||||||
|
src: []byte("\"FOOBAR\""),
|
||||||
|
},
|
||||||
|
wantErr: true,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
for _, tt := range tests {
|
||||||
|
t.Run(tt.name, func(t *testing.T) {
|
||||||
|
v := InstanceNetworkAccessScope("")
|
||||||
|
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||||
|
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
131
pkg/postgresflexalpha/model_instance_sort.go
Normal file
131
pkg/postgresflexalpha/model_instance_sort.go
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_instance_sort_test.go
Normal file
11
pkg/postgresflexalpha/model_instance_sort_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
172
pkg/postgresflexalpha/model_instance_storage_range.go
Normal file
172
pkg/postgresflexalpha/model_instance_storage_range.go
Normal file
|
|
@ -0,0 +1,172 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the InstanceStorageRange type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &InstanceStorageRange{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for max
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isInteger
|
||||||
|
type InstanceStorageRangeGetMaxAttributeType = *int64
|
||||||
|
type InstanceStorageRangeGetMaxArgType = int64
|
||||||
|
type InstanceStorageRangeGetMaxRetType = int64
|
||||||
|
|
||||||
|
func getInstanceStorageRangeGetMaxAttributeTypeOk(arg InstanceStorageRangeGetMaxAttributeType) (ret InstanceStorageRangeGetMaxRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setInstanceStorageRangeGetMaxAttributeType(arg *InstanceStorageRangeGetMaxAttributeType, val InstanceStorageRangeGetMaxRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for min
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isInteger
|
||||||
|
type InstanceStorageRangeGetMinAttributeType = *int64
|
||||||
|
type InstanceStorageRangeGetMinArgType = int64
|
||||||
|
type InstanceStorageRangeGetMinRetType = int64
|
||||||
|
|
||||||
|
func getInstanceStorageRangeGetMinAttributeTypeOk(arg InstanceStorageRangeGetMinAttributeType) (ret InstanceStorageRangeGetMinRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setInstanceStorageRangeGetMinAttributeType(arg *InstanceStorageRangeGetMinAttributeType, val InstanceStorageRangeGetMinRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// InstanceStorageRange Contains the minimum and maximum storage space.
|
||||||
|
type InstanceStorageRange struct {
|
||||||
|
// The maximum available amount of storage.
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
// REQUIRED
|
||||||
|
Max InstanceStorageRangeGetMaxAttributeType `json:"max" required:"true"`
|
||||||
|
// The minimum available amount of storage.
|
||||||
|
// Can be cast to int32 without loss of precision.
|
||||||
|
// REQUIRED
|
||||||
|
Min InstanceStorageRangeGetMinAttributeType `json:"min" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _InstanceStorageRange InstanceStorageRange
|
||||||
|
|
||||||
|
// NewInstanceStorageRange instantiates a new InstanceStorageRange 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 NewInstanceStorageRange(max InstanceStorageRangeGetMaxArgType, min InstanceStorageRangeGetMinArgType) *InstanceStorageRange {
|
||||||
|
this := InstanceStorageRange{}
|
||||||
|
setInstanceStorageRangeGetMaxAttributeType(&this.Max, max)
|
||||||
|
setInstanceStorageRangeGetMinAttributeType(&this.Min, min)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewInstanceStorageRangeWithDefaults instantiates a new InstanceStorageRange 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 NewInstanceStorageRangeWithDefaults() *InstanceStorageRange {
|
||||||
|
this := InstanceStorageRange{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMax returns the Max field value
|
||||||
|
func (o *InstanceStorageRange) GetMax() (ret InstanceStorageRangeGetMaxRetType) {
|
||||||
|
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 *InstanceStorageRange) GetMaxOk() (ret InstanceStorageRangeGetMaxRetType, ok bool) {
|
||||||
|
return getInstanceStorageRangeGetMaxAttributeTypeOk(o.Max)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMax sets field value
|
||||||
|
func (o *InstanceStorageRange) SetMax(v InstanceStorageRangeGetMaxRetType) {
|
||||||
|
setInstanceStorageRangeGetMaxAttributeType(&o.Max, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetMin returns the Min field value
|
||||||
|
func (o *InstanceStorageRange) GetMin() (ret InstanceStorageRangeGetMinRetType) {
|
||||||
|
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 *InstanceStorageRange) GetMinOk() (ret InstanceStorageRangeGetMinRetType, ok bool) {
|
||||||
|
return getInstanceStorageRangeGetMinAttributeTypeOk(o.Min)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetMin sets field value
|
||||||
|
func (o *InstanceStorageRange) SetMin(v InstanceStorageRangeGetMinRetType) {
|
||||||
|
setInstanceStorageRangeGetMinAttributeType(&o.Min, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o InstanceStorageRange) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getInstanceStorageRangeGetMaxAttributeTypeOk(o.Max); ok {
|
||||||
|
toSerialize["Max"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getInstanceStorageRangeGetMinAttributeTypeOk(o.Min); ok {
|
||||||
|
toSerialize["Min"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableInstanceStorageRange struct {
|
||||||
|
value *InstanceStorageRange
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableInstanceStorageRange) Get() *InstanceStorageRange {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableInstanceStorageRange) Set(val *InstanceStorageRange) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableInstanceStorageRange) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableInstanceStorageRange) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableInstanceStorageRange(val *InstanceStorageRange) *NullableInstanceStorageRange {
|
||||||
|
return &NullableInstanceStorageRange{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableInstanceStorageRange) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableInstanceStorageRange) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_instance_storage_range_test.go
Normal file
11
pkg/postgresflexalpha/model_instance_storage_range_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
350
pkg/postgresflexalpha/model_list_backup.go
Normal file
350
pkg/postgresflexalpha/model_list_backup.go
Normal file
|
|
@ -0,0 +1,350 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the ListBackup type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &ListBackup{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for completionTime
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListBackupGetCompletionTimeAttributeType = *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
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListBackupGetCompletionTimeArgType = string
|
||||||
|
type ListBackupGetCompletionTimeRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for id
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListBackupGetNameAttributeType = *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
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListBackupGetNameArgType = string
|
||||||
|
type ListBackupGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for retainedUntil
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListBackupGetRetainedUntilAttributeType = *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
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListBackupGetRetainedUntilArgType = string
|
||||||
|
type ListBackupGetRetainedUntilRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for size
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListBackupGetTypeAttributeType = *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
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListBackupGetTypeArgType = string
|
||||||
|
type ListBackupGetTypeRetType = string
|
||||||
|
|
||||||
|
// ListBackup struct for ListBackup
|
||||||
|
type ListBackup struct {
|
||||||
|
// The time when the backup was completed in RFC3339 format.
|
||||||
|
// REQUIRED
|
||||||
|
CompletionTime ListBackupGetCompletionTimeAttributeType `json:"completionTime" required:"true"`
|
||||||
|
// The ID of the backup.
|
||||||
|
// REQUIRED
|
||||||
|
Id ListBackupGetIdAttributeType `json:"id" required:"true"`
|
||||||
|
// The name of the backup.
|
||||||
|
// REQUIRED
|
||||||
|
Name ListBackupGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The time until the backup will be retained.
|
||||||
|
// REQUIRED
|
||||||
|
RetainedUntil ListBackupGetRetainedUntilAttributeType `json:"retainedUntil" required:"true"`
|
||||||
|
// The size of the backup in bytes.
|
||||||
|
// REQUIRED
|
||||||
|
Size ListBackupGetSizeAttributeType `json:"size" required:"true"`
|
||||||
|
// The type of the backup, which can be automated or manual triggered.
|
||||||
|
// 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/postgresflexalpha/model_list_backup_response.go
Normal file
169
pkg/postgresflexalpha/model_list_backup_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 = *[]ListBackup
|
||||||
|
type ListBackupResponseGetBackupsArgType = []ListBackup
|
||||||
|
type ListBackupResponseGetBackupsRetType = []ListBackup
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_list_backup_response_test.go
Normal file
11
pkg/postgresflexalpha/model_list_backup_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
11
pkg/postgresflexalpha/model_list_backup_test.go
Normal file
11
pkg/postgresflexalpha/model_list_backup_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
261
pkg/postgresflexalpha/model_list_database.go
Normal file
261
pkg/postgresflexalpha/model_list_database.go
Normal file
|
|
@ -0,0 +1,261 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 data 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/postgresflexalpha/model_list_database_test.go
Normal file
11
pkg/postgresflexalpha/model_list_database_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
169
pkg/postgresflexalpha/model_list_databases_response.go
Normal file
169
pkg/postgresflexalpha/model_list_databases_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_list_databases_response_test.go
Normal file
11
pkg/postgresflexalpha/model_list_databases_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
439
pkg/postgresflexalpha/model_list_flavors.go
Normal file
439
pkg/postgresflexalpha/model_list_flavors.go
Normal file
|
|
@ -0,0 +1,439 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 replica
|
||||||
|
// 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/postgresflexalpha/model_list_flavors_test.go
Normal file
11
pkg/postgresflexalpha/model_list_flavors_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
259
pkg/postgresflexalpha/model_list_instance.go
Normal file
259
pkg/postgresflexalpha/model_list_instance.go
Normal file
|
|
@ -0,0 +1,259 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_list_instance_test.go
Normal file
11
pkg/postgresflexalpha/model_list_instance_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
169
pkg/postgresflexalpha/model_list_instances_response.go
Normal file
169
pkg/postgresflexalpha/model_list_instances_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_list_instances_response_test.go
Normal file
11
pkg/postgresflexalpha/model_list_instances_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
126
pkg/postgresflexalpha/model_list_roles_response.go
Normal file
126
pkg/postgresflexalpha/model_list_roles_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 = *[]string
|
||||||
|
type ListRolesResponseGetRolesArgType = []string
|
||||||
|
type ListRolesResponseGetRolesRetType = []string
|
||||||
|
|
||||||
|
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 all role names available in the 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/postgresflexalpha/model_list_roles_response_test.go
Normal file
11
pkg/postgresflexalpha/model_list_roles_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
216
pkg/postgresflexalpha/model_list_user.go
Normal file
216
pkg/postgresflexalpha/model_list_user.go
Normal file
|
|
@ -0,0 +1,216 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ListUserGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getListUserGetNameAttributeTypeOk(arg ListUserGetNameAttributeType) (ret ListUserGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setListUserGetNameAttributeType(arg *ListUserGetNameAttributeType, val ListUserGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListUserGetNameArgType = string
|
||||||
|
type ListUserGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
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
|
||||||
|
|
||||||
|
// ListUser struct for ListUser
|
||||||
|
type ListUser struct {
|
||||||
|
// The ID of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Id ListUserGetIdAttributeType `json:"id" required:"true"`
|
||||||
|
// The name of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Name ListUserGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The current status of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Status ListUserGetStatusAttributeType `json:"status" 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, name ListUserGetNameArgType, status ListUserGetStatusArgType) *ListUser {
|
||||||
|
this := ListUser{}
|
||||||
|
setListUserGetIdAttributeType(&this.Id, id)
|
||||||
|
setListUserGetNameAttributeType(&this.Name, name)
|
||||||
|
setListUserGetStatusAttributeType(&this.Status, status)
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *ListUser) GetName() (ret ListUserGetNameRetType) {
|
||||||
|
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 *ListUser) GetNameOk() (ret ListUserGetNameRetType, ok bool) {
|
||||||
|
return getListUserGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *ListUser) SetName(v ListUserGetNameRetType) {
|
||||||
|
setListUserGetNameAttributeType(&o.Name, 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
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 := getListUserGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getListUserGetStatusAttributeTypeOk(o.Status); ok {
|
||||||
|
toSerialize["Status"] = 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/postgresflexalpha/model_list_user_response.go
Normal file
169
pkg/postgresflexalpha/model_list_user_response.go
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_list_user_response_test.go
Normal file
11
pkg/postgresflexalpha/model_list_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
11
pkg/postgresflexalpha/model_list_user_test.go
Normal file
11
pkg/postgresflexalpha/model_list_user_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
298
pkg/postgresflexalpha/model_pagination.go
Normal file
298
pkg/postgresflexalpha/model_pagination.go
Normal file
|
|
@ -0,0 +1,298 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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"`
|
||||||
|
// REQUIRED
|
||||||
|
Size PaginationGetSizeAttributeType `json:"size" required:"true"`
|
||||||
|
// REQUIRED
|
||||||
|
Sort PaginationGetSortAttributeType `json:"sort" required:"true"`
|
||||||
|
// REQUIRED
|
||||||
|
TotalPages PaginationGetTotalPagesAttributeType `json:"totalPages" required:"true"`
|
||||||
|
// REQUIRED
|
||||||
|
TotalRows PaginationGetTotalRowsAttributeType `json:"totalRows" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
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/postgresflexalpha/model_pagination_test.go
Normal file
11
pkg/postgresflexalpha/model_pagination_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
@ -0,0 +1,216 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the PointInTimeRecoveryRequestPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &PointInTimeRecoveryRequestPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for performanceClass
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType = *string
|
||||||
|
|
||||||
|
func getPointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeTypeOk(arg PointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType) (ret PointInTimeRecoveryRequestPayloadGetPerformanceClassRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setPointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType(arg *PointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType, val PointInTimeRecoveryRequestPayloadGetPerformanceClassRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetPerformanceClassArgType = string
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetPerformanceClassRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for recoveryTime
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isDateTime
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType = *time.Time
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetRecoveryTimeArgType = time.Time
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetRecoveryTimeRetType = time.Time
|
||||||
|
|
||||||
|
func getPointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeTypeOk(arg PointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType) (ret PointInTimeRecoveryRequestPayloadGetRecoveryTimeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setPointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType(arg *PointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType, val PointInTimeRecoveryRequestPayloadGetRecoveryTimeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for size
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetSizeAttributeType = *int64
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetSizeArgType = int64
|
||||||
|
type PointInTimeRecoveryRequestPayloadGetSizeRetType = int64
|
||||||
|
|
||||||
|
func getPointInTimeRecoveryRequestPayloadGetSizeAttributeTypeOk(arg PointInTimeRecoveryRequestPayloadGetSizeAttributeType) (ret PointInTimeRecoveryRequestPayloadGetSizeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setPointInTimeRecoveryRequestPayloadGetSizeAttributeType(arg *PointInTimeRecoveryRequestPayloadGetSizeAttributeType, val PointInTimeRecoveryRequestPayloadGetSizeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// PointInTimeRecoveryRequestPayload struct for PointInTimeRecoveryRequestPayload
|
||||||
|
type PointInTimeRecoveryRequestPayload struct {
|
||||||
|
// The storage class for the storage.
|
||||||
|
// REQUIRED
|
||||||
|
PerformanceClass PointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType `json:"performanceClass" required:"true"`
|
||||||
|
// the time for the point in time recovery it will be calculated between first backup and last backup
|
||||||
|
// REQUIRED
|
||||||
|
RecoveryTime PointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType `json:"recoveryTime" required:"true"`
|
||||||
|
// The storage size in Gigabytes.
|
||||||
|
// REQUIRED
|
||||||
|
Size PointInTimeRecoveryRequestPayloadGetSizeAttributeType `json:"size" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _PointInTimeRecoveryRequestPayload PointInTimeRecoveryRequestPayload
|
||||||
|
|
||||||
|
// NewPointInTimeRecoveryRequestPayload instantiates a new PointInTimeRecoveryRequestPayload 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 NewPointInTimeRecoveryRequestPayload(performanceClass PointInTimeRecoveryRequestPayloadGetPerformanceClassArgType, recoveryTime PointInTimeRecoveryRequestPayloadGetRecoveryTimeArgType, size PointInTimeRecoveryRequestPayloadGetSizeArgType) *PointInTimeRecoveryRequestPayload {
|
||||||
|
this := PointInTimeRecoveryRequestPayload{}
|
||||||
|
setPointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType(&this.PerformanceClass, performanceClass)
|
||||||
|
setPointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType(&this.RecoveryTime, recoveryTime)
|
||||||
|
setPointInTimeRecoveryRequestPayloadGetSizeAttributeType(&this.Size, size)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewPointInTimeRecoveryRequestPayloadWithDefaults instantiates a new PointInTimeRecoveryRequestPayload 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 NewPointInTimeRecoveryRequestPayloadWithDefaults() *PointInTimeRecoveryRequestPayload {
|
||||||
|
this := PointInTimeRecoveryRequestPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPerformanceClass returns the PerformanceClass field value
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) GetPerformanceClass() (ret PointInTimeRecoveryRequestPayloadGetPerformanceClassRetType) {
|
||||||
|
ret, _ = o.GetPerformanceClassOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPerformanceClassOk returns a tuple with the PerformanceClass field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) GetPerformanceClassOk() (ret PointInTimeRecoveryRequestPayloadGetPerformanceClassRetType, ok bool) {
|
||||||
|
return getPointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPerformanceClass sets field value
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) SetPerformanceClass(v PointInTimeRecoveryRequestPayloadGetPerformanceClassRetType) {
|
||||||
|
setPointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRecoveryTime returns the RecoveryTime field value
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) GetRecoveryTime() (ret PointInTimeRecoveryRequestPayloadGetRecoveryTimeRetType) {
|
||||||
|
ret, _ = o.GetRecoveryTimeOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetRecoveryTimeOk returns a tuple with the RecoveryTime field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) GetRecoveryTimeOk() (ret PointInTimeRecoveryRequestPayloadGetRecoveryTimeRetType, ok bool) {
|
||||||
|
return getPointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeTypeOk(o.RecoveryTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetRecoveryTime sets field value
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) SetRecoveryTime(v PointInTimeRecoveryRequestPayloadGetRecoveryTimeRetType) {
|
||||||
|
setPointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeType(&o.RecoveryTime, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSize returns the Size field value
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) GetSize() (ret PointInTimeRecoveryRequestPayloadGetSizeRetType) {
|
||||||
|
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 *PointInTimeRecoveryRequestPayload) GetSizeOk() (ret PointInTimeRecoveryRequestPayloadGetSizeRetType, ok bool) {
|
||||||
|
return getPointInTimeRecoveryRequestPayloadGetSizeAttributeTypeOk(o.Size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSize sets field value
|
||||||
|
func (o *PointInTimeRecoveryRequestPayload) SetSize(v PointInTimeRecoveryRequestPayloadGetSizeRetType) {
|
||||||
|
setPointInTimeRecoveryRequestPayloadGetSizeAttributeType(&o.Size, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o PointInTimeRecoveryRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getPointInTimeRecoveryRequestPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
|
||||||
|
toSerialize["PerformanceClass"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getPointInTimeRecoveryRequestPayloadGetRecoveryTimeAttributeTypeOk(o.RecoveryTime); ok {
|
||||||
|
toSerialize["RecoveryTime"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getPointInTimeRecoveryRequestPayloadGetSizeAttributeTypeOk(o.Size); ok {
|
||||||
|
toSerialize["Size"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullablePointInTimeRecoveryRequestPayload struct {
|
||||||
|
value *PointInTimeRecoveryRequestPayload
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullablePointInTimeRecoveryRequestPayload) Get() *PointInTimeRecoveryRequestPayload {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullablePointInTimeRecoveryRequestPayload) Set(val *PointInTimeRecoveryRequestPayload) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullablePointInTimeRecoveryRequestPayload) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullablePointInTimeRecoveryRequestPayload) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullablePointInTimeRecoveryRequestPayload(val *PointInTimeRecoveryRequestPayload) *NullablePointInTimeRecoveryRequestPayload {
|
||||||
|
return &NullablePointInTimeRecoveryRequestPayload{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullablePointInTimeRecoveryRequestPayload) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullablePointInTimeRecoveryRequestPayload) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
126
pkg/postgresflexalpha/model_protect_instance_request_payload.go
Normal file
126
pkg/postgresflexalpha/model_protect_instance_request_payload.go
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
126
pkg/postgresflexalpha/model_protect_instance_response.go
Normal file
126
pkg/postgresflexalpha/model_protect_instance_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
127
pkg/postgresflexalpha/model_recovery_response.go
Normal file
127
pkg/postgresflexalpha/model_recovery_response.go
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the RecoveryResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &RecoveryResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for id
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type RecoveryResponseGetIdAttributeType = *string
|
||||||
|
|
||||||
|
func getRecoveryResponseGetIdAttributeTypeOk(arg RecoveryResponseGetIdAttributeType) (ret RecoveryResponseGetIdRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setRecoveryResponseGetIdAttributeType(arg *RecoveryResponseGetIdAttributeType, val RecoveryResponseGetIdRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type RecoveryResponseGetIdArgType = string
|
||||||
|
type RecoveryResponseGetIdRetType = string
|
||||||
|
|
||||||
|
// RecoveryResponse struct for RecoveryResponse
|
||||||
|
type RecoveryResponse struct {
|
||||||
|
// The ID of the instance.
|
||||||
|
// REQUIRED
|
||||||
|
Id RecoveryResponseGetIdAttributeType `json:"id" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _RecoveryResponse RecoveryResponse
|
||||||
|
|
||||||
|
// NewRecoveryResponse instantiates a new RecoveryResponse 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 NewRecoveryResponse(id RecoveryResponseGetIdArgType) *RecoveryResponse {
|
||||||
|
this := RecoveryResponse{}
|
||||||
|
setRecoveryResponseGetIdAttributeType(&this.Id, id)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewRecoveryResponseWithDefaults instantiates a new RecoveryResponse 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 NewRecoveryResponseWithDefaults() *RecoveryResponse {
|
||||||
|
this := RecoveryResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetId returns the Id field value
|
||||||
|
func (o *RecoveryResponse) GetId() (ret RecoveryResponseGetIdRetType) {
|
||||||
|
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 *RecoveryResponse) GetIdOk() (ret RecoveryResponseGetIdRetType, ok bool) {
|
||||||
|
return getRecoveryResponseGetIdAttributeTypeOk(o.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetId sets field value
|
||||||
|
func (o *RecoveryResponse) SetId(v RecoveryResponseGetIdRetType) {
|
||||||
|
setRecoveryResponseGetIdAttributeType(&o.Id, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o RecoveryResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getRecoveryResponseGetIdAttributeTypeOk(o.Id); ok {
|
||||||
|
toSerialize["Id"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableRecoveryResponse struct {
|
||||||
|
value *RecoveryResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableRecoveryResponse) Get() *RecoveryResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableRecoveryResponse) Set(val *RecoveryResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableRecoveryResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableRecoveryResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableRecoveryResponse(val *RecoveryResponse) *NullableRecoveryResponse {
|
||||||
|
return &NullableRecoveryResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableRecoveryResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableRecoveryResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_recovery_response_test.go
Normal file
11
pkg/postgresflexalpha/model_recovery_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
115
pkg/postgresflexalpha/model_replicas.go
Normal file
115
pkg/postgresflexalpha/model_replicas.go
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Replicas How many replicas the instance should have.
|
||||||
|
type Replicas int32
|
||||||
|
|
||||||
|
// List of replicas
|
||||||
|
const (
|
||||||
|
REPLICAS__1 Replicas = 1
|
||||||
|
REPLICAS__3 Replicas = 3
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of Replicas enum
|
||||||
|
var AllowedReplicasEnumValues = []Replicas{
|
||||||
|
1,
|
||||||
|
3,
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *Replicas) UnmarshalJSON(src []byte) error {
|
||||||
|
var value int32
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue int32
|
||||||
|
if value == zeroValue {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
enumTypeValue := Replicas(value)
|
||||||
|
for _, existing := range AllowedReplicasEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid Replicas", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewReplicasFromValue returns a pointer to a valid Replicas
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewReplicasFromValue(v int32) (*Replicas, error) {
|
||||||
|
ev := Replicas(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for Replicas: valid values are %v", v, AllowedReplicasEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v Replicas) IsValid() bool {
|
||||||
|
for _, existing := range AllowedReplicasEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to replicas value
|
||||||
|
func (v Replicas) Ptr() *Replicas {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableReplicas struct {
|
||||||
|
value *Replicas
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableReplicas) Get() *Replicas {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableReplicas) Set(val *Replicas) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableReplicas) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableReplicas) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableReplicas(val *Replicas) *NullableReplicas {
|
||||||
|
return &NullableReplicas{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableReplicas) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableReplicas) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
115
pkg/postgresflexalpha/model_replicas_opt.go
Normal file
115
pkg/postgresflexalpha/model_replicas_opt.go
Normal file
|
|
@ -0,0 +1,115 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// ReplicasOpt How many replicas the instance should have.
|
||||||
|
type ReplicasOpt int32
|
||||||
|
|
||||||
|
// List of replicas.opt
|
||||||
|
const (
|
||||||
|
REPLICASOPT__1 ReplicasOpt = 1
|
||||||
|
REPLICASOPT__3 ReplicasOpt = 3
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of ReplicasOpt enum
|
||||||
|
var AllowedReplicasOptEnumValues = []ReplicasOpt{
|
||||||
|
1,
|
||||||
|
3,
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *ReplicasOpt) UnmarshalJSON(src []byte) error {
|
||||||
|
var value int32
|
||||||
|
err := json.Unmarshal(src, &value)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
// Allow unmarshalling zero value for testing purposes
|
||||||
|
var zeroValue int32
|
||||||
|
if value == zeroValue {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
enumTypeValue := ReplicasOpt(value)
|
||||||
|
for _, existing := range AllowedReplicasOptEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid ReplicasOpt", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewReplicasOptFromValue returns a pointer to a valid ReplicasOpt
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewReplicasOptFromValue(v int32) (*ReplicasOpt, error) {
|
||||||
|
ev := ReplicasOpt(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for ReplicasOpt: valid values are %v", v, AllowedReplicasOptEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v ReplicasOpt) IsValid() bool {
|
||||||
|
for _, existing := range AllowedReplicasOptEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to replicas.opt value
|
||||||
|
func (v ReplicasOpt) Ptr() *ReplicasOpt {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableReplicasOpt struct {
|
||||||
|
value *ReplicasOpt
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableReplicasOpt) Get() *ReplicasOpt {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableReplicasOpt) Set(val *ReplicasOpt) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableReplicasOpt) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableReplicasOpt) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableReplicasOpt(val *ReplicasOpt) *NullableReplicasOpt {
|
||||||
|
return &NullableReplicasOpt{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableReplicasOpt) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableReplicasOpt) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_replicas_opt_test.go
Normal file
11
pkg/postgresflexalpha/model_replicas_opt_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
11
pkg/postgresflexalpha/model_replicas_test.go
Normal file
11
pkg/postgresflexalpha/model_replicas_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
262
pkg/postgresflexalpha/model_reset_user_response.go
Normal file
262
pkg/postgresflexalpha/model_reset_user_response.go
Normal file
|
|
@ -0,0 +1,262 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the ResetUserResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &ResetUserResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for connectionString
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ResetUserResponseGetConnectionStringAttributeType = *string
|
||||||
|
|
||||||
|
func getResetUserResponseGetConnectionStringAttributeTypeOk(arg ResetUserResponseGetConnectionStringAttributeType) (ret ResetUserResponseGetConnectionStringRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setResetUserResponseGetConnectionStringAttributeType(arg *ResetUserResponseGetConnectionStringAttributeType, val ResetUserResponseGetConnectionStringRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ResetUserResponseGetConnectionStringArgType = string
|
||||||
|
type ResetUserResponseGetConnectionStringRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ResetUserResponseGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getResetUserResponseGetNameAttributeTypeOk(arg ResetUserResponseGetNameAttributeType) (ret ResetUserResponseGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setResetUserResponseGetNameAttributeType(arg *ResetUserResponseGetNameAttributeType, val ResetUserResponseGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ResetUserResponseGetNameArgType = string
|
||||||
|
type ResetUserResponseGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for password
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ResetUserResponseGetPasswordAttributeType = *string
|
||||||
|
|
||||||
|
func getResetUserResponseGetPasswordAttributeTypeOk(arg ResetUserResponseGetPasswordAttributeType) (ret ResetUserResponseGetPasswordRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setResetUserResponseGetPasswordAttributeType(arg *ResetUserResponseGetPasswordAttributeType, val ResetUserResponseGetPasswordRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ResetUserResponseGetPasswordArgType = string
|
||||||
|
type ResetUserResponseGetPasswordRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for status
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type ResetUserResponseGetStatusAttributeType = *string
|
||||||
|
|
||||||
|
func getResetUserResponseGetStatusAttributeTypeOk(arg ResetUserResponseGetStatusAttributeType) (ret ResetUserResponseGetStatusRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setResetUserResponseGetStatusAttributeType(arg *ResetUserResponseGetStatusAttributeType, val ResetUserResponseGetStatusRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type ResetUserResponseGetStatusArgType = string
|
||||||
|
type ResetUserResponseGetStatusRetType = string
|
||||||
|
|
||||||
|
// ResetUserResponse struct for ResetUserResponse
|
||||||
|
type ResetUserResponse struct {
|
||||||
|
// The connection string for the user to the instance.
|
||||||
|
// REQUIRED
|
||||||
|
ConnectionString ResetUserResponseGetConnectionStringAttributeType `json:"connectionString" required:"true"`
|
||||||
|
// The name of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Name ResetUserResponseGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The password for the user.
|
||||||
|
// REQUIRED
|
||||||
|
Password ResetUserResponseGetPasswordAttributeType `json:"password" required:"true"`
|
||||||
|
// The current status of the user.
|
||||||
|
// REQUIRED
|
||||||
|
Status ResetUserResponseGetStatusAttributeType `json:"status" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _ResetUserResponse ResetUserResponse
|
||||||
|
|
||||||
|
// NewResetUserResponse instantiates a new ResetUserResponse 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 NewResetUserResponse(connectionString ResetUserResponseGetConnectionStringArgType, name ResetUserResponseGetNameArgType, password ResetUserResponseGetPasswordArgType, status ResetUserResponseGetStatusArgType) *ResetUserResponse {
|
||||||
|
this := ResetUserResponse{}
|
||||||
|
setResetUserResponseGetConnectionStringAttributeType(&this.ConnectionString, connectionString)
|
||||||
|
setResetUserResponseGetNameAttributeType(&this.Name, name)
|
||||||
|
setResetUserResponseGetPasswordAttributeType(&this.Password, password)
|
||||||
|
setResetUserResponseGetStatusAttributeType(&this.Status, status)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewResetUserResponseWithDefaults instantiates a new ResetUserResponse 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 NewResetUserResponseWithDefaults() *ResetUserResponse {
|
||||||
|
this := ResetUserResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConnectionString returns the ConnectionString field value
|
||||||
|
func (o *ResetUserResponse) GetConnectionString() (ret ResetUserResponseGetConnectionStringRetType) {
|
||||||
|
ret, _ = o.GetConnectionStringOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetConnectionStringOk returns a tuple with the ConnectionString field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *ResetUserResponse) GetConnectionStringOk() (ret ResetUserResponseGetConnectionStringRetType, ok bool) {
|
||||||
|
return getResetUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetConnectionString sets field value
|
||||||
|
func (o *ResetUserResponse) SetConnectionString(v ResetUserResponseGetConnectionStringRetType) {
|
||||||
|
setResetUserResponseGetConnectionStringAttributeType(&o.ConnectionString, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *ResetUserResponse) GetName() (ret ResetUserResponseGetNameRetType) {
|
||||||
|
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 *ResetUserResponse) GetNameOk() (ret ResetUserResponseGetNameRetType, ok bool) {
|
||||||
|
return getResetUserResponseGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *ResetUserResponse) SetName(v ResetUserResponseGetNameRetType) {
|
||||||
|
setResetUserResponseGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPassword returns the Password field value
|
||||||
|
func (o *ResetUserResponse) GetPassword() (ret ResetUserResponseGetPasswordRetType) {
|
||||||
|
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 *ResetUserResponse) GetPasswordOk() (ret ResetUserResponseGetPasswordRetType, ok bool) {
|
||||||
|
return getResetUserResponseGetPasswordAttributeTypeOk(o.Password)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPassword sets field value
|
||||||
|
func (o *ResetUserResponse) SetPassword(v ResetUserResponseGetPasswordRetType) {
|
||||||
|
setResetUserResponseGetPasswordAttributeType(&o.Password, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetStatus returns the Status field value
|
||||||
|
func (o *ResetUserResponse) GetStatus() (ret ResetUserResponseGetStatusRetType) {
|
||||||
|
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 *ResetUserResponse) GetStatusOk() (ret ResetUserResponseGetStatusRetType, ok bool) {
|
||||||
|
return getResetUserResponseGetStatusAttributeTypeOk(o.Status)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetStatus sets field value
|
||||||
|
func (o *ResetUserResponse) SetStatus(v ResetUserResponseGetStatusRetType) {
|
||||||
|
setResetUserResponseGetStatusAttributeType(&o.Status, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o ResetUserResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getResetUserResponseGetConnectionStringAttributeTypeOk(o.ConnectionString); ok {
|
||||||
|
toSerialize["ConnectionString"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getResetUserResponseGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getResetUserResponseGetPasswordAttributeTypeOk(o.Password); ok {
|
||||||
|
toSerialize["Password"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getResetUserResponseGetStatusAttributeTypeOk(o.Status); ok {
|
||||||
|
toSerialize["Status"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableResetUserResponse struct {
|
||||||
|
value *ResetUserResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableResetUserResponse) Get() *ResetUserResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableResetUserResponse) Set(val *ResetUserResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableResetUserResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableResetUserResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableResetUserResponse(val *ResetUserResponse) *NullableResetUserResponse {
|
||||||
|
return &NullableResetUserResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableResetUserResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableResetUserResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_reset_user_response_test.go
Normal file
11
pkg/postgresflexalpha/model_reset_user_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
123
pkg/postgresflexalpha/model_status.go
Normal file
123
pkg/postgresflexalpha/model_status.go
Normal file
|
|
@ -0,0 +1,123 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Status The current status of the instance.
|
||||||
|
type Status string
|
||||||
|
|
||||||
|
// List of status
|
||||||
|
const (
|
||||||
|
STATUS_READY Status = "READY"
|
||||||
|
STATUS_PENDING Status = "PENDING"
|
||||||
|
STATUS_PROGRESSING Status = "PROGRESSING"
|
||||||
|
STATUS_FAILURE Status = "FAILURE"
|
||||||
|
STATUS_UNKNOWN Status = "UNKNOWN"
|
||||||
|
STATUS_TERMINATING Status = "TERMINATING"
|
||||||
|
)
|
||||||
|
|
||||||
|
// All allowed values of Status enum
|
||||||
|
var AllowedStatusEnumValues = []Status{
|
||||||
|
"READY",
|
||||||
|
"PENDING",
|
||||||
|
"PROGRESSING",
|
||||||
|
"FAILURE",
|
||||||
|
"UNKNOWN",
|
||||||
|
"TERMINATING",
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *Status) 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 := Status(value)
|
||||||
|
for _, existing := range AllowedStatusEnumValues {
|
||||||
|
if existing == enumTypeValue {
|
||||||
|
*v = enumTypeValue
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Errorf("%+v is not a valid Status", value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStatusFromValue returns a pointer to a valid Status
|
||||||
|
// for the value passed as argument, or an error if the value passed is not allowed by the enum
|
||||||
|
func NewStatusFromValue(v string) (*Status, error) {
|
||||||
|
ev := Status(v)
|
||||||
|
if ev.IsValid() {
|
||||||
|
return &ev, nil
|
||||||
|
} else {
|
||||||
|
return nil, fmt.Errorf("invalid value '%v' for Status: valid values are %v", v, AllowedStatusEnumValues)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsValid return true if the value is valid for the enum, false otherwise
|
||||||
|
func (v Status) IsValid() bool {
|
||||||
|
for _, existing := range AllowedStatusEnumValues {
|
||||||
|
if existing == v {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ptr returns reference to status value
|
||||||
|
func (v Status) Ptr() *Status {
|
||||||
|
return &v
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableStatus struct {
|
||||||
|
value *Status
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStatus) Get() *Status {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStatus) Set(val *Status) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStatus) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStatus) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableStatus(val *Status) *NullableStatus {
|
||||||
|
return &NullableStatus{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStatus) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStatus) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_status_test.go
Normal file
11
pkg/postgresflexalpha/model_status_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
177
pkg/postgresflexalpha/model_storage.go
Normal file
177
pkg/postgresflexalpha/model_storage.go
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the Storage type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &Storage{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for performanceClass
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type StorageGetPerformanceClassAttributeType = *string
|
||||||
|
|
||||||
|
func getStorageGetPerformanceClassAttributeTypeOk(arg StorageGetPerformanceClassAttributeType) (ret StorageGetPerformanceClassRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setStorageGetPerformanceClassAttributeType(arg *StorageGetPerformanceClassAttributeType, val StorageGetPerformanceClassRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type StorageGetPerformanceClassArgType = string
|
||||||
|
type StorageGetPerformanceClassRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for size
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
type StorageGetSizeAttributeType = *int64
|
||||||
|
type StorageGetSizeArgType = int64
|
||||||
|
type StorageGetSizeRetType = int64
|
||||||
|
|
||||||
|
func getStorageGetSizeAttributeTypeOk(arg StorageGetSizeAttributeType) (ret StorageGetSizeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setStorageGetSizeAttributeType(arg *StorageGetSizeAttributeType, val StorageGetSizeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// Storage The object containing information about the storage size and class.
|
||||||
|
type Storage struct {
|
||||||
|
// The storage class for the storage.
|
||||||
|
PerformanceClass StorageGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
|
||||||
|
// The storage size in Gigabytes.
|
||||||
|
Size StorageGetSizeAttributeType `json:"size,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStorage instantiates a new Storage 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 NewStorage() *Storage {
|
||||||
|
this := Storage{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStorageWithDefaults instantiates a new Storage 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 NewStorageWithDefaults() *Storage {
|
||||||
|
this := Storage{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
|
||||||
|
func (o *Storage) GetPerformanceClass() (res StorageGetPerformanceClassRetType) {
|
||||||
|
res, _ = o.GetPerformanceClassOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Storage) GetPerformanceClassOk() (ret StorageGetPerformanceClassRetType, ok bool) {
|
||||||
|
return getStorageGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasPerformanceClass returns a boolean if a field has been set.
|
||||||
|
func (o *Storage) HasPerformanceClass() bool {
|
||||||
|
_, ok := o.GetPerformanceClassOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
|
||||||
|
func (o *Storage) SetPerformanceClass(v StorageGetPerformanceClassRetType) {
|
||||||
|
setStorageGetPerformanceClassAttributeType(&o.PerformanceClass, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSize returns the Size field value if set, zero value otherwise.
|
||||||
|
func (o *Storage) GetSize() (res StorageGetSizeRetType) {
|
||||||
|
res, _ = o.GetSizeOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *Storage) GetSizeOk() (ret StorageGetSizeRetType, ok bool) {
|
||||||
|
return getStorageGetSizeAttributeTypeOk(o.Size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSize returns a boolean if a field has been set.
|
||||||
|
func (o *Storage) HasSize() bool {
|
||||||
|
_, ok := o.GetSizeOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||||
|
func (o *Storage) SetSize(v StorageGetSizeRetType) {
|
||||||
|
setStorageGetSizeAttributeType(&o.Size, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o Storage) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getStorageGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
|
||||||
|
toSerialize["PerformanceClass"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getStorageGetSizeAttributeTypeOk(o.Size); ok {
|
||||||
|
toSerialize["Size"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableStorage struct {
|
||||||
|
value *Storage
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorage) Get() *Storage {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorage) Set(val *Storage) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorage) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorage) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableStorage(val *Storage) *NullableStorage {
|
||||||
|
return &NullableStorage{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorage) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorage) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
171
pkg/postgresflexalpha/model_storage_create.go
Normal file
171
pkg/postgresflexalpha/model_storage_create.go
Normal file
|
|
@ -0,0 +1,171 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the StorageCreate type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &StorageCreate{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for performanceClass
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type StorageCreateGetPerformanceClassAttributeType = *string
|
||||||
|
|
||||||
|
func getStorageCreateGetPerformanceClassAttributeTypeOk(arg StorageCreateGetPerformanceClassAttributeType) (ret StorageCreateGetPerformanceClassRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setStorageCreateGetPerformanceClassAttributeType(arg *StorageCreateGetPerformanceClassAttributeType, val StorageCreateGetPerformanceClassRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type StorageCreateGetPerformanceClassArgType = string
|
||||||
|
type StorageCreateGetPerformanceClassRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for size
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
type StorageCreateGetSizeAttributeType = *int64
|
||||||
|
type StorageCreateGetSizeArgType = int64
|
||||||
|
type StorageCreateGetSizeRetType = int64
|
||||||
|
|
||||||
|
func getStorageCreateGetSizeAttributeTypeOk(arg StorageCreateGetSizeAttributeType) (ret StorageCreateGetSizeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setStorageCreateGetSizeAttributeType(arg *StorageCreateGetSizeAttributeType, val StorageCreateGetSizeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// StorageCreate The object containing information about the storage size and class.
|
||||||
|
type StorageCreate struct {
|
||||||
|
// The storage class for the storage.
|
||||||
|
// REQUIRED
|
||||||
|
PerformanceClass StorageCreateGetPerformanceClassAttributeType `json:"performanceClass" required:"true"`
|
||||||
|
// The storage size in Gigabytes.
|
||||||
|
// REQUIRED
|
||||||
|
Size StorageCreateGetSizeAttributeType `json:"size" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _StorageCreate StorageCreate
|
||||||
|
|
||||||
|
// NewStorageCreate instantiates a new StorageCreate 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 NewStorageCreate(performanceClass StorageCreateGetPerformanceClassArgType, size StorageCreateGetSizeArgType) *StorageCreate {
|
||||||
|
this := StorageCreate{}
|
||||||
|
setStorageCreateGetPerformanceClassAttributeType(&this.PerformanceClass, performanceClass)
|
||||||
|
setStorageCreateGetSizeAttributeType(&this.Size, size)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStorageCreateWithDefaults instantiates a new StorageCreate 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 NewStorageCreateWithDefaults() *StorageCreate {
|
||||||
|
this := StorageCreate{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPerformanceClass returns the PerformanceClass field value
|
||||||
|
func (o *StorageCreate) GetPerformanceClass() (ret StorageCreateGetPerformanceClassRetType) {
|
||||||
|
ret, _ = o.GetPerformanceClassOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetPerformanceClassOk returns a tuple with the PerformanceClass field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *StorageCreate) GetPerformanceClassOk() (ret StorageCreateGetPerformanceClassRetType, ok bool) {
|
||||||
|
return getStorageCreateGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetPerformanceClass sets field value
|
||||||
|
func (o *StorageCreate) SetPerformanceClass(v StorageCreateGetPerformanceClassRetType) {
|
||||||
|
setStorageCreateGetPerformanceClassAttributeType(&o.PerformanceClass, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSize returns the Size field value
|
||||||
|
func (o *StorageCreate) GetSize() (ret StorageCreateGetSizeRetType) {
|
||||||
|
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 *StorageCreate) GetSizeOk() (ret StorageCreateGetSizeRetType, ok bool) {
|
||||||
|
return getStorageCreateGetSizeAttributeTypeOk(o.Size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSize sets field value
|
||||||
|
func (o *StorageCreate) SetSize(v StorageCreateGetSizeRetType) {
|
||||||
|
setStorageCreateGetSizeAttributeType(&o.Size, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o StorageCreate) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getStorageCreateGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
|
||||||
|
toSerialize["PerformanceClass"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getStorageCreateGetSizeAttributeTypeOk(o.Size); ok {
|
||||||
|
toSerialize["Size"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableStorageCreate struct {
|
||||||
|
value *StorageCreate
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorageCreate) Get() *StorageCreate {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorageCreate) Set(val *StorageCreate) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorageCreate) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorageCreate) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableStorageCreate(val *StorageCreate) *NullableStorageCreate {
|
||||||
|
return &NullableStorageCreate{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorageCreate) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorageCreate) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_storage_create_test.go
Normal file
11
pkg/postgresflexalpha/model_storage_create_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
11
pkg/postgresflexalpha/model_storage_test.go
Normal file
11
pkg/postgresflexalpha/model_storage_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
128
pkg/postgresflexalpha/model_storage_update.go
Normal file
128
pkg/postgresflexalpha/model_storage_update.go
Normal file
|
|
@ -0,0 +1,128 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the StorageUpdate type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &StorageUpdate{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for size
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isLong
|
||||||
|
type StorageUpdateGetSizeAttributeType = *int64
|
||||||
|
type StorageUpdateGetSizeArgType = int64
|
||||||
|
type StorageUpdateGetSizeRetType = int64
|
||||||
|
|
||||||
|
func getStorageUpdateGetSizeAttributeTypeOk(arg StorageUpdateGetSizeAttributeType) (ret StorageUpdateGetSizeRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setStorageUpdateGetSizeAttributeType(arg *StorageUpdateGetSizeAttributeType, val StorageUpdateGetSizeRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// StorageUpdate The object containing information about the storage size and class.
|
||||||
|
type StorageUpdate struct {
|
||||||
|
// The storage size in Gigabytes.
|
||||||
|
Size StorageUpdateGetSizeAttributeType `json:"size,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStorageUpdate instantiates a new StorageUpdate 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 NewStorageUpdate() *StorageUpdate {
|
||||||
|
this := StorageUpdate{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewStorageUpdateWithDefaults instantiates a new StorageUpdate 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 NewStorageUpdateWithDefaults() *StorageUpdate {
|
||||||
|
this := StorageUpdate{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSize returns the Size field value if set, zero value otherwise.
|
||||||
|
func (o *StorageUpdate) GetSize() (res StorageUpdateGetSizeRetType) {
|
||||||
|
res, _ = o.GetSizeOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *StorageUpdate) GetSizeOk() (ret StorageUpdateGetSizeRetType, ok bool) {
|
||||||
|
return getStorageUpdateGetSizeAttributeTypeOk(o.Size)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasSize returns a boolean if a field has been set.
|
||||||
|
func (o *StorageUpdate) HasSize() bool {
|
||||||
|
_, ok := o.GetSizeOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||||
|
func (o *StorageUpdate) SetSize(v StorageUpdateGetSizeRetType) {
|
||||||
|
setStorageUpdateGetSizeAttributeType(&o.Size, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o StorageUpdate) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getStorageUpdateGetSizeAttributeTypeOk(o.Size); ok {
|
||||||
|
toSerialize["Size"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableStorageUpdate struct {
|
||||||
|
value *StorageUpdate
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorageUpdate) Get() *StorageUpdate {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorageUpdate) Set(val *StorageUpdate) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorageUpdate) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorageUpdate) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableStorageUpdate(val *StorageUpdate) *NullableStorageUpdate {
|
||||||
|
return &NullableStorageUpdate{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableStorageUpdate) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableStorageUpdate) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
11
pkg/postgresflexalpha/model_storage_update_test.go
Normal file
11
pkg/postgresflexalpha/model_storage_update_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
@ -0,0 +1,178 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the UpdateDatabasePartiallyRequestPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &UpdateDatabasePartiallyRequestPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type UpdateDatabasePartiallyRequestPayloadGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getUpdateDatabasePartiallyRequestPayloadGetNameAttributeTypeOk(arg UpdateDatabasePartiallyRequestPayloadGetNameAttributeType) (ret UpdateDatabasePartiallyRequestPayloadGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setUpdateDatabasePartiallyRequestPayloadGetNameAttributeType(arg *UpdateDatabasePartiallyRequestPayloadGetNameAttributeType, val UpdateDatabasePartiallyRequestPayloadGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateDatabasePartiallyRequestPayloadGetNameArgType = string
|
||||||
|
type UpdateDatabasePartiallyRequestPayloadGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for owner
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType = *string
|
||||||
|
|
||||||
|
func getUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeTypeOk(arg UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType) (ret UpdateDatabasePartiallyRequestPayloadGetOwnerRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType(arg *UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType, val UpdateDatabasePartiallyRequestPayloadGetOwnerRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateDatabasePartiallyRequestPayloadGetOwnerArgType = string
|
||||||
|
type UpdateDatabasePartiallyRequestPayloadGetOwnerRetType = string
|
||||||
|
|
||||||
|
// UpdateDatabasePartiallyRequestPayload struct for UpdateDatabasePartiallyRequestPayload
|
||||||
|
type UpdateDatabasePartiallyRequestPayload struct {
|
||||||
|
// The name of the database.
|
||||||
|
Name UpdateDatabasePartiallyRequestPayloadGetNameAttributeType `json:"name,omitempty"`
|
||||||
|
// The owner of the database.
|
||||||
|
Owner UpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType `json:"owner,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewUpdateDatabasePartiallyRequestPayload instantiates a new UpdateDatabasePartiallyRequestPayload 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 NewUpdateDatabasePartiallyRequestPayload() *UpdateDatabasePartiallyRequestPayload {
|
||||||
|
this := UpdateDatabasePartiallyRequestPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewUpdateDatabasePartiallyRequestPayloadWithDefaults instantiates a new UpdateDatabasePartiallyRequestPayload 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 NewUpdateDatabasePartiallyRequestPayloadWithDefaults() *UpdateDatabasePartiallyRequestPayload {
|
||||||
|
this := UpdateDatabasePartiallyRequestPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value if set, zero value otherwise.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) GetName() (res UpdateDatabasePartiallyRequestPayloadGetNameRetType) {
|
||||||
|
res, _ = o.GetNameOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) GetNameOk() (ret UpdateDatabasePartiallyRequestPayloadGetNameRetType, ok bool) {
|
||||||
|
return getUpdateDatabasePartiallyRequestPayloadGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasName returns a boolean if a field has been set.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) HasName() bool {
|
||||||
|
_, ok := o.GetNameOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) SetName(v UpdateDatabasePartiallyRequestPayloadGetNameRetType) {
|
||||||
|
setUpdateDatabasePartiallyRequestPayloadGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) GetOwner() (res UpdateDatabasePartiallyRequestPayloadGetOwnerRetType) {
|
||||||
|
res, _ = o.GetOwnerOk()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) GetOwnerOk() (ret UpdateDatabasePartiallyRequestPayloadGetOwnerRetType, ok bool) {
|
||||||
|
return getUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeTypeOk(o.Owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// HasOwner returns a boolean if a field has been set.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) HasOwner() bool {
|
||||||
|
_, ok := o.GetOwnerOk()
|
||||||
|
return ok
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
||||||
|
func (o *UpdateDatabasePartiallyRequestPayload) SetOwner(v UpdateDatabasePartiallyRequestPayloadGetOwnerRetType) {
|
||||||
|
setUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeType(&o.Owner, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o UpdateDatabasePartiallyRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getUpdateDatabasePartiallyRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getUpdateDatabasePartiallyRequestPayloadGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||||
|
toSerialize["Owner"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableUpdateDatabasePartiallyRequestPayload struct {
|
||||||
|
value *UpdateDatabasePartiallyRequestPayload
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabasePartiallyRequestPayload) Get() *UpdateDatabasePartiallyRequestPayload {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabasePartiallyRequestPayload) Set(val *UpdateDatabasePartiallyRequestPayload) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabasePartiallyRequestPayload) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabasePartiallyRequestPayload) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableUpdateDatabasePartiallyRequestPayload(val *UpdateDatabasePartiallyRequestPayload) *NullableUpdateDatabasePartiallyRequestPayload {
|
||||||
|
return &NullableUpdateDatabasePartiallyRequestPayload{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabasePartiallyRequestPayload) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabasePartiallyRequestPayload) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the UpdateDatabasePartiallyResponse type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &UpdateDatabasePartiallyResponse{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for database
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isModel
|
||||||
|
type UpdateDatabasePartiallyResponseGetDatabaseAttributeType = *ListDatabase
|
||||||
|
type UpdateDatabasePartiallyResponseGetDatabaseArgType = ListDatabase
|
||||||
|
type UpdateDatabasePartiallyResponseGetDatabaseRetType = ListDatabase
|
||||||
|
|
||||||
|
func getUpdateDatabasePartiallyResponseGetDatabaseAttributeTypeOk(arg UpdateDatabasePartiallyResponseGetDatabaseAttributeType) (ret UpdateDatabasePartiallyResponseGetDatabaseRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setUpdateDatabasePartiallyResponseGetDatabaseAttributeType(arg *UpdateDatabasePartiallyResponseGetDatabaseAttributeType, val UpdateDatabasePartiallyResponseGetDatabaseRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
// UpdateDatabasePartiallyResponse struct for UpdateDatabasePartiallyResponse
|
||||||
|
type UpdateDatabasePartiallyResponse struct {
|
||||||
|
// REQUIRED
|
||||||
|
Database UpdateDatabasePartiallyResponseGetDatabaseAttributeType `json:"database" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _UpdateDatabasePartiallyResponse UpdateDatabasePartiallyResponse
|
||||||
|
|
||||||
|
// NewUpdateDatabasePartiallyResponse instantiates a new UpdateDatabasePartiallyResponse 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 NewUpdateDatabasePartiallyResponse(database UpdateDatabasePartiallyResponseGetDatabaseArgType) *UpdateDatabasePartiallyResponse {
|
||||||
|
this := UpdateDatabasePartiallyResponse{}
|
||||||
|
setUpdateDatabasePartiallyResponseGetDatabaseAttributeType(&this.Database, database)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewUpdateDatabasePartiallyResponseWithDefaults instantiates a new UpdateDatabasePartiallyResponse 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 NewUpdateDatabasePartiallyResponseWithDefaults() *UpdateDatabasePartiallyResponse {
|
||||||
|
this := UpdateDatabasePartiallyResponse{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDatabase returns the Database field value
|
||||||
|
func (o *UpdateDatabasePartiallyResponse) GetDatabase() (ret UpdateDatabasePartiallyResponseGetDatabaseRetType) {
|
||||||
|
ret, _ = o.GetDatabaseOk()
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetDatabaseOk returns a tuple with the Database field value
|
||||||
|
// and a boolean to check if the value has been set.
|
||||||
|
func (o *UpdateDatabasePartiallyResponse) GetDatabaseOk() (ret UpdateDatabasePartiallyResponseGetDatabaseRetType, ok bool) {
|
||||||
|
return getUpdateDatabasePartiallyResponseGetDatabaseAttributeTypeOk(o.Database)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetDatabase sets field value
|
||||||
|
func (o *UpdateDatabasePartiallyResponse) SetDatabase(v UpdateDatabasePartiallyResponseGetDatabaseRetType) {
|
||||||
|
setUpdateDatabasePartiallyResponseGetDatabaseAttributeType(&o.Database, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o UpdateDatabasePartiallyResponse) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getUpdateDatabasePartiallyResponseGetDatabaseAttributeTypeOk(o.Database); ok {
|
||||||
|
toSerialize["Database"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableUpdateDatabasePartiallyResponse struct {
|
||||||
|
value *UpdateDatabasePartiallyResponse
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabasePartiallyResponse) Get() *UpdateDatabasePartiallyResponse {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabasePartiallyResponse) Set(val *UpdateDatabasePartiallyResponse) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabasePartiallyResponse) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabasePartiallyResponse) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableUpdateDatabasePartiallyResponse(val *UpdateDatabasePartiallyResponse) *NullableUpdateDatabasePartiallyResponse {
|
||||||
|
return &NullableUpdateDatabasePartiallyResponse{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabasePartiallyResponse) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabasePartiallyResponse) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
172
pkg/postgresflexalpha/model_update_database_request_payload.go
Normal file
172
pkg/postgresflexalpha/model_update_database_request_payload.go
Normal file
|
|
@ -0,0 +1,172 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
// checks if the UpdateDatabaseRequestPayload type satisfies the MappedNullable interface at compile time
|
||||||
|
var _ MappedNullable = &UpdateDatabaseRequestPayload{}
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for name
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type UpdateDatabaseRequestPayloadGetNameAttributeType = *string
|
||||||
|
|
||||||
|
func getUpdateDatabaseRequestPayloadGetNameAttributeTypeOk(arg UpdateDatabaseRequestPayloadGetNameAttributeType) (ret UpdateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setUpdateDatabaseRequestPayloadGetNameAttributeType(arg *UpdateDatabaseRequestPayloadGetNameAttributeType, val UpdateDatabaseRequestPayloadGetNameRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateDatabaseRequestPayloadGetNameArgType = string
|
||||||
|
type UpdateDatabaseRequestPayloadGetNameRetType = string
|
||||||
|
|
||||||
|
/*
|
||||||
|
types and functions for owner
|
||||||
|
*/
|
||||||
|
|
||||||
|
// isNotNullableString
|
||||||
|
type UpdateDatabaseRequestPayloadGetOwnerAttributeType = *string
|
||||||
|
|
||||||
|
func getUpdateDatabaseRequestPayloadGetOwnerAttributeTypeOk(arg UpdateDatabaseRequestPayloadGetOwnerAttributeType) (ret UpdateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
||||||
|
if arg == nil {
|
||||||
|
return ret, false
|
||||||
|
}
|
||||||
|
return *arg, true
|
||||||
|
}
|
||||||
|
|
||||||
|
func setUpdateDatabaseRequestPayloadGetOwnerAttributeType(arg *UpdateDatabaseRequestPayloadGetOwnerAttributeType, val UpdateDatabaseRequestPayloadGetOwnerRetType) {
|
||||||
|
*arg = &val
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateDatabaseRequestPayloadGetOwnerArgType = string
|
||||||
|
type UpdateDatabaseRequestPayloadGetOwnerRetType = string
|
||||||
|
|
||||||
|
// UpdateDatabaseRequestPayload struct for UpdateDatabaseRequestPayload
|
||||||
|
type UpdateDatabaseRequestPayload struct {
|
||||||
|
// The name of the database.
|
||||||
|
// REQUIRED
|
||||||
|
Name UpdateDatabaseRequestPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||||
|
// The owner of the database.
|
||||||
|
// REQUIRED
|
||||||
|
Owner UpdateDatabaseRequestPayloadGetOwnerAttributeType `json:"owner" required:"true"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type _UpdateDatabaseRequestPayload UpdateDatabaseRequestPayload
|
||||||
|
|
||||||
|
// NewUpdateDatabaseRequestPayload instantiates a new UpdateDatabaseRequestPayload 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 NewUpdateDatabaseRequestPayload(name UpdateDatabaseRequestPayloadGetNameArgType, owner UpdateDatabaseRequestPayloadGetOwnerArgType) *UpdateDatabaseRequestPayload {
|
||||||
|
this := UpdateDatabaseRequestPayload{}
|
||||||
|
setUpdateDatabaseRequestPayloadGetNameAttributeType(&this.Name, name)
|
||||||
|
setUpdateDatabaseRequestPayloadGetOwnerAttributeType(&this.Owner, owner)
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewUpdateDatabaseRequestPayloadWithDefaults instantiates a new UpdateDatabaseRequestPayload 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 NewUpdateDatabaseRequestPayloadWithDefaults() *UpdateDatabaseRequestPayload {
|
||||||
|
this := UpdateDatabaseRequestPayload{}
|
||||||
|
return &this
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetName returns the Name field value
|
||||||
|
func (o *UpdateDatabaseRequestPayload) GetName() (ret UpdateDatabaseRequestPayloadGetNameRetType) {
|
||||||
|
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 *UpdateDatabaseRequestPayload) GetNameOk() (ret UpdateDatabaseRequestPayloadGetNameRetType, ok bool) {
|
||||||
|
return getUpdateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetName sets field value
|
||||||
|
func (o *UpdateDatabaseRequestPayload) SetName(v UpdateDatabaseRequestPayloadGetNameRetType) {
|
||||||
|
setUpdateDatabaseRequestPayloadGetNameAttributeType(&o.Name, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetOwner returns the Owner field value
|
||||||
|
func (o *UpdateDatabaseRequestPayload) GetOwner() (ret UpdateDatabaseRequestPayloadGetOwnerRetType) {
|
||||||
|
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 *UpdateDatabaseRequestPayload) GetOwnerOk() (ret UpdateDatabaseRequestPayloadGetOwnerRetType, ok bool) {
|
||||||
|
return getUpdateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner)
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetOwner sets field value
|
||||||
|
func (o *UpdateDatabaseRequestPayload) SetOwner(v UpdateDatabaseRequestPayloadGetOwnerRetType) {
|
||||||
|
setUpdateDatabaseRequestPayloadGetOwnerAttributeType(&o.Owner, v)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o UpdateDatabaseRequestPayload) ToMap() (map[string]interface{}, error) {
|
||||||
|
toSerialize := map[string]interface{}{}
|
||||||
|
if val, ok := getUpdateDatabaseRequestPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||||
|
toSerialize["Name"] = val
|
||||||
|
}
|
||||||
|
if val, ok := getUpdateDatabaseRequestPayloadGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||||
|
toSerialize["Owner"] = val
|
||||||
|
}
|
||||||
|
return toSerialize, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NullableUpdateDatabaseRequestPayload struct {
|
||||||
|
value *UpdateDatabaseRequestPayload
|
||||||
|
isSet bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabaseRequestPayload) Get() *UpdateDatabaseRequestPayload {
|
||||||
|
return v.value
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabaseRequestPayload) Set(val *UpdateDatabaseRequestPayload) {
|
||||||
|
v.value = val
|
||||||
|
v.isSet = true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabaseRequestPayload) IsSet() bool {
|
||||||
|
return v.isSet
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabaseRequestPayload) Unset() {
|
||||||
|
v.value = nil
|
||||||
|
v.isSet = false
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewNullableUpdateDatabaseRequestPayload(val *UpdateDatabaseRequestPayload) *NullableUpdateDatabaseRequestPayload {
|
||||||
|
return &NullableUpdateDatabaseRequestPayload{value: val, isSet: true}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v NullableUpdateDatabaseRequestPayload) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(v.value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (v *NullableUpdateDatabaseRequestPayload) UnmarshalJSON(src []byte) error {
|
||||||
|
v.isSet = true
|
||||||
|
return json.Unmarshal(src, &v.value)
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
/*
|
||||||
|
PostgreSQL Flex API
|
||||||
|
|
||||||
|
This is the documentation for the STACKIT Postgres Flex service
|
||||||
|
|
||||||
|
API version: 3alpha1
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||||
|
|
||||||
|
package postgresflexalpha
|
||||||
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