feat: auto generated files and new structure (#4)
## Description
<!-- **Please link some issue here describing what you are trying to achieve.**
In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->
relates to #1234
## Checklist
- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)
Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
This commit is contained in:
parent
979220be66
commit
9f41c4da7f
1283 changed files with 273211 additions and 4614 deletions
1
pkg/iaasbeta/.openapi-generator/VERSION
Normal file
1
pkg/iaasbeta/.openapi-generator/VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
6.6.0
|
||||
30658
pkg/iaasbeta/api_default.go
Normal file
30658
pkg/iaasbeta/api_default.go
Normal file
File diff suppressed because it is too large
Load diff
7614
pkg/iaasbeta/api_default_test.go
Normal file
7614
pkg/iaasbeta/api_default_test.go
Normal file
File diff suppressed because it is too large
Load diff
628
pkg/iaasbeta/client.go
Normal file
628
pkg/iaasbeta/client.go
Normal file
|
|
@ -0,0 +1,628 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"reflect"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/auth"
|
||||
"github.com/stackitcloud/stackit-sdk-go/core/config"
|
||||
)
|
||||
|
||||
var (
|
||||
jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`)
|
||||
xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`)
|
||||
queryParamSplit = regexp.MustCompile(`(^|&)([^&]+)`)
|
||||
queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]")
|
||||
)
|
||||
|
||||
// APIClient manages communication with the STACKIT IaaS API API v2beta1
|
||||
// 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
|
||||
}
|
||||
defer file.Close()
|
||||
|
||||
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)
|
||||
}
|
||||
38
pkg/iaasbeta/configuration.go
Normal file
38
pkg/iaasbeta/configuration.go
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
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/iaasbeta",
|
||||
Debug: false,
|
||||
Servers: config.ServerConfigurations{
|
||||
{
|
||||
URL: "https://iaas.api.stackit.cloud",
|
||||
Description: "No description provided",
|
||||
Variables: map[string]config.ServerVariable{
|
||||
"region": {
|
||||
Description: "No description provided",
|
||||
DefaultValue: "global",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
OperationServers: map[string]config.ServerConfigurations{},
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
126
pkg/iaasbeta/model_add_routes_to_routing_table_payload.go
Normal file
126
pkg/iaasbeta/model_add_routes_to_routing_table_payload.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AddRoutesToRoutingTablePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AddRoutesToRoutingTablePayload{}
|
||||
|
||||
/*
|
||||
types and functions for items
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type AddRoutesToRoutingTablePayloadGetItemsAttributeType = *[]Route
|
||||
type AddRoutesToRoutingTablePayloadGetItemsArgType = []Route
|
||||
type AddRoutesToRoutingTablePayloadGetItemsRetType = []Route
|
||||
|
||||
func getAddRoutesToRoutingTablePayloadGetItemsAttributeTypeOk(arg AddRoutesToRoutingTablePayloadGetItemsAttributeType) (ret AddRoutesToRoutingTablePayloadGetItemsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutesToRoutingTablePayloadGetItemsAttributeType(arg *AddRoutesToRoutingTablePayloadGetItemsAttributeType, val AddRoutesToRoutingTablePayloadGetItemsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// AddRoutesToRoutingTablePayload Object represents a request to add network routes.
|
||||
type AddRoutesToRoutingTablePayload struct {
|
||||
// A list of routes.
|
||||
// REQUIRED
|
||||
Items AddRoutesToRoutingTablePayloadGetItemsAttributeType `json:"items" required:"true"`
|
||||
}
|
||||
|
||||
type _AddRoutesToRoutingTablePayload AddRoutesToRoutingTablePayload
|
||||
|
||||
// NewAddRoutesToRoutingTablePayload instantiates a new AddRoutesToRoutingTablePayload 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 NewAddRoutesToRoutingTablePayload(items AddRoutesToRoutingTablePayloadGetItemsArgType) *AddRoutesToRoutingTablePayload {
|
||||
this := AddRoutesToRoutingTablePayload{}
|
||||
setAddRoutesToRoutingTablePayloadGetItemsAttributeType(&this.Items, items)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAddRoutesToRoutingTablePayloadWithDefaults instantiates a new AddRoutesToRoutingTablePayload 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 NewAddRoutesToRoutingTablePayloadWithDefaults() *AddRoutesToRoutingTablePayload {
|
||||
this := AddRoutesToRoutingTablePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetItems returns the Items field value
|
||||
func (o *AddRoutesToRoutingTablePayload) GetItems() (ret AddRoutesToRoutingTablePayloadGetItemsRetType) {
|
||||
ret, _ = o.GetItemsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetItemsOk returns a tuple with the Items field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutesToRoutingTablePayload) GetItemsOk() (ret AddRoutesToRoutingTablePayloadGetItemsRetType, ok bool) {
|
||||
return getAddRoutesToRoutingTablePayloadGetItemsAttributeTypeOk(o.Items)
|
||||
}
|
||||
|
||||
// SetItems sets field value
|
||||
func (o *AddRoutesToRoutingTablePayload) SetItems(v AddRoutesToRoutingTablePayloadGetItemsRetType) {
|
||||
setAddRoutesToRoutingTablePayloadGetItemsAttributeType(&o.Items, v)
|
||||
}
|
||||
|
||||
func (o AddRoutesToRoutingTablePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getAddRoutesToRoutingTablePayloadGetItemsAttributeTypeOk(o.Items); ok {
|
||||
toSerialize["Items"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableAddRoutesToRoutingTablePayload struct {
|
||||
value *AddRoutesToRoutingTablePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAddRoutesToRoutingTablePayload) Get() *AddRoutesToRoutingTablePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAddRoutesToRoutingTablePayload) Set(val *AddRoutesToRoutingTablePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAddRoutesToRoutingTablePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAddRoutesToRoutingTablePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAddRoutesToRoutingTablePayload(val *AddRoutesToRoutingTablePayload) *NullableAddRoutesToRoutingTablePayload {
|
||||
return &NullableAddRoutesToRoutingTablePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAddRoutesToRoutingTablePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAddRoutesToRoutingTablePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
518
pkg/iaasbeta/model_add_routing_table_to_area_payload.go
Normal file
518
pkg/iaasbeta/model_add_routing_table_to_area_payload.go
Normal file
|
|
@ -0,0 +1,518 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the AddRoutingTableToAreaPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AddRoutingTableToAreaPayload{}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type AddRoutingTableToAreaPayloadGetCreatedAtAttributeType = *time.Time
|
||||
type AddRoutingTableToAreaPayloadGetCreatedAtArgType = time.Time
|
||||
type AddRoutingTableToAreaPayloadGetCreatedAtRetType = time.Time
|
||||
|
||||
func getAddRoutingTableToAreaPayloadGetCreatedAtAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetCreatedAtAttributeType) (ret AddRoutingTableToAreaPayloadGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadGetCreatedAtAttributeType(arg *AddRoutingTableToAreaPayloadGetCreatedAtAttributeType, val AddRoutingTableToAreaPayloadGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for default
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type AddRoutingTableToAreaPayloadgetDefaultAttributeType = *bool
|
||||
type AddRoutingTableToAreaPayloadgetDefaultArgType = bool
|
||||
type AddRoutingTableToAreaPayloadgetDefaultRetType = bool
|
||||
|
||||
func getAddRoutingTableToAreaPayloadgetDefaultAttributeTypeOk(arg AddRoutingTableToAreaPayloadgetDefaultAttributeType) (ret AddRoutingTableToAreaPayloadgetDefaultRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadgetDefaultAttributeType(arg *AddRoutingTableToAreaPayloadgetDefaultAttributeType, val AddRoutingTableToAreaPayloadgetDefaultRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AddRoutingTableToAreaPayloadGetDescriptionAttributeType = *string
|
||||
|
||||
func getAddRoutingTableToAreaPayloadGetDescriptionAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetDescriptionAttributeType) (ret AddRoutingTableToAreaPayloadGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadGetDescriptionAttributeType(arg *AddRoutingTableToAreaPayloadGetDescriptionAttributeType, val AddRoutingTableToAreaPayloadGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AddRoutingTableToAreaPayloadGetDescriptionArgType = string
|
||||
type AddRoutingTableToAreaPayloadGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for dynamicRoutes
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType = *bool
|
||||
type AddRoutingTableToAreaPayloadgetDynamicRoutesArgType = bool
|
||||
type AddRoutingTableToAreaPayloadgetDynamicRoutesRetType = bool
|
||||
|
||||
func getAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeTypeOk(arg AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType) (ret AddRoutingTableToAreaPayloadgetDynamicRoutesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType(arg *AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType, val AddRoutingTableToAreaPayloadgetDynamicRoutesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AddRoutingTableToAreaPayloadGetIdAttributeType = *string
|
||||
|
||||
func getAddRoutingTableToAreaPayloadGetIdAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetIdAttributeType) (ret AddRoutingTableToAreaPayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadGetIdAttributeType(arg *AddRoutingTableToAreaPayloadGetIdAttributeType, val AddRoutingTableToAreaPayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AddRoutingTableToAreaPayloadGetIdArgType = string
|
||||
type AddRoutingTableToAreaPayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type AddRoutingTableToAreaPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type AddRoutingTableToAreaPayloadGetLabelsArgType = map[string]interface{}
|
||||
type AddRoutingTableToAreaPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getAddRoutingTableToAreaPayloadGetLabelsAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetLabelsAttributeType) (ret AddRoutingTableToAreaPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadGetLabelsAttributeType(arg *AddRoutingTableToAreaPayloadGetLabelsAttributeType, val AddRoutingTableToAreaPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AddRoutingTableToAreaPayloadGetNameAttributeType = *string
|
||||
|
||||
func getAddRoutingTableToAreaPayloadGetNameAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetNameAttributeType) (ret AddRoutingTableToAreaPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadGetNameAttributeType(arg *AddRoutingTableToAreaPayloadGetNameAttributeType, val AddRoutingTableToAreaPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AddRoutingTableToAreaPayloadGetNameArgType = string
|
||||
type AddRoutingTableToAreaPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for systemRoutes
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType = *bool
|
||||
type AddRoutingTableToAreaPayloadgetSystemRoutesArgType = bool
|
||||
type AddRoutingTableToAreaPayloadgetSystemRoutesRetType = bool
|
||||
|
||||
func getAddRoutingTableToAreaPayloadgetSystemRoutesAttributeTypeOk(arg AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType) (ret AddRoutingTableToAreaPayloadgetSystemRoutesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadgetSystemRoutesAttributeType(arg *AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType, val AddRoutingTableToAreaPayloadgetSystemRoutesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType = *time.Time
|
||||
type AddRoutingTableToAreaPayloadGetUpdatedAtArgType = time.Time
|
||||
type AddRoutingTableToAreaPayloadGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getAddRoutingTableToAreaPayloadGetUpdatedAtAttributeTypeOk(arg AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType) (ret AddRoutingTableToAreaPayloadGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddRoutingTableToAreaPayloadGetUpdatedAtAttributeType(arg *AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType, val AddRoutingTableToAreaPayloadGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// AddRoutingTableToAreaPayload An object representing a routing table.
|
||||
type AddRoutingTableToAreaPayload struct {
|
||||
// Date-time when resource was created.
|
||||
CreatedAt AddRoutingTableToAreaPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise.
|
||||
Default AddRoutingTableToAreaPayloadgetDefaultAttributeType `json:"default,omitempty"`
|
||||
// Description Object. Allows string up to 255 Characters.
|
||||
Description AddRoutingTableToAreaPayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
// A config setting for a routing table which allows propagation of dynamic routes to this routing table.
|
||||
DynamicRoutes AddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType `json:"dynamicRoutes,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id AddRoutingTableToAreaPayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels AddRoutingTableToAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name AddRoutingTableToAreaPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA.
|
||||
SystemRoutes AddRoutingTableToAreaPayloadgetSystemRoutesAttributeType `json:"systemRoutes,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt AddRoutingTableToAreaPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _AddRoutingTableToAreaPayload AddRoutingTableToAreaPayload
|
||||
|
||||
// NewAddRoutingTableToAreaPayload instantiates a new AddRoutingTableToAreaPayload 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 NewAddRoutingTableToAreaPayload(name AddRoutingTableToAreaPayloadGetNameArgType) *AddRoutingTableToAreaPayload {
|
||||
this := AddRoutingTableToAreaPayload{}
|
||||
setAddRoutingTableToAreaPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAddRoutingTableToAreaPayloadWithDefaults instantiates a new AddRoutingTableToAreaPayload 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 NewAddRoutingTableToAreaPayloadWithDefaults() *AddRoutingTableToAreaPayload {
|
||||
this := AddRoutingTableToAreaPayload{}
|
||||
var dynamicRoutes bool = true
|
||||
this.DynamicRoutes = &dynamicRoutes
|
||||
var systemRoutes bool = true
|
||||
this.SystemRoutes = &systemRoutes
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetCreatedAt() (res AddRoutingTableToAreaPayloadGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetCreatedAtOk() (ret AddRoutingTableToAreaPayloadGetCreatedAtRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetCreatedAt(v AddRoutingTableToAreaPayloadGetCreatedAtRetType) {
|
||||
setAddRoutingTableToAreaPayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDefault returns the Default field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetDefault() (res AddRoutingTableToAreaPayloadgetDefaultRetType) {
|
||||
res, _ = o.GetDefaultOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetDefaultOk() (ret AddRoutingTableToAreaPayloadgetDefaultRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadgetDefaultAttributeTypeOk(o.Default)
|
||||
}
|
||||
|
||||
// HasDefault returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasDefault() bool {
|
||||
_, ok := o.GetDefaultOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDefault gets a reference to the given bool and assigns it to the Default field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetDefault(v AddRoutingTableToAreaPayloadgetDefaultRetType) {
|
||||
setAddRoutingTableToAreaPayloadgetDefaultAttributeType(&o.Default, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetDescription() (res AddRoutingTableToAreaPayloadGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetDescriptionOk() (ret AddRoutingTableToAreaPayloadGetDescriptionRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetDescription(v AddRoutingTableToAreaPayloadGetDescriptionRetType) {
|
||||
setAddRoutingTableToAreaPayloadGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetDynamicRoutes() (res AddRoutingTableToAreaPayloadgetDynamicRoutesRetType) {
|
||||
res, _ = o.GetDynamicRoutesOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetDynamicRoutesOk() (ret AddRoutingTableToAreaPayloadgetDynamicRoutesRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeTypeOk(o.DynamicRoutes)
|
||||
}
|
||||
|
||||
// HasDynamicRoutes returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasDynamicRoutes() bool {
|
||||
_, ok := o.GetDynamicRoutesOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetDynamicRoutes(v AddRoutingTableToAreaPayloadgetDynamicRoutesRetType) {
|
||||
setAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeType(&o.DynamicRoutes, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetId() (res AddRoutingTableToAreaPayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetIdOk() (ret AddRoutingTableToAreaPayloadGetIdRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetId(v AddRoutingTableToAreaPayloadGetIdRetType) {
|
||||
setAddRoutingTableToAreaPayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetLabels() (res AddRoutingTableToAreaPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetLabelsOk() (ret AddRoutingTableToAreaPayloadGetLabelsRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetLabels(v AddRoutingTableToAreaPayloadGetLabelsRetType) {
|
||||
setAddRoutingTableToAreaPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *AddRoutingTableToAreaPayload) GetName() (ret AddRoutingTableToAreaPayloadGetNameRetType) {
|
||||
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 *AddRoutingTableToAreaPayload) GetNameOk() (ret AddRoutingTableToAreaPayloadGetNameRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *AddRoutingTableToAreaPayload) SetName(v AddRoutingTableToAreaPayloadGetNameRetType) {
|
||||
setAddRoutingTableToAreaPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetSystemRoutes() (res AddRoutingTableToAreaPayloadgetSystemRoutesRetType) {
|
||||
res, _ = o.GetSystemRoutesOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetSystemRoutesOk() (ret AddRoutingTableToAreaPayloadgetSystemRoutesRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadgetSystemRoutesAttributeTypeOk(o.SystemRoutes)
|
||||
}
|
||||
|
||||
// HasSystemRoutes returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasSystemRoutes() bool {
|
||||
_, ok := o.GetSystemRoutesOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetSystemRoutes(v AddRoutingTableToAreaPayloadgetSystemRoutesRetType) {
|
||||
setAddRoutingTableToAreaPayloadgetSystemRoutesAttributeType(&o.SystemRoutes, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *AddRoutingTableToAreaPayload) GetUpdatedAt() (res AddRoutingTableToAreaPayloadGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) GetUpdatedAtOk() (ret AddRoutingTableToAreaPayloadGetUpdatedAtRetType, ok bool) {
|
||||
return getAddRoutingTableToAreaPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *AddRoutingTableToAreaPayload) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *AddRoutingTableToAreaPayload) SetUpdatedAt(v AddRoutingTableToAreaPayloadGetUpdatedAtRetType) {
|
||||
setAddRoutingTableToAreaPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o AddRoutingTableToAreaPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadgetDefaultAttributeTypeOk(o.Default); ok {
|
||||
toSerialize["Default"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadgetDynamicRoutesAttributeTypeOk(o.DynamicRoutes); ok {
|
||||
toSerialize["DynamicRoutes"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadgetSystemRoutesAttributeTypeOk(o.SystemRoutes); ok {
|
||||
toSerialize["SystemRoutes"] = val
|
||||
}
|
||||
if val, ok := getAddRoutingTableToAreaPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableAddRoutingTableToAreaPayload struct {
|
||||
value *AddRoutingTableToAreaPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAddRoutingTableToAreaPayload) Get() *AddRoutingTableToAreaPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAddRoutingTableToAreaPayload) Set(val *AddRoutingTableToAreaPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAddRoutingTableToAreaPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAddRoutingTableToAreaPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAddRoutingTableToAreaPayload(val *AddRoutingTableToAreaPayload) *NullableAddRoutingTableToAreaPayload {
|
||||
return &NullableAddRoutingTableToAreaPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAddRoutingTableToAreaPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAddRoutingTableToAreaPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_add_routing_table_to_area_payload_test.go
Normal file
11
pkg/iaasbeta/model_add_routing_table_to_area_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
226
pkg/iaasbeta/model_add_volume_to_server_payload.go
Normal file
226
pkg/iaasbeta/model_add_volume_to_server_payload.go
Normal file
|
|
@ -0,0 +1,226 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AddVolumeToServerPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AddVolumeToServerPayload{}
|
||||
|
||||
/*
|
||||
types and functions for deleteOnTermination
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType = *bool
|
||||
type AddVolumeToServerPayloadgetDeleteOnTerminationArgType = bool
|
||||
type AddVolumeToServerPayloadgetDeleteOnTerminationRetType = bool
|
||||
|
||||
func getAddVolumeToServerPayloadgetDeleteOnTerminationAttributeTypeOk(arg AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType) (ret AddVolumeToServerPayloadgetDeleteOnTerminationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddVolumeToServerPayloadgetDeleteOnTerminationAttributeType(arg *AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType, val AddVolumeToServerPayloadgetDeleteOnTerminationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for serverId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AddVolumeToServerPayloadGetServerIdAttributeType = *string
|
||||
|
||||
func getAddVolumeToServerPayloadGetServerIdAttributeTypeOk(arg AddVolumeToServerPayloadGetServerIdAttributeType) (ret AddVolumeToServerPayloadGetServerIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddVolumeToServerPayloadGetServerIdAttributeType(arg *AddVolumeToServerPayloadGetServerIdAttributeType, val AddVolumeToServerPayloadGetServerIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AddVolumeToServerPayloadGetServerIdArgType = string
|
||||
type AddVolumeToServerPayloadGetServerIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for volumeId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AddVolumeToServerPayloadGetVolumeIdAttributeType = *string
|
||||
|
||||
func getAddVolumeToServerPayloadGetVolumeIdAttributeTypeOk(arg AddVolumeToServerPayloadGetVolumeIdAttributeType) (ret AddVolumeToServerPayloadGetVolumeIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAddVolumeToServerPayloadGetVolumeIdAttributeType(arg *AddVolumeToServerPayloadGetVolumeIdAttributeType, val AddVolumeToServerPayloadGetVolumeIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AddVolumeToServerPayloadGetVolumeIdArgType = string
|
||||
type AddVolumeToServerPayloadGetVolumeIdRetType = string
|
||||
|
||||
// AddVolumeToServerPayload Object that represents a Volume attachment to a server.
|
||||
type AddVolumeToServerPayload struct {
|
||||
// Delete the volume during the termination of the server. Defaults to false.
|
||||
DeleteOnTermination AddVolumeToServerPayloadgetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
ServerId AddVolumeToServerPayloadGetServerIdAttributeType `json:"serverId,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
VolumeId AddVolumeToServerPayloadGetVolumeIdAttributeType `json:"volumeId,omitempty"`
|
||||
}
|
||||
|
||||
// NewAddVolumeToServerPayload instantiates a new AddVolumeToServerPayload 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 NewAddVolumeToServerPayload() *AddVolumeToServerPayload {
|
||||
this := AddVolumeToServerPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAddVolumeToServerPayloadWithDefaults instantiates a new AddVolumeToServerPayload 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 NewAddVolumeToServerPayloadWithDefaults() *AddVolumeToServerPayload {
|
||||
this := AddVolumeToServerPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise.
|
||||
func (o *AddVolumeToServerPayload) GetDeleteOnTermination() (res AddVolumeToServerPayloadgetDeleteOnTerminationRetType) {
|
||||
res, _ = o.GetDeleteOnTerminationOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddVolumeToServerPayload) GetDeleteOnTerminationOk() (ret AddVolumeToServerPayloadgetDeleteOnTerminationRetType, ok bool) {
|
||||
return getAddVolumeToServerPayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination)
|
||||
}
|
||||
|
||||
// HasDeleteOnTermination returns a boolean if a field has been set.
|
||||
func (o *AddVolumeToServerPayload) HasDeleteOnTermination() bool {
|
||||
_, ok := o.GetDeleteOnTerminationOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field.
|
||||
func (o *AddVolumeToServerPayload) SetDeleteOnTermination(v AddVolumeToServerPayloadgetDeleteOnTerminationRetType) {
|
||||
setAddVolumeToServerPayloadgetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, v)
|
||||
}
|
||||
|
||||
// GetServerId returns the ServerId field value if set, zero value otherwise.
|
||||
func (o *AddVolumeToServerPayload) GetServerId() (res AddVolumeToServerPayloadGetServerIdRetType) {
|
||||
res, _ = o.GetServerIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddVolumeToServerPayload) GetServerIdOk() (ret AddVolumeToServerPayloadGetServerIdRetType, ok bool) {
|
||||
return getAddVolumeToServerPayloadGetServerIdAttributeTypeOk(o.ServerId)
|
||||
}
|
||||
|
||||
// HasServerId returns a boolean if a field has been set.
|
||||
func (o *AddVolumeToServerPayload) HasServerId() bool {
|
||||
_, ok := o.GetServerIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetServerId gets a reference to the given string and assigns it to the ServerId field.
|
||||
func (o *AddVolumeToServerPayload) SetServerId(v AddVolumeToServerPayloadGetServerIdRetType) {
|
||||
setAddVolumeToServerPayloadGetServerIdAttributeType(&o.ServerId, v)
|
||||
}
|
||||
|
||||
// GetVolumeId returns the VolumeId field value if set, zero value otherwise.
|
||||
func (o *AddVolumeToServerPayload) GetVolumeId() (res AddVolumeToServerPayloadGetVolumeIdRetType) {
|
||||
res, _ = o.GetVolumeIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetVolumeIdOk returns a tuple with the VolumeId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AddVolumeToServerPayload) GetVolumeIdOk() (ret AddVolumeToServerPayloadGetVolumeIdRetType, ok bool) {
|
||||
return getAddVolumeToServerPayloadGetVolumeIdAttributeTypeOk(o.VolumeId)
|
||||
}
|
||||
|
||||
// HasVolumeId returns a boolean if a field has been set.
|
||||
func (o *AddVolumeToServerPayload) HasVolumeId() bool {
|
||||
_, ok := o.GetVolumeIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field.
|
||||
func (o *AddVolumeToServerPayload) SetVolumeId(v AddVolumeToServerPayloadGetVolumeIdRetType) {
|
||||
setAddVolumeToServerPayloadGetVolumeIdAttributeType(&o.VolumeId, v)
|
||||
}
|
||||
|
||||
func (o AddVolumeToServerPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getAddVolumeToServerPayloadgetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok {
|
||||
toSerialize["DeleteOnTermination"] = val
|
||||
}
|
||||
if val, ok := getAddVolumeToServerPayloadGetServerIdAttributeTypeOk(o.ServerId); ok {
|
||||
toSerialize["ServerId"] = val
|
||||
}
|
||||
if val, ok := getAddVolumeToServerPayloadGetVolumeIdAttributeTypeOk(o.VolumeId); ok {
|
||||
toSerialize["VolumeId"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableAddVolumeToServerPayload struct {
|
||||
value *AddVolumeToServerPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAddVolumeToServerPayload) Get() *AddVolumeToServerPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAddVolumeToServerPayload) Set(val *AddVolumeToServerPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAddVolumeToServerPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAddVolumeToServerPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAddVolumeToServerPayload(val *AddVolumeToServerPayload) *NullableAddVolumeToServerPayload {
|
||||
return &NullableAddVolumeToServerPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAddVolumeToServerPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAddVolumeToServerPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_add_volume_to_server_payload_test.go
Normal file
11
pkg/iaasbeta/model_add_volume_to_server_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
269
pkg/iaasbeta/model_affinity_group.go
Normal file
269
pkg/iaasbeta/model_affinity_group.go
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AffinityGroup type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AffinityGroup{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AffinityGroupGetIdAttributeType = *string
|
||||
|
||||
func getAffinityGroupGetIdAttributeTypeOk(arg AffinityGroupGetIdAttributeType) (ret AffinityGroupGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAffinityGroupGetIdAttributeType(arg *AffinityGroupGetIdAttributeType, val AffinityGroupGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AffinityGroupGetIdArgType = string
|
||||
type AffinityGroupGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for members
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type AffinityGroupGetMembersAttributeType = *[]string
|
||||
type AffinityGroupGetMembersArgType = []string
|
||||
type AffinityGroupGetMembersRetType = []string
|
||||
|
||||
func getAffinityGroupGetMembersAttributeTypeOk(arg AffinityGroupGetMembersAttributeType) (ret AffinityGroupGetMembersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAffinityGroupGetMembersAttributeType(arg *AffinityGroupGetMembersAttributeType, val AffinityGroupGetMembersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AffinityGroupGetNameAttributeType = *string
|
||||
|
||||
func getAffinityGroupGetNameAttributeTypeOk(arg AffinityGroupGetNameAttributeType) (ret AffinityGroupGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAffinityGroupGetNameAttributeType(arg *AffinityGroupGetNameAttributeType, val AffinityGroupGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AffinityGroupGetNameArgType = string
|
||||
type AffinityGroupGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for policy
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type AffinityGroupGetPolicyAttributeType = *string
|
||||
|
||||
func getAffinityGroupGetPolicyAttributeTypeOk(arg AffinityGroupGetPolicyAttributeType) (ret AffinityGroupGetPolicyRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAffinityGroupGetPolicyAttributeType(arg *AffinityGroupGetPolicyAttributeType, val AffinityGroupGetPolicyRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type AffinityGroupGetPolicyArgType = string
|
||||
type AffinityGroupGetPolicyRetType = string
|
||||
|
||||
// AffinityGroup Definition of an affinity group.
|
||||
type AffinityGroup struct {
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id AffinityGroupGetIdAttributeType `json:"id,omitempty"`
|
||||
// The servers that are part of the affinity group.
|
||||
Members AffinityGroupGetMembersAttributeType `json:"members,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name AffinityGroupGetNameAttributeType `json:"name" required:"true"`
|
||||
// The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`.
|
||||
// REQUIRED
|
||||
Policy AffinityGroupGetPolicyAttributeType `json:"policy" required:"true"`
|
||||
}
|
||||
|
||||
type _AffinityGroup AffinityGroup
|
||||
|
||||
// NewAffinityGroup instantiates a new AffinityGroup 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 NewAffinityGroup(name AffinityGroupGetNameArgType, policy AffinityGroupGetPolicyArgType) *AffinityGroup {
|
||||
this := AffinityGroup{}
|
||||
setAffinityGroupGetNameAttributeType(&this.Name, name)
|
||||
setAffinityGroupGetPolicyAttributeType(&this.Policy, policy)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAffinityGroupWithDefaults instantiates a new AffinityGroup 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 NewAffinityGroupWithDefaults() *AffinityGroup {
|
||||
this := AffinityGroup{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *AffinityGroup) GetId() (res AffinityGroupGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AffinityGroup) GetIdOk() (ret AffinityGroupGetIdRetType, ok bool) {
|
||||
return getAffinityGroupGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *AffinityGroup) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *AffinityGroup) SetId(v AffinityGroupGetIdRetType) {
|
||||
setAffinityGroupGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetMembers returns the Members field value if set, zero value otherwise.
|
||||
func (o *AffinityGroup) GetMembers() (res AffinityGroupGetMembersRetType) {
|
||||
res, _ = o.GetMembersOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMembersOk returns a tuple with the Members field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AffinityGroup) GetMembersOk() (ret AffinityGroupGetMembersRetType, ok bool) {
|
||||
return getAffinityGroupGetMembersAttributeTypeOk(o.Members)
|
||||
}
|
||||
|
||||
// HasMembers returns a boolean if a field has been set.
|
||||
func (o *AffinityGroup) HasMembers() bool {
|
||||
_, ok := o.GetMembersOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMembers gets a reference to the given []string and assigns it to the Members field.
|
||||
func (o *AffinityGroup) SetMembers(v AffinityGroupGetMembersRetType) {
|
||||
setAffinityGroupGetMembersAttributeType(&o.Members, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *AffinityGroup) GetName() (ret AffinityGroupGetNameRetType) {
|
||||
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 *AffinityGroup) GetNameOk() (ret AffinityGroupGetNameRetType, ok bool) {
|
||||
return getAffinityGroupGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *AffinityGroup) SetName(v AffinityGroupGetNameRetType) {
|
||||
setAffinityGroupGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetPolicy returns the Policy field value
|
||||
func (o *AffinityGroup) GetPolicy() (ret AffinityGroupGetPolicyRetType) {
|
||||
ret, _ = o.GetPolicyOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPolicyOk returns a tuple with the Policy field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AffinityGroup) GetPolicyOk() (ret AffinityGroupGetPolicyRetType, ok bool) {
|
||||
return getAffinityGroupGetPolicyAttributeTypeOk(o.Policy)
|
||||
}
|
||||
|
||||
// SetPolicy sets field value
|
||||
func (o *AffinityGroup) SetPolicy(v AffinityGroupGetPolicyRetType) {
|
||||
setAffinityGroupGetPolicyAttributeType(&o.Policy, v)
|
||||
}
|
||||
|
||||
func (o AffinityGroup) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getAffinityGroupGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getAffinityGroupGetMembersAttributeTypeOk(o.Members); ok {
|
||||
toSerialize["Members"] = val
|
||||
}
|
||||
if val, ok := getAffinityGroupGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getAffinityGroupGetPolicyAttributeTypeOk(o.Policy); ok {
|
||||
toSerialize["Policy"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableAffinityGroup struct {
|
||||
value *AffinityGroup
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAffinityGroup) Get() *AffinityGroup {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAffinityGroup) Set(val *AffinityGroup) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAffinityGroup) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAffinityGroup) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAffinityGroup(val *AffinityGroup) *NullableAffinityGroup {
|
||||
return &NullableAffinityGroup{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAffinityGroup) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAffinityGroup) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
126
pkg/iaasbeta/model_affinity_group_list_response.go
Normal file
126
pkg/iaasbeta/model_affinity_group_list_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AffinityGroupListResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AffinityGroupListResponse{}
|
||||
|
||||
/*
|
||||
types and functions for items
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type AffinityGroupListResponseGetItemsAttributeType = *[]AffinityGroup
|
||||
type AffinityGroupListResponseGetItemsArgType = []AffinityGroup
|
||||
type AffinityGroupListResponseGetItemsRetType = []AffinityGroup
|
||||
|
||||
func getAffinityGroupListResponseGetItemsAttributeTypeOk(arg AffinityGroupListResponseGetItemsAttributeType) (ret AffinityGroupListResponseGetItemsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAffinityGroupListResponseGetItemsAttributeType(arg *AffinityGroupListResponseGetItemsAttributeType, val AffinityGroupListResponseGetItemsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// AffinityGroupListResponse Response object for affinity group list request.
|
||||
type AffinityGroupListResponse struct {
|
||||
// A list of affinity groups.
|
||||
// REQUIRED
|
||||
Items AffinityGroupListResponseGetItemsAttributeType `json:"items" required:"true"`
|
||||
}
|
||||
|
||||
type _AffinityGroupListResponse AffinityGroupListResponse
|
||||
|
||||
// NewAffinityGroupListResponse instantiates a new AffinityGroupListResponse 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 NewAffinityGroupListResponse(items AffinityGroupListResponseGetItemsArgType) *AffinityGroupListResponse {
|
||||
this := AffinityGroupListResponse{}
|
||||
setAffinityGroupListResponseGetItemsAttributeType(&this.Items, items)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAffinityGroupListResponseWithDefaults instantiates a new AffinityGroupListResponse 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 NewAffinityGroupListResponseWithDefaults() *AffinityGroupListResponse {
|
||||
this := AffinityGroupListResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetItems returns the Items field value
|
||||
func (o *AffinityGroupListResponse) GetItems() (ret AffinityGroupListResponseGetItemsRetType) {
|
||||
ret, _ = o.GetItemsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetItemsOk returns a tuple with the Items field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AffinityGroupListResponse) GetItemsOk() (ret AffinityGroupListResponseGetItemsRetType, ok bool) {
|
||||
return getAffinityGroupListResponseGetItemsAttributeTypeOk(o.Items)
|
||||
}
|
||||
|
||||
// SetItems sets field value
|
||||
func (o *AffinityGroupListResponse) SetItems(v AffinityGroupListResponseGetItemsRetType) {
|
||||
setAffinityGroupListResponseGetItemsAttributeType(&o.Items, v)
|
||||
}
|
||||
|
||||
func (o AffinityGroupListResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getAffinityGroupListResponseGetItemsAttributeTypeOk(o.Items); ok {
|
||||
toSerialize["Items"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableAffinityGroupListResponse struct {
|
||||
value *AffinityGroupListResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAffinityGroupListResponse) Get() *AffinityGroupListResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAffinityGroupListResponse) Set(val *AffinityGroupListResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAffinityGroupListResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAffinityGroupListResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAffinityGroupListResponse(val *AffinityGroupListResponse) *NullableAffinityGroupListResponse {
|
||||
return &NullableAffinityGroupListResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAffinityGroupListResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAffinityGroupListResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_affinity_group_list_response_test.go
Normal file
11
pkg/iaasbeta/model_affinity_group_list_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
11
pkg/iaasbeta/model_affinity_group_test.go
Normal file
11
pkg/iaasbeta/model_affinity_group_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
138
pkg/iaasbeta/model_allowed_addresses_inner.go
Normal file
138
pkg/iaasbeta/model_allowed_addresses_inner.go
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
// AllowedAddressesInner - struct for AllowedAddressesInner
|
||||
type AllowedAddressesInner struct {
|
||||
String *string
|
||||
}
|
||||
|
||||
// stringAsAllowedAddressesInner is a convenience function that returns string wrapped in AllowedAddressesInner
|
||||
func StringAsAllowedAddressesInner(v *string) AllowedAddressesInner {
|
||||
return AllowedAddressesInner{
|
||||
String: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *AllowedAddressesInner) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
match := 0
|
||||
// Workaround until upstream issue is fixed:
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/21751
|
||||
// Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
|
||||
// try to unmarshal data into String
|
||||
dstAllowedAddressesInner1 := &AllowedAddressesInner{}
|
||||
err = json.Unmarshal(data, &dstAllowedAddressesInner1.String)
|
||||
if err == nil {
|
||||
jsonString, _ := json.Marshal(&dstAllowedAddressesInner1.String)
|
||||
regex := `/((^\\s*((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))\\s*$)|(^\\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$))/`
|
||||
regex = regexp.MustCompile("^\\/|\\/$").ReplaceAllString(regex, "$1") // Remove beginning slash and ending slash
|
||||
regex = regexp.MustCompile("\\\\(.)").ReplaceAllString(regex, "$1") // Remove duplicate escaping char for dots
|
||||
rawString := regexp.MustCompile(`^"|"$`).ReplaceAllString(*dstAllowedAddressesInner1.String, "$1") // Remove quotes
|
||||
isMatched, _ := regexp.MatchString(regex, rawString)
|
||||
if string(jsonString) != "{}" && isMatched { // empty struct
|
||||
dst.String = dstAllowedAddressesInner1.String
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
// try to unmarshal data into String
|
||||
dstAllowedAddressesInner2 := &AllowedAddressesInner{}
|
||||
err = json.Unmarshal(data, &dstAllowedAddressesInner2.String)
|
||||
if err == nil {
|
||||
jsonString, _ := json.Marshal(&dstAllowedAddressesInner2.String)
|
||||
regex := `/^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\/(3[0-2]|2[0-9]|1[0-9]|[0-9]))$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(\/((1(1[0-9]|2[0-8]))|([0-9][0-9])|([0-9])))?$/`
|
||||
regex = regexp.MustCompile("^\\/|\\/$").ReplaceAllString(regex, "$1") // Remove beginning slash and ending slash
|
||||
regex = regexp.MustCompile("\\\\(.)").ReplaceAllString(regex, "$1") // Remove duplicate escaping char for dots
|
||||
rawString := regexp.MustCompile(`^"|"$`).ReplaceAllString(*dstAllowedAddressesInner2.String, "$1") // Remove quotes
|
||||
isMatched, _ := regexp.MatchString(regex, rawString)
|
||||
if string(jsonString) != "{}" && isMatched { // empty struct
|
||||
dst.String = dstAllowedAddressesInner2.String
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
if match > 1 { // more than 1 match
|
||||
// reset to nil
|
||||
dst.String = nil
|
||||
|
||||
return fmt.Errorf("data matches more than one schema in oneOf(AllowedAddressesInner)")
|
||||
} else if match == 1 {
|
||||
return nil // exactly one match
|
||||
} else { // no match
|
||||
return fmt.Errorf("data failed to match schemas in oneOf(AllowedAddressesInner)")
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src AllowedAddressesInner) MarshalJSON() ([]byte, error) {
|
||||
if src.String != nil {
|
||||
return json.Marshal(&src.String)
|
||||
}
|
||||
|
||||
return []byte("{}"), nil // no data in oneOf schemas => empty JSON object
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *AllowedAddressesInner) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.String != nil {
|
||||
return obj.String
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableAllowedAddressesInner struct {
|
||||
value *AllowedAddressesInner
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAllowedAddressesInner) Get() *AllowedAddressesInner {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAllowedAddressesInner) Set(val *AllowedAddressesInner) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAllowedAddressesInner) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAllowedAddressesInner) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAllowedAddressesInner(val *AllowedAddressesInner) *NullableAllowedAddressesInner {
|
||||
return &NullableAllowedAddressesInner{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAllowedAddressesInner) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAllowedAddressesInner) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
60
pkg/iaasbeta/model_allowed_addresses_inner_test.go
Normal file
60
pkg/iaasbeta/model_allowed_addresses_inner_test.go
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isOneOf
|
||||
|
||||
func TestAllowedAddressesInner_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{
|
||||
|
||||
{
|
||||
name: "success - string 10.1.2.10",
|
||||
args: args{
|
||||
src: []byte(`"10.1.2.10"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "success - string 192.168.0.0/24",
|
||||
args: args{
|
||||
src: []byte(`"192.168.0.0/24"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := &AllowedAddressesInner{}
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
marshalJson, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("failed marshalling AllowedAddressesInner: %v", err)
|
||||
}
|
||||
if string(marshalJson) != string(tt.args.src) {
|
||||
t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
150
pkg/iaasbeta/model_area_id.go
Normal file
150
pkg/iaasbeta/model_area_id.go
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
// AreaId - The identifier (ID) of an area.
|
||||
type AreaId struct {
|
||||
StaticAreaID *StaticAreaID
|
||||
String *string
|
||||
}
|
||||
|
||||
// StaticAreaIDAsAreaId is a convenience function that returns StaticAreaID wrapped in AreaId
|
||||
func StaticAreaIDAsAreaId(v *StaticAreaID) AreaId {
|
||||
return AreaId{
|
||||
StaticAreaID: v,
|
||||
}
|
||||
}
|
||||
|
||||
// stringAsAreaId is a convenience function that returns string wrapped in AreaId
|
||||
func StringAsAreaId(v *string) AreaId {
|
||||
return AreaId{
|
||||
String: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *AreaId) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
match := 0
|
||||
// Workaround until upstream issue is fixed:
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/21751
|
||||
// Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
|
||||
// try to unmarshal data into String
|
||||
dstAreaId1 := &AreaId{}
|
||||
err = json.Unmarshal(data, &dstAreaId1.String)
|
||||
if err == nil {
|
||||
jsonString, _ := json.Marshal(&dstAreaId1.String)
|
||||
regex := `/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/`
|
||||
regex = regexp.MustCompile("^\\/|\\/$").ReplaceAllString(regex, "$1") // Remove beginning slash and ending slash
|
||||
regex = regexp.MustCompile("\\\\(.)").ReplaceAllString(regex, "$1") // Remove duplicate escaping char for dots
|
||||
rawString := regexp.MustCompile(`^"|"$`).ReplaceAllString(*dstAreaId1.String, "$1") // Remove quotes
|
||||
isMatched, _ := regexp.MatchString(regex, rawString)
|
||||
if string(jsonString) != "{}" && isMatched { // empty struct
|
||||
dst.String = dstAreaId1.String
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
// try to unmarshal data into StaticAreaID
|
||||
dstAreaId2 := &AreaId{}
|
||||
err = json.Unmarshal(data, &dstAreaId2.StaticAreaID)
|
||||
if err == nil {
|
||||
jsonStaticAreaID, _ := json.Marshal(&dstAreaId2.StaticAreaID)
|
||||
if string(jsonStaticAreaID) != "{}" { // empty struct
|
||||
dst.StaticAreaID = dstAreaId2.StaticAreaID
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
if match > 1 { // more than 1 match
|
||||
// reset to nil
|
||||
dst.StaticAreaID = nil
|
||||
dst.String = nil
|
||||
|
||||
return fmt.Errorf("data matches more than one schema in oneOf(AreaId)")
|
||||
} else if match == 1 {
|
||||
return nil // exactly one match
|
||||
} else { // no match
|
||||
return fmt.Errorf("data failed to match schemas in oneOf(AreaId)")
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src AreaId) MarshalJSON() ([]byte, error) {
|
||||
if src.StaticAreaID != nil {
|
||||
return json.Marshal(&src.StaticAreaID)
|
||||
}
|
||||
|
||||
if src.String != nil {
|
||||
return json.Marshal(&src.String)
|
||||
}
|
||||
|
||||
return []byte("{}"), nil // no data in oneOf schemas => empty JSON object
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *AreaId) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.StaticAreaID != nil {
|
||||
return obj.StaticAreaID
|
||||
}
|
||||
|
||||
if obj.String != nil {
|
||||
return obj.String
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableAreaId struct {
|
||||
value *AreaId
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAreaId) Get() *AreaId {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAreaId) Set(val *AreaId) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAreaId) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAreaId) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAreaId(val *AreaId) *NullableAreaId {
|
||||
return &NullableAreaId{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAreaId) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAreaId) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
67
pkg/iaasbeta/model_area_id_test.go
Normal file
67
pkg/iaasbeta/model_area_id_test.go
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isOneOf
|
||||
|
||||
func TestAreaId_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{
|
||||
|
||||
{
|
||||
name: "success - string d61a8564-c8dd-4ffb-bc15-143e7d0c85ed",
|
||||
args: args{
|
||||
src: []byte(`"d61a8564-c8dd-4ffb-bc15-143e7d0c85ed"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "success - StaticAreaID PUBLIC",
|
||||
args: args{
|
||||
src: []byte(`"PUBLIC"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "success - StaticAreaID SCHWARZ",
|
||||
args: args{
|
||||
src: []byte(`"SCHWARZ"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := &AreaId{}
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
marshalJson, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("failed marshalling AreaId: %v", err)
|
||||
}
|
||||
if string(marshalJson) != string(tt.args.src) {
|
||||
t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
126
pkg/iaasbeta/model_availability_zone_list_response.go
Normal file
126
pkg/iaasbeta/model_availability_zone_list_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the AvailabilityZoneListResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &AvailabilityZoneListResponse{}
|
||||
|
||||
/*
|
||||
types and functions for items
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type AvailabilityZoneListResponseGetItemsAttributeType = *[]string
|
||||
type AvailabilityZoneListResponseGetItemsArgType = []string
|
||||
type AvailabilityZoneListResponseGetItemsRetType = []string
|
||||
|
||||
func getAvailabilityZoneListResponseGetItemsAttributeTypeOk(arg AvailabilityZoneListResponseGetItemsAttributeType) (ret AvailabilityZoneListResponseGetItemsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setAvailabilityZoneListResponseGetItemsAttributeType(arg *AvailabilityZoneListResponseGetItemsAttributeType, val AvailabilityZoneListResponseGetItemsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// AvailabilityZoneListResponse Availability Zone list response.
|
||||
type AvailabilityZoneListResponse struct {
|
||||
// A list of availability zones.
|
||||
// REQUIRED
|
||||
Items AvailabilityZoneListResponseGetItemsAttributeType `json:"items" required:"true"`
|
||||
}
|
||||
|
||||
type _AvailabilityZoneListResponse AvailabilityZoneListResponse
|
||||
|
||||
// NewAvailabilityZoneListResponse instantiates a new AvailabilityZoneListResponse 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 NewAvailabilityZoneListResponse(items AvailabilityZoneListResponseGetItemsArgType) *AvailabilityZoneListResponse {
|
||||
this := AvailabilityZoneListResponse{}
|
||||
setAvailabilityZoneListResponseGetItemsAttributeType(&this.Items, items)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewAvailabilityZoneListResponseWithDefaults instantiates a new AvailabilityZoneListResponse 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 NewAvailabilityZoneListResponseWithDefaults() *AvailabilityZoneListResponse {
|
||||
this := AvailabilityZoneListResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetItems returns the Items field value
|
||||
func (o *AvailabilityZoneListResponse) GetItems() (ret AvailabilityZoneListResponseGetItemsRetType) {
|
||||
ret, _ = o.GetItemsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetItemsOk returns a tuple with the Items field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *AvailabilityZoneListResponse) GetItemsOk() (ret AvailabilityZoneListResponseGetItemsRetType, ok bool) {
|
||||
return getAvailabilityZoneListResponseGetItemsAttributeTypeOk(o.Items)
|
||||
}
|
||||
|
||||
// SetItems sets field value
|
||||
func (o *AvailabilityZoneListResponse) SetItems(v AvailabilityZoneListResponseGetItemsRetType) {
|
||||
setAvailabilityZoneListResponseGetItemsAttributeType(&o.Items, v)
|
||||
}
|
||||
|
||||
func (o AvailabilityZoneListResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getAvailabilityZoneListResponseGetItemsAttributeTypeOk(o.Items); ok {
|
||||
toSerialize["Items"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableAvailabilityZoneListResponse struct {
|
||||
value *AvailabilityZoneListResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableAvailabilityZoneListResponse) Get() *AvailabilityZoneListResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableAvailabilityZoneListResponse) Set(val *AvailabilityZoneListResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableAvailabilityZoneListResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableAvailabilityZoneListResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableAvailabilityZoneListResponse(val *AvailabilityZoneListResponse) *NullableAvailabilityZoneListResponse {
|
||||
return &NullableAvailabilityZoneListResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableAvailabilityZoneListResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableAvailabilityZoneListResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_availability_zone_list_response_test.go
Normal file
11
pkg/iaasbeta/model_availability_zone_list_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
615
pkg/iaasbeta/model_backup.go
Normal file
615
pkg/iaasbeta/model_backup.go
Normal file
|
|
@ -0,0 +1,615 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the Backup type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Backup{}
|
||||
|
||||
/*
|
||||
types and functions for availabilityZone
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupGetAvailabilityZoneAttributeType = *string
|
||||
|
||||
func getBackupGetAvailabilityZoneAttributeTypeOk(arg BackupGetAvailabilityZoneAttributeType) (ret BackupGetAvailabilityZoneRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetAvailabilityZoneAttributeType(arg *BackupGetAvailabilityZoneAttributeType, val BackupGetAvailabilityZoneRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupGetAvailabilityZoneArgType = string
|
||||
type BackupGetAvailabilityZoneRetType = string
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type BackupGetCreatedAtAttributeType = *time.Time
|
||||
type BackupGetCreatedAtArgType = time.Time
|
||||
type BackupGetCreatedAtRetType = time.Time
|
||||
|
||||
func getBackupGetCreatedAtAttributeTypeOk(arg BackupGetCreatedAtAttributeType) (ret BackupGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetCreatedAtAttributeType(arg *BackupGetCreatedAtAttributeType, val BackupGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for encrypted
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type BackupgetEncryptedAttributeType = *bool
|
||||
type BackupgetEncryptedArgType = bool
|
||||
type BackupgetEncryptedRetType = bool
|
||||
|
||||
func getBackupgetEncryptedAttributeTypeOk(arg BackupgetEncryptedAttributeType) (ret BackupgetEncryptedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupgetEncryptedAttributeType(arg *BackupgetEncryptedAttributeType, val BackupgetEncryptedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupGetIdAttributeType = *string
|
||||
|
||||
func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetIdAttributeType(arg *BackupGetIdAttributeType, val BackupGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupGetIdArgType = string
|
||||
type BackupGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type BackupGetLabelsAttributeType = *map[string]interface{}
|
||||
type BackupGetLabelsArgType = map[string]interface{}
|
||||
type BackupGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getBackupGetLabelsAttributeTypeOk(arg BackupGetLabelsAttributeType) (ret BackupGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetLabelsAttributeType(arg *BackupGetLabelsAttributeType, val BackupGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupGetNameAttributeType = *string
|
||||
|
||||
func getBackupGetNameAttributeTypeOk(arg BackupGetNameAttributeType) (ret BackupGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetNameAttributeType(arg *BackupGetNameAttributeType, val BackupGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupGetNameArgType = string
|
||||
type BackupGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type BackupGetSizeAttributeType = *int64
|
||||
type BackupGetSizeArgType = int64
|
||||
type BackupGetSizeRetType = int64
|
||||
|
||||
func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret BackupGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for snapshotId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupGetSnapshotIdAttributeType = *string
|
||||
|
||||
func getBackupGetSnapshotIdAttributeTypeOk(arg BackupGetSnapshotIdAttributeType) (ret BackupGetSnapshotIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetSnapshotIdAttributeType(arg *BackupGetSnapshotIdAttributeType, val BackupGetSnapshotIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupGetSnapshotIdArgType = string
|
||||
type BackupGetSnapshotIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupGetStatusAttributeType = *string
|
||||
|
||||
func getBackupGetStatusAttributeTypeOk(arg BackupGetStatusAttributeType) (ret BackupGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetStatusAttributeType(arg *BackupGetStatusAttributeType, val BackupGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupGetStatusArgType = string
|
||||
type BackupGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type BackupGetUpdatedAtAttributeType = *time.Time
|
||||
type BackupGetUpdatedAtArgType = time.Time
|
||||
type BackupGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getBackupGetUpdatedAtAttributeTypeOk(arg BackupGetUpdatedAtAttributeType) (ret BackupGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetUpdatedAtAttributeType(arg *BackupGetUpdatedAtAttributeType, val BackupGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for volumeId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupGetVolumeIdAttributeType = *string
|
||||
|
||||
func getBackupGetVolumeIdAttributeTypeOk(arg BackupGetVolumeIdAttributeType) (ret BackupGetVolumeIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupGetVolumeIdAttributeType(arg *BackupGetVolumeIdAttributeType, val BackupGetVolumeIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupGetVolumeIdArgType = string
|
||||
type BackupGetVolumeIdRetType = string
|
||||
|
||||
// Backup Object that represents a backup.
|
||||
type Backup struct {
|
||||
// Object that represents an availability zone.
|
||||
AvailabilityZone BackupGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
|
||||
// Date-time when resource was created.
|
||||
CreatedAt BackupGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Indicates if a volume is encrypted.
|
||||
Encrypted BackupgetEncryptedAttributeType `json:"encrypted,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id BackupGetIdAttributeType `json:"id,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels BackupGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
Name BackupGetNameAttributeType `json:"name,omitempty"`
|
||||
// Size in Gigabyte.
|
||||
Size BackupGetSizeAttributeType `json:"size,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
SnapshotId BackupGetSnapshotIdAttributeType `json:"snapshotId,omitempty"`
|
||||
// The status of a backup object. Possible values: `AVAILABLE`, `CREATING`, `DELETED`, `DELETING`, `ERROR`, `RESTORING`.
|
||||
Status BackupGetStatusAttributeType `json:"status,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt BackupGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
VolumeId BackupGetVolumeIdAttributeType `json:"volumeId,omitempty"`
|
||||
}
|
||||
|
||||
// NewBackup instantiates a new Backup 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 NewBackup() *Backup {
|
||||
this := Backup{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBackupWithDefaults instantiates a new Backup 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 NewBackupWithDefaults() *Backup {
|
||||
this := Backup{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
|
||||
func (o *Backup) GetAvailabilityZone() (res BackupGetAvailabilityZoneRetType) {
|
||||
res, _ = o.GetAvailabilityZoneOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetAvailabilityZoneOk() (ret BackupGetAvailabilityZoneRetType, ok bool) {
|
||||
return getBackupGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
|
||||
}
|
||||
|
||||
// HasAvailabilityZone returns a boolean if a field has been set.
|
||||
func (o *Backup) HasAvailabilityZone() bool {
|
||||
_, ok := o.GetAvailabilityZoneOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
|
||||
func (o *Backup) SetAvailabilityZone(v BackupGetAvailabilityZoneRetType) {
|
||||
setBackupGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *Backup) GetCreatedAt() (res BackupGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetCreatedAtOk() (ret BackupGetCreatedAtRetType, ok bool) {
|
||||
return getBackupGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *Backup) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *Backup) SetCreatedAt(v BackupGetCreatedAtRetType) {
|
||||
setBackupGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetEncrypted returns the Encrypted field value if set, zero value otherwise.
|
||||
func (o *Backup) GetEncrypted() (res BackupgetEncryptedRetType) {
|
||||
res, _ = o.GetEncryptedOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetEncryptedOk() (ret BackupgetEncryptedRetType, ok bool) {
|
||||
return getBackupgetEncryptedAttributeTypeOk(o.Encrypted)
|
||||
}
|
||||
|
||||
// HasEncrypted returns a boolean if a field has been set.
|
||||
func (o *Backup) HasEncrypted() bool {
|
||||
_, ok := o.GetEncryptedOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field.
|
||||
func (o *Backup) SetEncrypted(v BackupgetEncryptedRetType) {
|
||||
setBackupgetEncryptedAttributeType(&o.Encrypted, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *Backup) GetId() (res BackupGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetIdOk() (ret BackupGetIdRetType, ok bool) {
|
||||
return getBackupGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *Backup) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *Backup) SetId(v BackupGetIdRetType) {
|
||||
setBackupGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *Backup) GetLabels() (res BackupGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetLabelsOk() (ret BackupGetLabelsRetType, ok bool) {
|
||||
return getBackupGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *Backup) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *Backup) SetLabels(v BackupGetLabelsRetType) {
|
||||
setBackupGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *Backup) GetName() (res BackupGetNameRetType) {
|
||||
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 *Backup) GetNameOk() (ret BackupGetNameRetType, ok bool) {
|
||||
return getBackupGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *Backup) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *Backup) SetName(v BackupGetNameRetType) {
|
||||
setBackupGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *Backup) GetSize() (res BackupGetSizeRetType) {
|
||||
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 *Backup) GetSizeOk() (ret BackupGetSizeRetType, ok bool) {
|
||||
return getBackupGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *Backup) HasSize() bool {
|
||||
_, ok := o.GetSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||
func (o *Backup) SetSize(v BackupGetSizeRetType) {
|
||||
setBackupGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetSnapshotId returns the SnapshotId field value if set, zero value otherwise.
|
||||
func (o *Backup) GetSnapshotId() (res BackupGetSnapshotIdRetType) {
|
||||
res, _ = o.GetSnapshotIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSnapshotIdOk returns a tuple with the SnapshotId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetSnapshotIdOk() (ret BackupGetSnapshotIdRetType, ok bool) {
|
||||
return getBackupGetSnapshotIdAttributeTypeOk(o.SnapshotId)
|
||||
}
|
||||
|
||||
// HasSnapshotId returns a boolean if a field has been set.
|
||||
func (o *Backup) HasSnapshotId() bool {
|
||||
_, ok := o.GetSnapshotIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSnapshotId gets a reference to the given string and assigns it to the SnapshotId field.
|
||||
func (o *Backup) SetSnapshotId(v BackupGetSnapshotIdRetType) {
|
||||
setBackupGetSnapshotIdAttributeType(&o.SnapshotId, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *Backup) GetStatus() (res BackupGetStatusRetType) {
|
||||
res, _ = o.GetStatusOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetStatusOk() (ret BackupGetStatusRetType, ok bool) {
|
||||
return getBackupGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *Backup) HasStatus() bool {
|
||||
_, ok := o.GetStatusOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *Backup) SetStatus(v BackupGetStatusRetType) {
|
||||
setBackupGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *Backup) GetUpdatedAt() (res BackupGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetUpdatedAtOk() (ret BackupGetUpdatedAtRetType, ok bool) {
|
||||
return getBackupGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *Backup) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *Backup) SetUpdatedAt(v BackupGetUpdatedAtRetType) {
|
||||
setBackupGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
// GetVolumeId returns the VolumeId field value if set, zero value otherwise.
|
||||
func (o *Backup) GetVolumeId() (res BackupGetVolumeIdRetType) {
|
||||
res, _ = o.GetVolumeIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetVolumeIdOk returns a tuple with the VolumeId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Backup) GetVolumeIdOk() (ret BackupGetVolumeIdRetType, ok bool) {
|
||||
return getBackupGetVolumeIdAttributeTypeOk(o.VolumeId)
|
||||
}
|
||||
|
||||
// HasVolumeId returns a boolean if a field has been set.
|
||||
func (o *Backup) HasVolumeId() bool {
|
||||
_, ok := o.GetVolumeIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetVolumeId gets a reference to the given string and assigns it to the VolumeId field.
|
||||
func (o *Backup) SetVolumeId(v BackupGetVolumeIdRetType) {
|
||||
setBackupGetVolumeIdAttributeType(&o.VolumeId, v)
|
||||
}
|
||||
|
||||
func (o Backup) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBackupGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
|
||||
toSerialize["AvailabilityZone"] = val
|
||||
}
|
||||
if val, ok := getBackupGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getBackupgetEncryptedAttributeTypeOk(o.Encrypted); ok {
|
||||
toSerialize["Encrypted"] = val
|
||||
}
|
||||
if val, ok := getBackupGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getBackupGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getBackupGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getBackupGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getBackupGetSnapshotIdAttributeTypeOk(o.SnapshotId); ok {
|
||||
toSerialize["SnapshotId"] = val
|
||||
}
|
||||
if val, ok := getBackupGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getBackupGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
if val, ok := getBackupGetVolumeIdAttributeTypeOk(o.VolumeId); ok {
|
||||
toSerialize["VolumeId"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBackup struct {
|
||||
value *Backup
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBackup) Get() *Backup {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBackup) Set(val *Backup) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBackup) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBackup) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBackup(val *Backup) *NullableBackup {
|
||||
return &NullableBackup{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBackup) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBackup) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
126
pkg/iaasbeta/model_backup_list_response.go
Normal file
126
pkg/iaasbeta/model_backup_list_response.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the BackupListResponse type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BackupListResponse{}
|
||||
|
||||
/*
|
||||
types and functions for items
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type BackupListResponseGetItemsAttributeType = *[]Backup
|
||||
type BackupListResponseGetItemsArgType = []Backup
|
||||
type BackupListResponseGetItemsRetType = []Backup
|
||||
|
||||
func getBackupListResponseGetItemsAttributeTypeOk(arg BackupListResponseGetItemsAttributeType) (ret BackupListResponseGetItemsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupListResponseGetItemsAttributeType(arg *BackupListResponseGetItemsAttributeType, val BackupListResponseGetItemsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// BackupListResponse Backup list response.
|
||||
type BackupListResponse struct {
|
||||
// A list containing backup objects.
|
||||
// REQUIRED
|
||||
Items BackupListResponseGetItemsAttributeType `json:"items" required:"true"`
|
||||
}
|
||||
|
||||
type _BackupListResponse BackupListResponse
|
||||
|
||||
// NewBackupListResponse instantiates a new BackupListResponse 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 NewBackupListResponse(items BackupListResponseGetItemsArgType) *BackupListResponse {
|
||||
this := BackupListResponse{}
|
||||
setBackupListResponseGetItemsAttributeType(&this.Items, items)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBackupListResponseWithDefaults instantiates a new BackupListResponse 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 NewBackupListResponseWithDefaults() *BackupListResponse {
|
||||
this := BackupListResponse{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetItems returns the Items field value
|
||||
func (o *BackupListResponse) GetItems() (ret BackupListResponseGetItemsRetType) {
|
||||
ret, _ = o.GetItemsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetItemsOk returns a tuple with the Items field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BackupListResponse) GetItemsOk() (ret BackupListResponseGetItemsRetType, ok bool) {
|
||||
return getBackupListResponseGetItemsAttributeTypeOk(o.Items)
|
||||
}
|
||||
|
||||
// SetItems sets field value
|
||||
func (o *BackupListResponse) SetItems(v BackupListResponseGetItemsRetType) {
|
||||
setBackupListResponseGetItemsAttributeType(&o.Items, v)
|
||||
}
|
||||
|
||||
func (o BackupListResponse) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBackupListResponseGetItemsAttributeTypeOk(o.Items); ok {
|
||||
toSerialize["Items"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBackupListResponse struct {
|
||||
value *BackupListResponse
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBackupListResponse) Get() *BackupListResponse {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBackupListResponse) Set(val *BackupListResponse) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBackupListResponse) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBackupListResponse) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBackupListResponse(val *BackupListResponse) *NullableBackupListResponse {
|
||||
return &NullableBackupListResponse{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBackupListResponse) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBackupListResponse) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_backup_list_response_test.go
Normal file
11
pkg/iaasbeta/model_backup_list_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
172
pkg/iaasbeta/model_backup_source.go
Normal file
172
pkg/iaasbeta/model_backup_source.go
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the BackupSource type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BackupSource{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupSourceGetIdAttributeType = *string
|
||||
|
||||
func getBackupSourceGetIdAttributeTypeOk(arg BackupSourceGetIdAttributeType) (ret BackupSourceGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupSourceGetIdAttributeType(arg *BackupSourceGetIdAttributeType, val BackupSourceGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupSourceGetIdArgType = string
|
||||
type BackupSourceGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BackupSourceGetTypeAttributeType = *string
|
||||
|
||||
func getBackupSourceGetTypeAttributeTypeOk(arg BackupSourceGetTypeAttributeType) (ret BackupSourceGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBackupSourceGetTypeAttributeType(arg *BackupSourceGetTypeAttributeType, val BackupSourceGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BackupSourceGetTypeArgType = string
|
||||
type BackupSourceGetTypeRetType = string
|
||||
|
||||
// BackupSource The source object of a backup.
|
||||
type BackupSource struct {
|
||||
// Universally Unique Identifier (UUID).
|
||||
// REQUIRED
|
||||
Id BackupSourceGetIdAttributeType `json:"id" required:"true"`
|
||||
// The source types of a backup. Possible values: `volume`, `snapshot`.
|
||||
// REQUIRED
|
||||
Type BackupSourceGetTypeAttributeType `json:"type" required:"true"`
|
||||
}
|
||||
|
||||
type _BackupSource BackupSource
|
||||
|
||||
// NewBackupSource instantiates a new BackupSource 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 NewBackupSource(id BackupSourceGetIdArgType, types BackupSourceGetTypeArgType) *BackupSource {
|
||||
this := BackupSource{}
|
||||
setBackupSourceGetIdAttributeType(&this.Id, id)
|
||||
setBackupSourceGetTypeAttributeType(&this.Type, types)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBackupSourceWithDefaults instantiates a new BackupSource 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 NewBackupSourceWithDefaults() *BackupSource {
|
||||
this := BackupSource{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *BackupSource) GetId() (ret BackupSourceGetIdRetType) {
|
||||
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 *BackupSource) GetIdOk() (ret BackupSourceGetIdRetType, ok bool) {
|
||||
return getBackupSourceGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *BackupSource) SetId(v BackupSourceGetIdRetType) {
|
||||
setBackupSourceGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *BackupSource) GetType() (ret BackupSourceGetTypeRetType) {
|
||||
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 *BackupSource) GetTypeOk() (ret BackupSourceGetTypeRetType, ok bool) {
|
||||
return getBackupSourceGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *BackupSource) SetType(v BackupSourceGetTypeRetType) {
|
||||
setBackupSourceGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o BackupSource) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBackupSourceGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getBackupSourceGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBackupSource struct {
|
||||
value *BackupSource
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBackupSource) Get() *BackupSource {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBackupSource) Set(val *BackupSource) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBackupSource) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBackupSource) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBackupSource(val *BackupSource) *NullableBackupSource {
|
||||
return &NullableBackupSource{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBackupSource) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBackupSource) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_backup_source_test.go
Normal file
11
pkg/iaasbeta/model_backup_source_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
11
pkg/iaasbeta/model_backup_test.go
Normal file
11
pkg/iaasbeta/model_backup_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
614
pkg/iaasbeta/model_base_security_group_rule.go
Normal file
614
pkg/iaasbeta/model_base_security_group_rule.go
Normal file
|
|
@ -0,0 +1,614 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the BaseSecurityGroupRule type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BaseSecurityGroupRule{}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type BaseSecurityGroupRuleGetCreatedAtAttributeType = *time.Time
|
||||
type BaseSecurityGroupRuleGetCreatedAtArgType = time.Time
|
||||
type BaseSecurityGroupRuleGetCreatedAtRetType = time.Time
|
||||
|
||||
func getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(arg BaseSecurityGroupRuleGetCreatedAtAttributeType) (ret BaseSecurityGroupRuleGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetCreatedAtAttributeType(arg *BaseSecurityGroupRuleGetCreatedAtAttributeType, val BaseSecurityGroupRuleGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetDescriptionAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(arg BaseSecurityGroupRuleGetDescriptionAttributeType) (ret BaseSecurityGroupRuleGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetDescriptionAttributeType(arg *BaseSecurityGroupRuleGetDescriptionAttributeType, val BaseSecurityGroupRuleGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetDescriptionArgType = string
|
||||
type BaseSecurityGroupRuleGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for direction
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetDirectionAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(arg BaseSecurityGroupRuleGetDirectionAttributeType) (ret BaseSecurityGroupRuleGetDirectionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetDirectionAttributeType(arg *BaseSecurityGroupRuleGetDirectionAttributeType, val BaseSecurityGroupRuleGetDirectionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetDirectionArgType = string
|
||||
type BaseSecurityGroupRuleGetDirectionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for ethertype
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetEthertypeAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(arg BaseSecurityGroupRuleGetEthertypeAttributeType) (ret BaseSecurityGroupRuleGetEthertypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetEthertypeAttributeType(arg *BaseSecurityGroupRuleGetEthertypeAttributeType, val BaseSecurityGroupRuleGetEthertypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetEthertypeArgType = string
|
||||
type BaseSecurityGroupRuleGetEthertypeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for icmpParameters
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type BaseSecurityGroupRuleGetIcmpParametersAttributeType = *ICMPParameters
|
||||
type BaseSecurityGroupRuleGetIcmpParametersArgType = ICMPParameters
|
||||
type BaseSecurityGroupRuleGetIcmpParametersRetType = ICMPParameters
|
||||
|
||||
func getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(arg BaseSecurityGroupRuleGetIcmpParametersAttributeType) (ret BaseSecurityGroupRuleGetIcmpParametersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetIcmpParametersAttributeType(arg *BaseSecurityGroupRuleGetIcmpParametersAttributeType, val BaseSecurityGroupRuleGetIcmpParametersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetIdAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetIdAttributeTypeOk(arg BaseSecurityGroupRuleGetIdAttributeType) (ret BaseSecurityGroupRuleGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetIdAttributeType(arg *BaseSecurityGroupRuleGetIdAttributeType, val BaseSecurityGroupRuleGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetIdArgType = string
|
||||
type BaseSecurityGroupRuleGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for ipRange
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetIpRangeAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(arg BaseSecurityGroupRuleGetIpRangeAttributeType) (ret BaseSecurityGroupRuleGetIpRangeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetIpRangeAttributeType(arg *BaseSecurityGroupRuleGetIpRangeAttributeType, val BaseSecurityGroupRuleGetIpRangeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetIpRangeArgType = string
|
||||
type BaseSecurityGroupRuleGetIpRangeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for portRange
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type BaseSecurityGroupRuleGetPortRangeAttributeType = *PortRange
|
||||
type BaseSecurityGroupRuleGetPortRangeArgType = PortRange
|
||||
type BaseSecurityGroupRuleGetPortRangeRetType = PortRange
|
||||
|
||||
func getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(arg BaseSecurityGroupRuleGetPortRangeAttributeType) (ret BaseSecurityGroupRuleGetPortRangeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetPortRangeAttributeType(arg *BaseSecurityGroupRuleGetPortRangeAttributeType, val BaseSecurityGroupRuleGetPortRangeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for remoteSecurityGroupId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(arg BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType) (ret BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(arg *BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType, val BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetRemoteSecurityGroupIdArgType = string
|
||||
type BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for securityGroupId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BaseSecurityGroupRuleGetSecurityGroupIdAttributeType = *string
|
||||
|
||||
func getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(arg BaseSecurityGroupRuleGetSecurityGroupIdAttributeType) (ret BaseSecurityGroupRuleGetSecurityGroupIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetSecurityGroupIdAttributeType(arg *BaseSecurityGroupRuleGetSecurityGroupIdAttributeType, val BaseSecurityGroupRuleGetSecurityGroupIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BaseSecurityGroupRuleGetSecurityGroupIdArgType = string
|
||||
type BaseSecurityGroupRuleGetSecurityGroupIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type BaseSecurityGroupRuleGetUpdatedAtAttributeType = *time.Time
|
||||
type BaseSecurityGroupRuleGetUpdatedAtArgType = time.Time
|
||||
type BaseSecurityGroupRuleGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(arg BaseSecurityGroupRuleGetUpdatedAtAttributeType) (ret BaseSecurityGroupRuleGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBaseSecurityGroupRuleGetUpdatedAtAttributeType(arg *BaseSecurityGroupRuleGetUpdatedAtAttributeType, val BaseSecurityGroupRuleGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// BaseSecurityGroupRule The base schema for a security group rule.
|
||||
type BaseSecurityGroupRule struct {
|
||||
// Date-time when resource was created.
|
||||
CreatedAt BaseSecurityGroupRuleGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Description Object. Allows string up to 255 Characters.
|
||||
Description BaseSecurityGroupRuleGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
// The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`.
|
||||
// REQUIRED
|
||||
Direction BaseSecurityGroupRuleGetDirectionAttributeType `json:"direction" required:"true"`
|
||||
// The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`.
|
||||
Ethertype BaseSecurityGroupRuleGetEthertypeAttributeType `json:"ethertype,omitempty"`
|
||||
IcmpParameters BaseSecurityGroupRuleGetIcmpParametersAttributeType `json:"icmpParameters,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id BaseSecurityGroupRuleGetIdAttributeType `json:"id,omitempty"`
|
||||
// Classless Inter-Domain Routing (CIDR).
|
||||
IpRange BaseSecurityGroupRuleGetIpRangeAttributeType `json:"ipRange,omitempty"`
|
||||
PortRange BaseSecurityGroupRuleGetPortRangeAttributeType `json:"portRange,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
RemoteSecurityGroupId BaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType `json:"remoteSecurityGroupId,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
SecurityGroupId BaseSecurityGroupRuleGetSecurityGroupIdAttributeType `json:"securityGroupId,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt BaseSecurityGroupRuleGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _BaseSecurityGroupRule BaseSecurityGroupRule
|
||||
|
||||
// NewBaseSecurityGroupRule instantiates a new BaseSecurityGroupRule 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 NewBaseSecurityGroupRule(direction BaseSecurityGroupRuleGetDirectionArgType) *BaseSecurityGroupRule {
|
||||
this := BaseSecurityGroupRule{}
|
||||
setBaseSecurityGroupRuleGetDirectionAttributeType(&this.Direction, direction)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBaseSecurityGroupRuleWithDefaults instantiates a new BaseSecurityGroupRule 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 NewBaseSecurityGroupRuleWithDefaults() *BaseSecurityGroupRule {
|
||||
this := BaseSecurityGroupRule{}
|
||||
var ethertype string = "IPv4"
|
||||
this.Ethertype = ðertype
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetCreatedAt() (res BaseSecurityGroupRuleGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetCreatedAtOk() (ret BaseSecurityGroupRuleGetCreatedAtRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *BaseSecurityGroupRule) SetCreatedAt(v BaseSecurityGroupRuleGetCreatedAtRetType) {
|
||||
setBaseSecurityGroupRuleGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetDescription() (res BaseSecurityGroupRuleGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetDescriptionOk() (ret BaseSecurityGroupRuleGetDescriptionRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *BaseSecurityGroupRule) SetDescription(v BaseSecurityGroupRuleGetDescriptionRetType) {
|
||||
setBaseSecurityGroupRuleGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetDirection returns the Direction field value
|
||||
func (o *BaseSecurityGroupRule) GetDirection() (ret BaseSecurityGroupRuleGetDirectionRetType) {
|
||||
ret, _ = o.GetDirectionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDirectionOk returns a tuple with the Direction field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetDirectionOk() (ret BaseSecurityGroupRuleGetDirectionRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction)
|
||||
}
|
||||
|
||||
// SetDirection sets field value
|
||||
func (o *BaseSecurityGroupRule) SetDirection(v BaseSecurityGroupRuleGetDirectionRetType) {
|
||||
setBaseSecurityGroupRuleGetDirectionAttributeType(&o.Direction, v)
|
||||
}
|
||||
|
||||
// GetEthertype returns the Ethertype field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetEthertype() (res BaseSecurityGroupRuleGetEthertypeRetType) {
|
||||
res, _ = o.GetEthertypeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEthertypeOk returns a tuple with the Ethertype field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetEthertypeOk() (ret BaseSecurityGroupRuleGetEthertypeRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype)
|
||||
}
|
||||
|
||||
// HasEthertype returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasEthertype() bool {
|
||||
_, ok := o.GetEthertypeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEthertype gets a reference to the given string and assigns it to the Ethertype field.
|
||||
func (o *BaseSecurityGroupRule) SetEthertype(v BaseSecurityGroupRuleGetEthertypeRetType) {
|
||||
setBaseSecurityGroupRuleGetEthertypeAttributeType(&o.Ethertype, v)
|
||||
}
|
||||
|
||||
// GetIcmpParameters returns the IcmpParameters field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetIcmpParameters() (res BaseSecurityGroupRuleGetIcmpParametersRetType) {
|
||||
res, _ = o.GetIcmpParametersOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIcmpParametersOk returns a tuple with the IcmpParameters field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetIcmpParametersOk() (ret BaseSecurityGroupRuleGetIcmpParametersRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters)
|
||||
}
|
||||
|
||||
// HasIcmpParameters returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasIcmpParameters() bool {
|
||||
_, ok := o.GetIcmpParametersOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field.
|
||||
func (o *BaseSecurityGroupRule) SetIcmpParameters(v BaseSecurityGroupRuleGetIcmpParametersRetType) {
|
||||
setBaseSecurityGroupRuleGetIcmpParametersAttributeType(&o.IcmpParameters, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetId() (res BaseSecurityGroupRuleGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetIdOk() (ret BaseSecurityGroupRuleGetIdRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *BaseSecurityGroupRule) SetId(v BaseSecurityGroupRuleGetIdRetType) {
|
||||
setBaseSecurityGroupRuleGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetIpRange returns the IpRange field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetIpRange() (res BaseSecurityGroupRuleGetIpRangeRetType) {
|
||||
res, _ = o.GetIpRangeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpRangeOk returns a tuple with the IpRange field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetIpRangeOk() (ret BaseSecurityGroupRuleGetIpRangeRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange)
|
||||
}
|
||||
|
||||
// HasIpRange returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasIpRange() bool {
|
||||
_, ok := o.GetIpRangeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpRange gets a reference to the given string and assigns it to the IpRange field.
|
||||
func (o *BaseSecurityGroupRule) SetIpRange(v BaseSecurityGroupRuleGetIpRangeRetType) {
|
||||
setBaseSecurityGroupRuleGetIpRangeAttributeType(&o.IpRange, v)
|
||||
}
|
||||
|
||||
// GetPortRange returns the PortRange field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetPortRange() (res BaseSecurityGroupRuleGetPortRangeRetType) {
|
||||
res, _ = o.GetPortRangeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetPortRangeOk returns a tuple with the PortRange field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetPortRangeOk() (ret BaseSecurityGroupRuleGetPortRangeRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange)
|
||||
}
|
||||
|
||||
// HasPortRange returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasPortRange() bool {
|
||||
_, ok := o.GetPortRangeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field.
|
||||
func (o *BaseSecurityGroupRule) SetPortRange(v BaseSecurityGroupRuleGetPortRangeRetType) {
|
||||
setBaseSecurityGroupRuleGetPortRangeAttributeType(&o.PortRange, v)
|
||||
}
|
||||
|
||||
// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetRemoteSecurityGroupId() (res BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) {
|
||||
res, _ = o.GetRemoteSecurityGroupIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetRemoteSecurityGroupIdOk() (ret BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId)
|
||||
}
|
||||
|
||||
// HasRemoteSecurityGroupId returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasRemoteSecurityGroupId() bool {
|
||||
_, ok := o.GetRemoteSecurityGroupIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field.
|
||||
func (o *BaseSecurityGroupRule) SetRemoteSecurityGroupId(v BaseSecurityGroupRuleGetRemoteSecurityGroupIdRetType) {
|
||||
setBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeType(&o.RemoteSecurityGroupId, v)
|
||||
}
|
||||
|
||||
// GetSecurityGroupId returns the SecurityGroupId field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetSecurityGroupId() (res BaseSecurityGroupRuleGetSecurityGroupIdRetType) {
|
||||
res, _ = o.GetSecurityGroupIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetSecurityGroupIdOk() (ret BaseSecurityGroupRuleGetSecurityGroupIdRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId)
|
||||
}
|
||||
|
||||
// HasSecurityGroupId returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasSecurityGroupId() bool {
|
||||
_, ok := o.GetSecurityGroupIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field.
|
||||
func (o *BaseSecurityGroupRule) SetSecurityGroupId(v BaseSecurityGroupRuleGetSecurityGroupIdRetType) {
|
||||
setBaseSecurityGroupRuleGetSecurityGroupIdAttributeType(&o.SecurityGroupId, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *BaseSecurityGroupRule) GetUpdatedAt() (res BaseSecurityGroupRuleGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BaseSecurityGroupRule) GetUpdatedAtOk() (ret BaseSecurityGroupRuleGetUpdatedAtRetType, ok bool) {
|
||||
return getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *BaseSecurityGroupRule) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *BaseSecurityGroupRule) SetUpdatedAt(v BaseSecurityGroupRuleGetUpdatedAtRetType) {
|
||||
setBaseSecurityGroupRuleGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o BaseSecurityGroupRule) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBaseSecurityGroupRuleGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetDirectionAttributeTypeOk(o.Direction); ok {
|
||||
toSerialize["Direction"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetEthertypeAttributeTypeOk(o.Ethertype); ok {
|
||||
toSerialize["Ethertype"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetIcmpParametersAttributeTypeOk(o.IcmpParameters); ok {
|
||||
toSerialize["IcmpParameters"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetIpRangeAttributeTypeOk(o.IpRange); ok {
|
||||
toSerialize["IpRange"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetPortRangeAttributeTypeOk(o.PortRange); ok {
|
||||
toSerialize["PortRange"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId); ok {
|
||||
toSerialize["RemoteSecurityGroupId"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId); ok {
|
||||
toSerialize["SecurityGroupId"] = val
|
||||
}
|
||||
if val, ok := getBaseSecurityGroupRuleGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBaseSecurityGroupRule struct {
|
||||
value *BaseSecurityGroupRule
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBaseSecurityGroupRule) Get() *BaseSecurityGroupRule {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBaseSecurityGroupRule) Set(val *BaseSecurityGroupRule) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBaseSecurityGroupRule) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBaseSecurityGroupRule) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBaseSecurityGroupRule(val *BaseSecurityGroupRule) *NullableBaseSecurityGroupRule {
|
||||
return &NullableBaseSecurityGroupRule{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBaseSecurityGroupRule) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBaseSecurityGroupRule) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_base_security_group_rule_test.go
Normal file
11
pkg/iaasbeta/model_base_security_group_rule_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
321
pkg/iaasbeta/model_boot_volume.go
Normal file
321
pkg/iaasbeta/model_boot_volume.go
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the BootVolume type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BootVolume{}
|
||||
|
||||
/*
|
||||
types and functions for deleteOnTermination
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type BootVolumegetDeleteOnTerminationAttributeType = *bool
|
||||
type BootVolumegetDeleteOnTerminationArgType = bool
|
||||
type BootVolumegetDeleteOnTerminationRetType = bool
|
||||
|
||||
func getBootVolumegetDeleteOnTerminationAttributeTypeOk(arg BootVolumegetDeleteOnTerminationAttributeType) (ret BootVolumegetDeleteOnTerminationRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumegetDeleteOnTerminationAttributeType(arg *BootVolumegetDeleteOnTerminationAttributeType, val BootVolumegetDeleteOnTerminationRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BootVolumeGetIdAttributeType = *string
|
||||
|
||||
func getBootVolumeGetIdAttributeTypeOk(arg BootVolumeGetIdAttributeType) (ret BootVolumeGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumeGetIdAttributeType(arg *BootVolumeGetIdAttributeType, val BootVolumeGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BootVolumeGetIdArgType = string
|
||||
type BootVolumeGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for performanceClass
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BootVolumeGetPerformanceClassAttributeType = *string
|
||||
|
||||
func getBootVolumeGetPerformanceClassAttributeTypeOk(arg BootVolumeGetPerformanceClassAttributeType) (ret BootVolumeGetPerformanceClassRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumeGetPerformanceClassAttributeType(arg *BootVolumeGetPerformanceClassAttributeType, val BootVolumeGetPerformanceClassRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BootVolumeGetPerformanceClassArgType = string
|
||||
type BootVolumeGetPerformanceClassRetType = string
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type BootVolumeGetSizeAttributeType = *int64
|
||||
type BootVolumeGetSizeArgType = int64
|
||||
type BootVolumeGetSizeRetType = int64
|
||||
|
||||
func getBootVolumeGetSizeAttributeTypeOk(arg BootVolumeGetSizeAttributeType) (ret BootVolumeGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumeGetSizeAttributeType(arg *BootVolumeGetSizeAttributeType, val BootVolumeGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for source
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type BootVolumeGetSourceAttributeType = *BootVolumeSource
|
||||
type BootVolumeGetSourceArgType = BootVolumeSource
|
||||
type BootVolumeGetSourceRetType = BootVolumeSource
|
||||
|
||||
func getBootVolumeGetSourceAttributeTypeOk(arg BootVolumeGetSourceAttributeType) (ret BootVolumeGetSourceRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumeGetSourceAttributeType(arg *BootVolumeGetSourceAttributeType, val BootVolumeGetSourceRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// BootVolume The boot device for the server.
|
||||
type BootVolume struct {
|
||||
// Delete the volume during the termination of the server. Defaults to false.
|
||||
DeleteOnTermination BootVolumegetDeleteOnTerminationAttributeType `json:"deleteOnTermination,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id BootVolumeGetIdAttributeType `json:"id,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
PerformanceClass BootVolumeGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
|
||||
// Size in Gigabyte.
|
||||
Size BootVolumeGetSizeAttributeType `json:"size,omitempty"`
|
||||
Source BootVolumeGetSourceAttributeType `json:"source,omitempty"`
|
||||
}
|
||||
|
||||
// NewBootVolume instantiates a new BootVolume 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 NewBootVolume() *BootVolume {
|
||||
this := BootVolume{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBootVolumeWithDefaults instantiates a new BootVolume 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 NewBootVolumeWithDefaults() *BootVolume {
|
||||
this := BootVolume{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDeleteOnTermination returns the DeleteOnTermination field value if set, zero value otherwise.
|
||||
func (o *BootVolume) GetDeleteOnTermination() (res BootVolumegetDeleteOnTerminationRetType) {
|
||||
res, _ = o.GetDeleteOnTerminationOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDeleteOnTerminationOk returns a tuple with the DeleteOnTermination field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BootVolume) GetDeleteOnTerminationOk() (ret BootVolumegetDeleteOnTerminationRetType, ok bool) {
|
||||
return getBootVolumegetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination)
|
||||
}
|
||||
|
||||
// HasDeleteOnTermination returns a boolean if a field has been set.
|
||||
func (o *BootVolume) HasDeleteOnTermination() bool {
|
||||
_, ok := o.GetDeleteOnTerminationOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDeleteOnTermination gets a reference to the given bool and assigns it to the DeleteOnTermination field.
|
||||
func (o *BootVolume) SetDeleteOnTermination(v BootVolumegetDeleteOnTerminationRetType) {
|
||||
setBootVolumegetDeleteOnTerminationAttributeType(&o.DeleteOnTermination, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *BootVolume) GetId() (res BootVolumeGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BootVolume) GetIdOk() (ret BootVolumeGetIdRetType, ok bool) {
|
||||
return getBootVolumeGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *BootVolume) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *BootVolume) SetId(v BootVolumeGetIdRetType) {
|
||||
setBootVolumeGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
|
||||
func (o *BootVolume) GetPerformanceClass() (res BootVolumeGetPerformanceClassRetType) {
|
||||
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 *BootVolume) GetPerformanceClassOk() (ret BootVolumeGetPerformanceClassRetType, ok bool) {
|
||||
return getBootVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
|
||||
}
|
||||
|
||||
// HasPerformanceClass returns a boolean if a field has been set.
|
||||
func (o *BootVolume) HasPerformanceClass() bool {
|
||||
_, ok := o.GetPerformanceClassOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
|
||||
func (o *BootVolume) SetPerformanceClass(v BootVolumeGetPerformanceClassRetType) {
|
||||
setBootVolumeGetPerformanceClassAttributeType(&o.PerformanceClass, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *BootVolume) GetSize() (res BootVolumeGetSizeRetType) {
|
||||
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 *BootVolume) GetSizeOk() (ret BootVolumeGetSizeRetType, ok bool) {
|
||||
return getBootVolumeGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *BootVolume) HasSize() bool {
|
||||
_, ok := o.GetSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||
func (o *BootVolume) SetSize(v BootVolumeGetSizeRetType) {
|
||||
setBootVolumeGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetSource returns the Source field value if set, zero value otherwise.
|
||||
func (o *BootVolume) GetSource() (res BootVolumeGetSourceRetType) {
|
||||
res, _ = o.GetSourceOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *BootVolume) GetSourceOk() (ret BootVolumeGetSourceRetType, ok bool) {
|
||||
return getBootVolumeGetSourceAttributeTypeOk(o.Source)
|
||||
}
|
||||
|
||||
// HasSource returns a boolean if a field has been set.
|
||||
func (o *BootVolume) HasSource() bool {
|
||||
_, ok := o.GetSourceOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSource gets a reference to the given BootVolumeSource and assigns it to the Source field.
|
||||
func (o *BootVolume) SetSource(v BootVolumeGetSourceRetType) {
|
||||
setBootVolumeGetSourceAttributeType(&o.Source, v)
|
||||
}
|
||||
|
||||
func (o BootVolume) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBootVolumegetDeleteOnTerminationAttributeTypeOk(o.DeleteOnTermination); ok {
|
||||
toSerialize["DeleteOnTermination"] = val
|
||||
}
|
||||
if val, ok := getBootVolumeGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getBootVolumeGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
|
||||
toSerialize["PerformanceClass"] = val
|
||||
}
|
||||
if val, ok := getBootVolumeGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getBootVolumeGetSourceAttributeTypeOk(o.Source); ok {
|
||||
toSerialize["Source"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBootVolume struct {
|
||||
value *BootVolume
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBootVolume) Get() *BootVolume {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBootVolume) Set(val *BootVolume) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBootVolume) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBootVolume) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBootVolume(val *BootVolume) *NullableBootVolume {
|
||||
return &NullableBootVolume{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBootVolume) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBootVolume) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
172
pkg/iaasbeta/model_boot_volume_source.go
Normal file
172
pkg/iaasbeta/model_boot_volume_source.go
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the BootVolumeSource type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &BootVolumeSource{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BootVolumeSourceGetIdAttributeType = *string
|
||||
|
||||
func getBootVolumeSourceGetIdAttributeTypeOk(arg BootVolumeSourceGetIdAttributeType) (ret BootVolumeSourceGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumeSourceGetIdAttributeType(arg *BootVolumeSourceGetIdAttributeType, val BootVolumeSourceGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BootVolumeSourceGetIdArgType = string
|
||||
type BootVolumeSourceGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type BootVolumeSourceGetTypeAttributeType = *string
|
||||
|
||||
func getBootVolumeSourceGetTypeAttributeTypeOk(arg BootVolumeSourceGetTypeAttributeType) (ret BootVolumeSourceGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setBootVolumeSourceGetTypeAttributeType(arg *BootVolumeSourceGetTypeAttributeType, val BootVolumeSourceGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type BootVolumeSourceGetTypeArgType = string
|
||||
type BootVolumeSourceGetTypeRetType = string
|
||||
|
||||
// BootVolumeSource struct for BootVolumeSource
|
||||
type BootVolumeSource struct {
|
||||
// Universally Unique Identifier (UUID).
|
||||
// REQUIRED
|
||||
Id BootVolumeSourceGetIdAttributeType `json:"id" required:"true"`
|
||||
// The source types of a boot volume. Possible values: `image`, `volume`.
|
||||
// REQUIRED
|
||||
Type BootVolumeSourceGetTypeAttributeType `json:"type" required:"true"`
|
||||
}
|
||||
|
||||
type _BootVolumeSource BootVolumeSource
|
||||
|
||||
// NewBootVolumeSource instantiates a new BootVolumeSource 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 NewBootVolumeSource(id BootVolumeSourceGetIdArgType, types BootVolumeSourceGetTypeArgType) *BootVolumeSource {
|
||||
this := BootVolumeSource{}
|
||||
setBootVolumeSourceGetIdAttributeType(&this.Id, id)
|
||||
setBootVolumeSourceGetTypeAttributeType(&this.Type, types)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewBootVolumeSourceWithDefaults instantiates a new BootVolumeSource 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 NewBootVolumeSourceWithDefaults() *BootVolumeSource {
|
||||
this := BootVolumeSource{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value
|
||||
func (o *BootVolumeSource) GetId() (ret BootVolumeSourceGetIdRetType) {
|
||||
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 *BootVolumeSource) GetIdOk() (ret BootVolumeSourceGetIdRetType, ok bool) {
|
||||
return getBootVolumeSourceGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// SetId sets field value
|
||||
func (o *BootVolumeSource) SetId(v BootVolumeSourceGetIdRetType) {
|
||||
setBootVolumeSourceGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *BootVolumeSource) GetType() (ret BootVolumeSourceGetTypeRetType) {
|
||||
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 *BootVolumeSource) GetTypeOk() (ret BootVolumeSourceGetTypeRetType, ok bool) {
|
||||
return getBootVolumeSourceGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *BootVolumeSource) SetType(v BootVolumeSourceGetTypeRetType) {
|
||||
setBootVolumeSourceGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o BootVolumeSource) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getBootVolumeSourceGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getBootVolumeSourceGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableBootVolumeSource struct {
|
||||
value *BootVolumeSource
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableBootVolumeSource) Get() *BootVolumeSource {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableBootVolumeSource) Set(val *BootVolumeSource) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableBootVolumeSource) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableBootVolumeSource) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableBootVolumeSource(val *BootVolumeSource) *NullableBootVolumeSource {
|
||||
return &NullableBootVolumeSource{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableBootVolumeSource) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableBootVolumeSource) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_boot_volume_source_test.go
Normal file
11
pkg/iaasbeta/model_boot_volume_source_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
11
pkg/iaasbeta/model_boot_volume_test.go
Normal file
11
pkg/iaasbeta/model_boot_volume_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
269
pkg/iaasbeta/model_create_affinity_group_payload.go
Normal file
269
pkg/iaasbeta/model_create_affinity_group_payload.go
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateAffinityGroupPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateAffinityGroupPayload{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAffinityGroupPayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreateAffinityGroupPayloadGetIdAttributeTypeOk(arg CreateAffinityGroupPayloadGetIdAttributeType) (ret CreateAffinityGroupPayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAffinityGroupPayloadGetIdAttributeType(arg *CreateAffinityGroupPayloadGetIdAttributeType, val CreateAffinityGroupPayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAffinityGroupPayloadGetIdArgType = string
|
||||
type CreateAffinityGroupPayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for members
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateAffinityGroupPayloadGetMembersAttributeType = *[]string
|
||||
type CreateAffinityGroupPayloadGetMembersArgType = []string
|
||||
type CreateAffinityGroupPayloadGetMembersRetType = []string
|
||||
|
||||
func getCreateAffinityGroupPayloadGetMembersAttributeTypeOk(arg CreateAffinityGroupPayloadGetMembersAttributeType) (ret CreateAffinityGroupPayloadGetMembersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAffinityGroupPayloadGetMembersAttributeType(arg *CreateAffinityGroupPayloadGetMembersAttributeType, val CreateAffinityGroupPayloadGetMembersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAffinityGroupPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateAffinityGroupPayloadGetNameAttributeTypeOk(arg CreateAffinityGroupPayloadGetNameAttributeType) (ret CreateAffinityGroupPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAffinityGroupPayloadGetNameAttributeType(arg *CreateAffinityGroupPayloadGetNameAttributeType, val CreateAffinityGroupPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAffinityGroupPayloadGetNameArgType = string
|
||||
type CreateAffinityGroupPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for policy
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateAffinityGroupPayloadGetPolicyAttributeType = *string
|
||||
|
||||
func getCreateAffinityGroupPayloadGetPolicyAttributeTypeOk(arg CreateAffinityGroupPayloadGetPolicyAttributeType) (ret CreateAffinityGroupPayloadGetPolicyRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateAffinityGroupPayloadGetPolicyAttributeType(arg *CreateAffinityGroupPayloadGetPolicyAttributeType, val CreateAffinityGroupPayloadGetPolicyRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateAffinityGroupPayloadGetPolicyArgType = string
|
||||
type CreateAffinityGroupPayloadGetPolicyRetType = string
|
||||
|
||||
// CreateAffinityGroupPayload Definition of an affinity group.
|
||||
type CreateAffinityGroupPayload struct {
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreateAffinityGroupPayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// The servers that are part of the affinity group.
|
||||
Members CreateAffinityGroupPayloadGetMembersAttributeType `json:"members,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name CreateAffinityGroupPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// The affinity group policy. `hard-affinity`: All servers in this group will be hosted on the same compute node. `soft-affinity`: All servers in this group will be hosted on as few compute nodes as possible. `hard-anti-affinity`: All servers in this group will be hosted on different compute nodes. `soft-anti-affinity`: All servers in this group will be hosted on as many compute nodes as possible. Possible values: `hard-anti-affinity`, `hard-affinity`, `soft-anti-affinity`, `soft-affinity`.
|
||||
// REQUIRED
|
||||
Policy CreateAffinityGroupPayloadGetPolicyAttributeType `json:"policy" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateAffinityGroupPayload CreateAffinityGroupPayload
|
||||
|
||||
// NewCreateAffinityGroupPayload instantiates a new CreateAffinityGroupPayload 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 NewCreateAffinityGroupPayload(name CreateAffinityGroupPayloadGetNameArgType, policy CreateAffinityGroupPayloadGetPolicyArgType) *CreateAffinityGroupPayload {
|
||||
this := CreateAffinityGroupPayload{}
|
||||
setCreateAffinityGroupPayloadGetNameAttributeType(&this.Name, name)
|
||||
setCreateAffinityGroupPayloadGetPolicyAttributeType(&this.Policy, policy)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateAffinityGroupPayloadWithDefaults instantiates a new CreateAffinityGroupPayload 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 NewCreateAffinityGroupPayloadWithDefaults() *CreateAffinityGroupPayload {
|
||||
this := CreateAffinityGroupPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreateAffinityGroupPayload) GetId() (res CreateAffinityGroupPayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAffinityGroupPayload) GetIdOk() (ret CreateAffinityGroupPayloadGetIdRetType, ok bool) {
|
||||
return getCreateAffinityGroupPayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreateAffinityGroupPayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreateAffinityGroupPayload) SetId(v CreateAffinityGroupPayloadGetIdRetType) {
|
||||
setCreateAffinityGroupPayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetMembers returns the Members field value if set, zero value otherwise.
|
||||
func (o *CreateAffinityGroupPayload) GetMembers() (res CreateAffinityGroupPayloadGetMembersRetType) {
|
||||
res, _ = o.GetMembersOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMembersOk returns a tuple with the Members field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAffinityGroupPayload) GetMembersOk() (ret CreateAffinityGroupPayloadGetMembersRetType, ok bool) {
|
||||
return getCreateAffinityGroupPayloadGetMembersAttributeTypeOk(o.Members)
|
||||
}
|
||||
|
||||
// HasMembers returns a boolean if a field has been set.
|
||||
func (o *CreateAffinityGroupPayload) HasMembers() bool {
|
||||
_, ok := o.GetMembersOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMembers gets a reference to the given []string and assigns it to the Members field.
|
||||
func (o *CreateAffinityGroupPayload) SetMembers(v CreateAffinityGroupPayloadGetMembersRetType) {
|
||||
setCreateAffinityGroupPayloadGetMembersAttributeType(&o.Members, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateAffinityGroupPayload) GetName() (ret CreateAffinityGroupPayloadGetNameRetType) {
|
||||
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 *CreateAffinityGroupPayload) GetNameOk() (ret CreateAffinityGroupPayloadGetNameRetType, ok bool) {
|
||||
return getCreateAffinityGroupPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateAffinityGroupPayload) SetName(v CreateAffinityGroupPayloadGetNameRetType) {
|
||||
setCreateAffinityGroupPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetPolicy returns the Policy field value
|
||||
func (o *CreateAffinityGroupPayload) GetPolicy() (ret CreateAffinityGroupPayloadGetPolicyRetType) {
|
||||
ret, _ = o.GetPolicyOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPolicyOk returns a tuple with the Policy field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateAffinityGroupPayload) GetPolicyOk() (ret CreateAffinityGroupPayloadGetPolicyRetType, ok bool) {
|
||||
return getCreateAffinityGroupPayloadGetPolicyAttributeTypeOk(o.Policy)
|
||||
}
|
||||
|
||||
// SetPolicy sets field value
|
||||
func (o *CreateAffinityGroupPayload) SetPolicy(v CreateAffinityGroupPayloadGetPolicyRetType) {
|
||||
setCreateAffinityGroupPayloadGetPolicyAttributeType(&o.Policy, v)
|
||||
}
|
||||
|
||||
func (o CreateAffinityGroupPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateAffinityGroupPayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateAffinityGroupPayloadGetMembersAttributeTypeOk(o.Members); ok {
|
||||
toSerialize["Members"] = val
|
||||
}
|
||||
if val, ok := getCreateAffinityGroupPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateAffinityGroupPayloadGetPolicyAttributeTypeOk(o.Policy); ok {
|
||||
toSerialize["Policy"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateAffinityGroupPayload struct {
|
||||
value *CreateAffinityGroupPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateAffinityGroupPayload) Get() *CreateAffinityGroupPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateAffinityGroupPayload) Set(val *CreateAffinityGroupPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateAffinityGroupPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateAffinityGroupPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateAffinityGroupPayload(val *CreateAffinityGroupPayload) *NullableCreateAffinityGroupPayload {
|
||||
return &NullableCreateAffinityGroupPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateAffinityGroupPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateAffinityGroupPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_affinity_group_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_affinity_group_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
222
pkg/iaasbeta/model_create_backup_payload.go
Normal file
222
pkg/iaasbeta/model_create_backup_payload.go
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateBackupPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateBackupPayload{}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateBackupPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateBackupPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateBackupPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateBackupPayloadGetLabelsAttributeTypeOk(arg CreateBackupPayloadGetLabelsAttributeType) (ret CreateBackupPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateBackupPayloadGetLabelsAttributeType(arg *CreateBackupPayloadGetLabelsAttributeType, val CreateBackupPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateBackupPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateBackupPayloadGetNameAttributeTypeOk(arg CreateBackupPayloadGetNameAttributeType) (ret CreateBackupPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateBackupPayloadGetNameAttributeType(arg *CreateBackupPayloadGetNameAttributeType, val CreateBackupPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateBackupPayloadGetNameArgType = string
|
||||
type CreateBackupPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for source
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateBackupPayloadGetSourceAttributeType = *BackupSource
|
||||
type CreateBackupPayloadGetSourceArgType = BackupSource
|
||||
type CreateBackupPayloadGetSourceRetType = BackupSource
|
||||
|
||||
func getCreateBackupPayloadGetSourceAttributeTypeOk(arg CreateBackupPayloadGetSourceAttributeType) (ret CreateBackupPayloadGetSourceRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateBackupPayloadGetSourceAttributeType(arg *CreateBackupPayloadGetSourceAttributeType, val CreateBackupPayloadGetSourceRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateBackupPayload Object that represents a backup create request body.
|
||||
type CreateBackupPayload struct {
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateBackupPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
Name CreateBackupPayloadGetNameAttributeType `json:"name,omitempty"`
|
||||
// REQUIRED
|
||||
Source CreateBackupPayloadGetSourceAttributeType `json:"source" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateBackupPayload CreateBackupPayload
|
||||
|
||||
// NewCreateBackupPayload instantiates a new CreateBackupPayload 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 NewCreateBackupPayload(source CreateBackupPayloadGetSourceArgType) *CreateBackupPayload {
|
||||
this := CreateBackupPayload{}
|
||||
setCreateBackupPayloadGetSourceAttributeType(&this.Source, source)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateBackupPayloadWithDefaults instantiates a new CreateBackupPayload 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 NewCreateBackupPayloadWithDefaults() *CreateBackupPayload {
|
||||
this := CreateBackupPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateBackupPayload) GetLabels() (res CreateBackupPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateBackupPayload) GetLabelsOk() (ret CreateBackupPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateBackupPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateBackupPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateBackupPayload) SetLabels(v CreateBackupPayloadGetLabelsRetType) {
|
||||
setCreateBackupPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *CreateBackupPayload) GetName() (res CreateBackupPayloadGetNameRetType) {
|
||||
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 *CreateBackupPayload) GetNameOk() (ret CreateBackupPayloadGetNameRetType, ok bool) {
|
||||
return getCreateBackupPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *CreateBackupPayload) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *CreateBackupPayload) SetName(v CreateBackupPayloadGetNameRetType) {
|
||||
setCreateBackupPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetSource returns the Source field value
|
||||
func (o *CreateBackupPayload) GetSource() (ret CreateBackupPayloadGetSourceRetType) {
|
||||
ret, _ = o.GetSourceOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetSourceOk returns a tuple with the Source field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateBackupPayload) GetSourceOk() (ret CreateBackupPayloadGetSourceRetType, ok bool) {
|
||||
return getCreateBackupPayloadGetSourceAttributeTypeOk(o.Source)
|
||||
}
|
||||
|
||||
// SetSource sets field value
|
||||
func (o *CreateBackupPayload) SetSource(v CreateBackupPayloadGetSourceRetType) {
|
||||
setCreateBackupPayloadGetSourceAttributeType(&o.Source, v)
|
||||
}
|
||||
|
||||
func (o CreateBackupPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateBackupPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateBackupPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateBackupPayloadGetSourceAttributeTypeOk(o.Source); ok {
|
||||
toSerialize["Source"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateBackupPayload struct {
|
||||
value *CreateBackupPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateBackupPayload) Get() *CreateBackupPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateBackupPayload) Set(val *CreateBackupPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateBackupPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateBackupPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateBackupPayload(val *CreateBackupPayload) *NullableCreateBackupPayload {
|
||||
return &NullableCreateBackupPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateBackupPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateBackupPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_backup_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_backup_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
894
pkg/iaasbeta/model_create_image_payload.go
Normal file
894
pkg/iaasbeta/model_create_image_payload.go
Normal file
|
|
@ -0,0 +1,894 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the CreateImagePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateImagePayload{}
|
||||
|
||||
/*
|
||||
types and functions for agent
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateImagePayloadGetAgentAttributeType = *ImageAgent
|
||||
type CreateImagePayloadGetAgentArgType = ImageAgent
|
||||
type CreateImagePayloadGetAgentRetType = ImageAgent
|
||||
|
||||
func getCreateImagePayloadGetAgentAttributeTypeOk(arg CreateImagePayloadGetAgentAttributeType) (ret CreateImagePayloadGetAgentRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetAgentAttributeType(arg *CreateImagePayloadGetAgentAttributeType, val CreateImagePayloadGetAgentRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for checksum
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateImagePayloadGetChecksumAttributeType = *ImageChecksum
|
||||
type CreateImagePayloadGetChecksumArgType = ImageChecksum
|
||||
type CreateImagePayloadGetChecksumRetType = ImageChecksum
|
||||
|
||||
func getCreateImagePayloadGetChecksumAttributeTypeOk(arg CreateImagePayloadGetChecksumAttributeType) (ret CreateImagePayloadGetChecksumRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetChecksumAttributeType(arg *CreateImagePayloadGetChecksumAttributeType, val CreateImagePayloadGetChecksumRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for config
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateImagePayloadGetConfigAttributeType = *ImageConfig
|
||||
type CreateImagePayloadGetConfigArgType = ImageConfig
|
||||
type CreateImagePayloadGetConfigRetType = ImageConfig
|
||||
|
||||
func getCreateImagePayloadGetConfigAttributeTypeOk(arg CreateImagePayloadGetConfigAttributeType) (ret CreateImagePayloadGetConfigRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetConfigAttributeType(arg *CreateImagePayloadGetConfigAttributeType, val CreateImagePayloadGetConfigRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateImagePayloadGetCreatedAtAttributeType = *time.Time
|
||||
type CreateImagePayloadGetCreatedAtArgType = time.Time
|
||||
type CreateImagePayloadGetCreatedAtRetType = time.Time
|
||||
|
||||
func getCreateImagePayloadGetCreatedAtAttributeTypeOk(arg CreateImagePayloadGetCreatedAtAttributeType) (ret CreateImagePayloadGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetCreatedAtAttributeType(arg *CreateImagePayloadGetCreatedAtAttributeType, val CreateImagePayloadGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for diskFormat
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateImagePayloadGetDiskFormatAttributeType = *string
|
||||
|
||||
func getCreateImagePayloadGetDiskFormatAttributeTypeOk(arg CreateImagePayloadGetDiskFormatAttributeType) (ret CreateImagePayloadGetDiskFormatRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetDiskFormatAttributeType(arg *CreateImagePayloadGetDiskFormatAttributeType, val CreateImagePayloadGetDiskFormatRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateImagePayloadGetDiskFormatArgType = string
|
||||
type CreateImagePayloadGetDiskFormatRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateImagePayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreateImagePayloadGetIdAttributeTypeOk(arg CreateImagePayloadGetIdAttributeType) (ret CreateImagePayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetIdAttributeType(arg *CreateImagePayloadGetIdAttributeType, val CreateImagePayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateImagePayloadGetIdArgType = string
|
||||
type CreateImagePayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for importProgress
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateImagePayloadGetImportProgressAttributeType = *int64
|
||||
type CreateImagePayloadGetImportProgressArgType = int64
|
||||
type CreateImagePayloadGetImportProgressRetType = int64
|
||||
|
||||
func getCreateImagePayloadGetImportProgressAttributeTypeOk(arg CreateImagePayloadGetImportProgressAttributeType) (ret CreateImagePayloadGetImportProgressRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetImportProgressAttributeType(arg *CreateImagePayloadGetImportProgressAttributeType, val CreateImagePayloadGetImportProgressRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateImagePayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateImagePayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateImagePayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateImagePayloadGetLabelsAttributeTypeOk(arg CreateImagePayloadGetLabelsAttributeType) (ret CreateImagePayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetLabelsAttributeType(arg *CreateImagePayloadGetLabelsAttributeType, val CreateImagePayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for minDiskSize
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateImagePayloadGetMinDiskSizeAttributeType = *int64
|
||||
type CreateImagePayloadGetMinDiskSizeArgType = int64
|
||||
type CreateImagePayloadGetMinDiskSizeRetType = int64
|
||||
|
||||
func getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(arg CreateImagePayloadGetMinDiskSizeAttributeType) (ret CreateImagePayloadGetMinDiskSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetMinDiskSizeAttributeType(arg *CreateImagePayloadGetMinDiskSizeAttributeType, val CreateImagePayloadGetMinDiskSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for minRam
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateImagePayloadGetMinRamAttributeType = *int64
|
||||
type CreateImagePayloadGetMinRamArgType = int64
|
||||
type CreateImagePayloadGetMinRamRetType = int64
|
||||
|
||||
func getCreateImagePayloadGetMinRamAttributeTypeOk(arg CreateImagePayloadGetMinRamAttributeType) (ret CreateImagePayloadGetMinRamRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetMinRamAttributeType(arg *CreateImagePayloadGetMinRamAttributeType, val CreateImagePayloadGetMinRamRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateImagePayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateImagePayloadGetNameAttributeTypeOk(arg CreateImagePayloadGetNameAttributeType) (ret CreateImagePayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetNameAttributeType(arg *CreateImagePayloadGetNameAttributeType, val CreateImagePayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateImagePayloadGetNameArgType = string
|
||||
type CreateImagePayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for owner
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateImagePayloadGetOwnerAttributeType = *string
|
||||
|
||||
func getCreateImagePayloadGetOwnerAttributeTypeOk(arg CreateImagePayloadGetOwnerAttributeType) (ret CreateImagePayloadGetOwnerRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetOwnerAttributeType(arg *CreateImagePayloadGetOwnerAttributeType, val CreateImagePayloadGetOwnerRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateImagePayloadGetOwnerArgType = string
|
||||
type CreateImagePayloadGetOwnerRetType = string
|
||||
|
||||
/*
|
||||
types and functions for protected
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateImagePayloadgetProtectedAttributeType = *bool
|
||||
type CreateImagePayloadgetProtectedArgType = bool
|
||||
type CreateImagePayloadgetProtectedRetType = bool
|
||||
|
||||
func getCreateImagePayloadgetProtectedAttributeTypeOk(arg CreateImagePayloadgetProtectedAttributeType) (ret CreateImagePayloadgetProtectedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadgetProtectedAttributeType(arg *CreateImagePayloadgetProtectedAttributeType, val CreateImagePayloadgetProtectedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for scope
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateImagePayloadGetScopeAttributeType = *string
|
||||
|
||||
func getCreateImagePayloadGetScopeAttributeTypeOk(arg CreateImagePayloadGetScopeAttributeType) (ret CreateImagePayloadGetScopeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetScopeAttributeType(arg *CreateImagePayloadGetScopeAttributeType, val CreateImagePayloadGetScopeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateImagePayloadGetScopeArgType = string
|
||||
type CreateImagePayloadGetScopeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateImagePayloadGetSizeAttributeType = *int64
|
||||
type CreateImagePayloadGetSizeArgType = int64
|
||||
type CreateImagePayloadGetSizeRetType = int64
|
||||
|
||||
func getCreateImagePayloadGetSizeAttributeTypeOk(arg CreateImagePayloadGetSizeAttributeType) (ret CreateImagePayloadGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetSizeAttributeType(arg *CreateImagePayloadGetSizeAttributeType, val CreateImagePayloadGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateImagePayloadGetStatusAttributeType = *string
|
||||
|
||||
func getCreateImagePayloadGetStatusAttributeTypeOk(arg CreateImagePayloadGetStatusAttributeType) (ret CreateImagePayloadGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetStatusAttributeType(arg *CreateImagePayloadGetStatusAttributeType, val CreateImagePayloadGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateImagePayloadGetStatusArgType = string
|
||||
type CreateImagePayloadGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateImagePayloadGetUpdatedAtAttributeType = *time.Time
|
||||
type CreateImagePayloadGetUpdatedAtArgType = time.Time
|
||||
type CreateImagePayloadGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getCreateImagePayloadGetUpdatedAtAttributeTypeOk(arg CreateImagePayloadGetUpdatedAtAttributeType) (ret CreateImagePayloadGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateImagePayloadGetUpdatedAtAttributeType(arg *CreateImagePayloadGetUpdatedAtAttributeType, val CreateImagePayloadGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateImagePayload Object that represents an Image and its parameters. Used for Creating and returning (get/list).
|
||||
type CreateImagePayload struct {
|
||||
Agent CreateImagePayloadGetAgentAttributeType `json:"agent,omitempty"`
|
||||
Checksum CreateImagePayloadGetChecksumAttributeType `json:"checksum,omitempty"`
|
||||
Config CreateImagePayloadGetConfigAttributeType `json:"config,omitempty"`
|
||||
// Date-time when resource was created.
|
||||
CreatedAt CreateImagePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.
|
||||
// REQUIRED
|
||||
DiskFormat CreateImagePayloadGetDiskFormatAttributeType `json:"diskFormat" required:"true"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreateImagePayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// Indicates Image Import Progress in percent.
|
||||
ImportProgress CreateImagePayloadGetImportProgressAttributeType `json:"importProgress,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateImagePayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// Size in Gigabyte.
|
||||
MinDiskSize CreateImagePayloadGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"`
|
||||
// Size in Megabyte.
|
||||
MinRam CreateImagePayloadGetMinRamAttributeType `json:"minRam,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name CreateImagePayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Owner CreateImagePayloadGetOwnerAttributeType `json:"owner,omitempty"`
|
||||
// When true the image is prevented from being deleted.
|
||||
Protected CreateImagePayloadgetProtectedAttributeType `json:"protected,omitempty"`
|
||||
// Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`.
|
||||
Scope CreateImagePayloadGetScopeAttributeType `json:"scope,omitempty"`
|
||||
// Size in bytes.
|
||||
Size CreateImagePayloadGetSizeAttributeType `json:"size,omitempty"`
|
||||
// The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.
|
||||
Status CreateImagePayloadGetStatusAttributeType `json:"status,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt CreateImagePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateImagePayload CreateImagePayload
|
||||
|
||||
// NewCreateImagePayload instantiates a new CreateImagePayload 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 NewCreateImagePayload(diskFormat CreateImagePayloadGetDiskFormatArgType, name CreateImagePayloadGetNameArgType) *CreateImagePayload {
|
||||
this := CreateImagePayload{}
|
||||
setCreateImagePayloadGetDiskFormatAttributeType(&this.DiskFormat, diskFormat)
|
||||
setCreateImagePayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateImagePayloadWithDefaults instantiates a new CreateImagePayload 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 NewCreateImagePayloadWithDefaults() *CreateImagePayload {
|
||||
this := CreateImagePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAgent returns the Agent field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetAgent() (res CreateImagePayloadGetAgentRetType) {
|
||||
res, _ = o.GetAgentOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetAgentOk() (ret CreateImagePayloadGetAgentRetType, ok bool) {
|
||||
return getCreateImagePayloadGetAgentAttributeTypeOk(o.Agent)
|
||||
}
|
||||
|
||||
// HasAgent returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasAgent() bool {
|
||||
_, ok := o.GetAgentOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field.
|
||||
func (o *CreateImagePayload) SetAgent(v CreateImagePayloadGetAgentRetType) {
|
||||
setCreateImagePayloadGetAgentAttributeType(&o.Agent, v)
|
||||
}
|
||||
|
||||
// GetChecksum returns the Checksum field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetChecksum() (res CreateImagePayloadGetChecksumRetType) {
|
||||
res, _ = o.GetChecksumOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetChecksumOk() (ret CreateImagePayloadGetChecksumRetType, ok bool) {
|
||||
return getCreateImagePayloadGetChecksumAttributeTypeOk(o.Checksum)
|
||||
}
|
||||
|
||||
// HasChecksum returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasChecksum() bool {
|
||||
_, ok := o.GetChecksumOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field.
|
||||
func (o *CreateImagePayload) SetChecksum(v CreateImagePayloadGetChecksumRetType) {
|
||||
setCreateImagePayloadGetChecksumAttributeType(&o.Checksum, v)
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetConfig() (res CreateImagePayloadGetConfigRetType) {
|
||||
res, _ = o.GetConfigOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetConfigOk() (ret CreateImagePayloadGetConfigRetType, ok bool) {
|
||||
return getCreateImagePayloadGetConfigAttributeTypeOk(o.Config)
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasConfig() bool {
|
||||
_, ok := o.GetConfigOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field.
|
||||
func (o *CreateImagePayload) SetConfig(v CreateImagePayloadGetConfigRetType) {
|
||||
setCreateImagePayloadGetConfigAttributeType(&o.Config, v)
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetCreatedAt() (res CreateImagePayloadGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetCreatedAtOk() (ret CreateImagePayloadGetCreatedAtRetType, ok bool) {
|
||||
return getCreateImagePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *CreateImagePayload) SetCreatedAt(v CreateImagePayloadGetCreatedAtRetType) {
|
||||
setCreateImagePayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDiskFormat returns the DiskFormat field value
|
||||
func (o *CreateImagePayload) GetDiskFormat() (ret CreateImagePayloadGetDiskFormatRetType) {
|
||||
ret, _ = o.GetDiskFormatOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDiskFormatOk returns a tuple with the DiskFormat field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetDiskFormatOk() (ret CreateImagePayloadGetDiskFormatRetType, ok bool) {
|
||||
return getCreateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat)
|
||||
}
|
||||
|
||||
// SetDiskFormat sets field value
|
||||
func (o *CreateImagePayload) SetDiskFormat(v CreateImagePayloadGetDiskFormatRetType) {
|
||||
setCreateImagePayloadGetDiskFormatAttributeType(&o.DiskFormat, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetId() (res CreateImagePayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetIdOk() (ret CreateImagePayloadGetIdRetType, ok bool) {
|
||||
return getCreateImagePayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreateImagePayload) SetId(v CreateImagePayloadGetIdRetType) {
|
||||
setCreateImagePayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetImportProgress returns the ImportProgress field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetImportProgress() (res CreateImagePayloadGetImportProgressRetType) {
|
||||
res, _ = o.GetImportProgressOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetImportProgressOk returns a tuple with the ImportProgress field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetImportProgressOk() (ret CreateImagePayloadGetImportProgressRetType, ok bool) {
|
||||
return getCreateImagePayloadGetImportProgressAttributeTypeOk(o.ImportProgress)
|
||||
}
|
||||
|
||||
// HasImportProgress returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasImportProgress() bool {
|
||||
_, ok := o.GetImportProgressOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field.
|
||||
func (o *CreateImagePayload) SetImportProgress(v CreateImagePayloadGetImportProgressRetType) {
|
||||
setCreateImagePayloadGetImportProgressAttributeType(&o.ImportProgress, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetLabels() (res CreateImagePayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetLabelsOk() (ret CreateImagePayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateImagePayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateImagePayload) SetLabels(v CreateImagePayloadGetLabelsRetType) {
|
||||
setCreateImagePayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetMinDiskSize returns the MinDiskSize field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetMinDiskSize() (res CreateImagePayloadGetMinDiskSizeRetType) {
|
||||
res, _ = o.GetMinDiskSizeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMinDiskSizeOk returns a tuple with the MinDiskSize field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetMinDiskSizeOk() (ret CreateImagePayloadGetMinDiskSizeRetType, ok bool) {
|
||||
return getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize)
|
||||
}
|
||||
|
||||
// HasMinDiskSize returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasMinDiskSize() bool {
|
||||
_, ok := o.GetMinDiskSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field.
|
||||
func (o *CreateImagePayload) SetMinDiskSize(v CreateImagePayloadGetMinDiskSizeRetType) {
|
||||
setCreateImagePayloadGetMinDiskSizeAttributeType(&o.MinDiskSize, v)
|
||||
}
|
||||
|
||||
// GetMinRam returns the MinRam field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetMinRam() (res CreateImagePayloadGetMinRamRetType) {
|
||||
res, _ = o.GetMinRamOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMinRamOk returns a tuple with the MinRam field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetMinRamOk() (ret CreateImagePayloadGetMinRamRetType, ok bool) {
|
||||
return getCreateImagePayloadGetMinRamAttributeTypeOk(o.MinRam)
|
||||
}
|
||||
|
||||
// HasMinRam returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasMinRam() bool {
|
||||
_, ok := o.GetMinRamOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field.
|
||||
func (o *CreateImagePayload) SetMinRam(v CreateImagePayloadGetMinRamRetType) {
|
||||
setCreateImagePayloadGetMinRamAttributeType(&o.MinRam, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateImagePayload) GetName() (ret CreateImagePayloadGetNameRetType) {
|
||||
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 *CreateImagePayload) GetNameOk() (ret CreateImagePayloadGetNameRetType, ok bool) {
|
||||
return getCreateImagePayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateImagePayload) SetName(v CreateImagePayloadGetNameRetType) {
|
||||
setCreateImagePayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetOwner returns the Owner field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetOwner() (res CreateImagePayloadGetOwnerRetType) {
|
||||
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 *CreateImagePayload) GetOwnerOk() (ret CreateImagePayloadGetOwnerRetType, ok bool) {
|
||||
return getCreateImagePayloadGetOwnerAttributeTypeOk(o.Owner)
|
||||
}
|
||||
|
||||
// HasOwner returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasOwner() bool {
|
||||
_, ok := o.GetOwnerOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
||||
func (o *CreateImagePayload) SetOwner(v CreateImagePayloadGetOwnerRetType) {
|
||||
setCreateImagePayloadGetOwnerAttributeType(&o.Owner, v)
|
||||
}
|
||||
|
||||
// GetProtected returns the Protected field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetProtected() (res CreateImagePayloadgetProtectedRetType) {
|
||||
res, _ = o.GetProtectedOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProtectedOk returns a tuple with the Protected field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetProtectedOk() (ret CreateImagePayloadgetProtectedRetType, ok bool) {
|
||||
return getCreateImagePayloadgetProtectedAttributeTypeOk(o.Protected)
|
||||
}
|
||||
|
||||
// HasProtected returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasProtected() bool {
|
||||
_, ok := o.GetProtectedOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProtected gets a reference to the given bool and assigns it to the Protected field.
|
||||
func (o *CreateImagePayload) SetProtected(v CreateImagePayloadgetProtectedRetType) {
|
||||
setCreateImagePayloadgetProtectedAttributeType(&o.Protected, v)
|
||||
}
|
||||
|
||||
// GetScope returns the Scope field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetScope() (res CreateImagePayloadGetScopeRetType) {
|
||||
res, _ = o.GetScopeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetScopeOk() (ret CreateImagePayloadGetScopeRetType, ok bool) {
|
||||
return getCreateImagePayloadGetScopeAttributeTypeOk(o.Scope)
|
||||
}
|
||||
|
||||
// HasScope returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasScope() bool {
|
||||
_, ok := o.GetScopeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetScope gets a reference to the given string and assigns it to the Scope field.
|
||||
func (o *CreateImagePayload) SetScope(v CreateImagePayloadGetScopeRetType) {
|
||||
setCreateImagePayloadGetScopeAttributeType(&o.Scope, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetSize() (res CreateImagePayloadGetSizeRetType) {
|
||||
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 *CreateImagePayload) GetSizeOk() (ret CreateImagePayloadGetSizeRetType, ok bool) {
|
||||
return getCreateImagePayloadGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasSize() bool {
|
||||
_, ok := o.GetSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||
func (o *CreateImagePayload) SetSize(v CreateImagePayloadGetSizeRetType) {
|
||||
setCreateImagePayloadGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetStatus() (res CreateImagePayloadGetStatusRetType) {
|
||||
res, _ = o.GetStatusOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetStatusOk() (ret CreateImagePayloadGetStatusRetType, ok bool) {
|
||||
return getCreateImagePayloadGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasStatus() bool {
|
||||
_, ok := o.GetStatusOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *CreateImagePayload) SetStatus(v CreateImagePayloadGetStatusRetType) {
|
||||
setCreateImagePayloadGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateImagePayload) GetUpdatedAt() (res CreateImagePayloadGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateImagePayload) GetUpdatedAtOk() (ret CreateImagePayloadGetUpdatedAtRetType, ok bool) {
|
||||
return getCreateImagePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateImagePayload) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *CreateImagePayload) SetUpdatedAt(v CreateImagePayloadGetUpdatedAtRetType) {
|
||||
setCreateImagePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o CreateImagePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateImagePayloadGetAgentAttributeTypeOk(o.Agent); ok {
|
||||
toSerialize["Agent"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetChecksumAttributeTypeOk(o.Checksum); ok {
|
||||
toSerialize["Checksum"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetConfigAttributeTypeOk(o.Config); ok {
|
||||
toSerialize["Config"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetDiskFormatAttributeTypeOk(o.DiskFormat); ok {
|
||||
toSerialize["DiskFormat"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetImportProgressAttributeTypeOk(o.ImportProgress); ok {
|
||||
toSerialize["ImportProgress"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok {
|
||||
toSerialize["MinDiskSize"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetMinRamAttributeTypeOk(o.MinRam); ok {
|
||||
toSerialize["MinRam"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||
toSerialize["Owner"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadgetProtectedAttributeTypeOk(o.Protected); ok {
|
||||
toSerialize["Protected"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetScopeAttributeTypeOk(o.Scope); ok {
|
||||
toSerialize["Scope"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getCreateImagePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateImagePayload struct {
|
||||
value *CreateImagePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateImagePayload) Get() *CreateImagePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateImagePayload) Set(val *CreateImagePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateImagePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateImagePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateImagePayload(val *CreateImagePayload) *NullableCreateImagePayload {
|
||||
return &NullableCreateImagePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateImagePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateImagePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_image_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_image_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
272
pkg/iaasbeta/model_create_isolated_network_payload.go
Normal file
272
pkg/iaasbeta/model_create_isolated_network_payload.go
Normal file
|
|
@ -0,0 +1,272 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateIsolatedNetworkPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateIsolatedNetworkPayload{}
|
||||
|
||||
/*
|
||||
types and functions for dhcp
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateIsolatedNetworkPayloadgetDhcpAttributeType = *bool
|
||||
type CreateIsolatedNetworkPayloadgetDhcpArgType = bool
|
||||
type CreateIsolatedNetworkPayloadgetDhcpRetType = bool
|
||||
|
||||
func getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(arg CreateIsolatedNetworkPayloadgetDhcpAttributeType) (ret CreateIsolatedNetworkPayloadgetDhcpRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadgetDhcpAttributeType(arg *CreateIsolatedNetworkPayloadgetDhcpAttributeType, val CreateIsolatedNetworkPayloadgetDhcpRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for ipv4
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateIsolatedNetworkPayloadGetIpv4AttributeType = *CreateNetworkIPv4
|
||||
type CreateIsolatedNetworkPayloadGetIpv4ArgType = CreateNetworkIPv4
|
||||
type CreateIsolatedNetworkPayloadGetIpv4RetType = CreateNetworkIPv4
|
||||
|
||||
func getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(arg CreateIsolatedNetworkPayloadGetIpv4AttributeType) (ret CreateIsolatedNetworkPayloadGetIpv4RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadGetIpv4AttributeType(arg *CreateIsolatedNetworkPayloadGetIpv4AttributeType, val CreateIsolatedNetworkPayloadGetIpv4RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateIsolatedNetworkPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateIsolatedNetworkPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateIsolatedNetworkPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(arg CreateIsolatedNetworkPayloadGetLabelsAttributeType) (ret CreateIsolatedNetworkPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadGetLabelsAttributeType(arg *CreateIsolatedNetworkPayloadGetLabelsAttributeType, val CreateIsolatedNetworkPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateIsolatedNetworkPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(arg CreateIsolatedNetworkPayloadGetNameAttributeType) (ret CreateIsolatedNetworkPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadGetNameAttributeType(arg *CreateIsolatedNetworkPayloadGetNameAttributeType, val CreateIsolatedNetworkPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateIsolatedNetworkPayloadGetNameArgType = string
|
||||
type CreateIsolatedNetworkPayloadGetNameRetType = string
|
||||
|
||||
// CreateIsolatedNetworkPayload Object that represents the request body for a single isolated network create.
|
||||
type CreateIsolatedNetworkPayload struct {
|
||||
// Enable or disable DHCP for a network.
|
||||
Dhcp CreateIsolatedNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"`
|
||||
Ipv4 CreateIsolatedNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateIsolatedNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name CreateIsolatedNetworkPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateIsolatedNetworkPayload CreateIsolatedNetworkPayload
|
||||
|
||||
// NewCreateIsolatedNetworkPayload instantiates a new CreateIsolatedNetworkPayload 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 NewCreateIsolatedNetworkPayload(name CreateIsolatedNetworkPayloadGetNameArgType) *CreateIsolatedNetworkPayload {
|
||||
this := CreateIsolatedNetworkPayload{}
|
||||
setCreateIsolatedNetworkPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateIsolatedNetworkPayloadWithDefaults instantiates a new CreateIsolatedNetworkPayload 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 NewCreateIsolatedNetworkPayloadWithDefaults() *CreateIsolatedNetworkPayload {
|
||||
this := CreateIsolatedNetworkPayload{}
|
||||
var dhcp bool = true
|
||||
this.Dhcp = &dhcp
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDhcp returns the Dhcp field value if set, zero value otherwise.
|
||||
func (o *CreateIsolatedNetworkPayload) GetDhcp() (res CreateIsolatedNetworkPayloadgetDhcpRetType) {
|
||||
res, _ = o.GetDhcpOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) GetDhcpOk() (ret CreateIsolatedNetworkPayloadgetDhcpRetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp)
|
||||
}
|
||||
|
||||
// HasDhcp returns a boolean if a field has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) HasDhcp() bool {
|
||||
_, ok := o.GetDhcpOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field.
|
||||
func (o *CreateIsolatedNetworkPayload) SetDhcp(v CreateIsolatedNetworkPayloadgetDhcpRetType) {
|
||||
setCreateIsolatedNetworkPayloadgetDhcpAttributeType(&o.Dhcp, v)
|
||||
}
|
||||
|
||||
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
||||
func (o *CreateIsolatedNetworkPayload) GetIpv4() (res CreateIsolatedNetworkPayloadGetIpv4RetType) {
|
||||
res, _ = o.GetIpv4Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) GetIpv4Ok() (ret CreateIsolatedNetworkPayloadGetIpv4RetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4)
|
||||
}
|
||||
|
||||
// HasIpv4 returns a boolean if a field has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) HasIpv4() bool {
|
||||
_, ok := o.GetIpv4Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv4 gets a reference to the given CreateNetworkIPv4 and assigns it to the Ipv4 field.
|
||||
func (o *CreateIsolatedNetworkPayload) SetIpv4(v CreateIsolatedNetworkPayloadGetIpv4RetType) {
|
||||
setCreateIsolatedNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateIsolatedNetworkPayload) GetLabels() (res CreateIsolatedNetworkPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) GetLabelsOk() (ret CreateIsolatedNetworkPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateIsolatedNetworkPayload) SetLabels(v CreateIsolatedNetworkPayloadGetLabelsRetType) {
|
||||
setCreateIsolatedNetworkPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateIsolatedNetworkPayload) GetName() (ret CreateIsolatedNetworkPayloadGetNameRetType) {
|
||||
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 *CreateIsolatedNetworkPayload) GetNameOk() (ret CreateIsolatedNetworkPayloadGetNameRetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateIsolatedNetworkPayload) SetName(v CreateIsolatedNetworkPayloadGetNameRetType) {
|
||||
setCreateIsolatedNetworkPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
func (o CreateIsolatedNetworkPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok {
|
||||
toSerialize["Dhcp"] = val
|
||||
}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
||||
toSerialize["Ipv4"] = val
|
||||
}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateIsolatedNetworkPayload struct {
|
||||
value *CreateIsolatedNetworkPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateIsolatedNetworkPayload) Get() *CreateIsolatedNetworkPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateIsolatedNetworkPayload) Set(val *CreateIsolatedNetworkPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateIsolatedNetworkPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateIsolatedNetworkPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateIsolatedNetworkPayload(val *CreateIsolatedNetworkPayload) *NullableCreateIsolatedNetworkPayload {
|
||||
return &NullableCreateIsolatedNetworkPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateIsolatedNetworkPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateIsolatedNetworkPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_isolated_network_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_isolated_network_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
370
pkg/iaasbeta/model_create_key_pair_payload.go
Normal file
370
pkg/iaasbeta/model_create_key_pair_payload.go
Normal file
|
|
@ -0,0 +1,370 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the CreateKeyPairPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateKeyPairPayload{}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateKeyPairPayloadGetCreatedAtAttributeType = *time.Time
|
||||
type CreateKeyPairPayloadGetCreatedAtArgType = time.Time
|
||||
type CreateKeyPairPayloadGetCreatedAtRetType = time.Time
|
||||
|
||||
func getCreateKeyPairPayloadGetCreatedAtAttributeTypeOk(arg CreateKeyPairPayloadGetCreatedAtAttributeType) (ret CreateKeyPairPayloadGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateKeyPairPayloadGetCreatedAtAttributeType(arg *CreateKeyPairPayloadGetCreatedAtAttributeType, val CreateKeyPairPayloadGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for fingerprint
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateKeyPairPayloadGetFingerprintAttributeType = *string
|
||||
|
||||
func getCreateKeyPairPayloadGetFingerprintAttributeTypeOk(arg CreateKeyPairPayloadGetFingerprintAttributeType) (ret CreateKeyPairPayloadGetFingerprintRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateKeyPairPayloadGetFingerprintAttributeType(arg *CreateKeyPairPayloadGetFingerprintAttributeType, val CreateKeyPairPayloadGetFingerprintRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateKeyPairPayloadGetFingerprintArgType = string
|
||||
type CreateKeyPairPayloadGetFingerprintRetType = string
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateKeyPairPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateKeyPairPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateKeyPairPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateKeyPairPayloadGetLabelsAttributeTypeOk(arg CreateKeyPairPayloadGetLabelsAttributeType) (ret CreateKeyPairPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateKeyPairPayloadGetLabelsAttributeType(arg *CreateKeyPairPayloadGetLabelsAttributeType, val CreateKeyPairPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateKeyPairPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateKeyPairPayloadGetNameAttributeTypeOk(arg CreateKeyPairPayloadGetNameAttributeType) (ret CreateKeyPairPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateKeyPairPayloadGetNameAttributeType(arg *CreateKeyPairPayloadGetNameAttributeType, val CreateKeyPairPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateKeyPairPayloadGetNameArgType = string
|
||||
type CreateKeyPairPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for publicKey
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateKeyPairPayloadGetPublicKeyAttributeType = *string
|
||||
|
||||
func getCreateKeyPairPayloadGetPublicKeyAttributeTypeOk(arg CreateKeyPairPayloadGetPublicKeyAttributeType) (ret CreateKeyPairPayloadGetPublicKeyRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateKeyPairPayloadGetPublicKeyAttributeType(arg *CreateKeyPairPayloadGetPublicKeyAttributeType, val CreateKeyPairPayloadGetPublicKeyRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateKeyPairPayloadGetPublicKeyArgType = string
|
||||
type CreateKeyPairPayloadGetPublicKeyRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateKeyPairPayloadGetUpdatedAtAttributeType = *time.Time
|
||||
type CreateKeyPairPayloadGetUpdatedAtArgType = time.Time
|
||||
type CreateKeyPairPayloadGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getCreateKeyPairPayloadGetUpdatedAtAttributeTypeOk(arg CreateKeyPairPayloadGetUpdatedAtAttributeType) (ret CreateKeyPairPayloadGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateKeyPairPayloadGetUpdatedAtAttributeType(arg *CreateKeyPairPayloadGetUpdatedAtAttributeType, val CreateKeyPairPayloadGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateKeyPairPayload Object that represents the public key of an SSH keypair and its name.
|
||||
type CreateKeyPairPayload struct {
|
||||
// Date-time when resource was created.
|
||||
CreatedAt CreateKeyPairPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Object that represents an SSH keypair MD5 fingerprint.
|
||||
Fingerprint CreateKeyPairPayloadGetFingerprintAttributeType `json:"fingerprint,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateKeyPairPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name of an SSH keypair. Allowed characters are letters [a-zA-Z], digits [0-9] and the following special characters: [@._-].
|
||||
Name CreateKeyPairPayloadGetNameAttributeType `json:"name,omitempty"`
|
||||
// Object that represents a public SSH key.
|
||||
// REQUIRED
|
||||
PublicKey CreateKeyPairPayloadGetPublicKeyAttributeType `json:"publicKey" required:"true"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt CreateKeyPairPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateKeyPairPayload CreateKeyPairPayload
|
||||
|
||||
// NewCreateKeyPairPayload instantiates a new CreateKeyPairPayload 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 NewCreateKeyPairPayload(publicKey CreateKeyPairPayloadGetPublicKeyArgType) *CreateKeyPairPayload {
|
||||
this := CreateKeyPairPayload{}
|
||||
setCreateKeyPairPayloadGetPublicKeyAttributeType(&this.PublicKey, publicKey)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateKeyPairPayloadWithDefaults instantiates a new CreateKeyPairPayload 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 NewCreateKeyPairPayloadWithDefaults() *CreateKeyPairPayload {
|
||||
this := CreateKeyPairPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateKeyPairPayload) GetCreatedAt() (res CreateKeyPairPayloadGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateKeyPairPayload) GetCreatedAtOk() (ret CreateKeyPairPayloadGetCreatedAtRetType, ok bool) {
|
||||
return getCreateKeyPairPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateKeyPairPayload) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *CreateKeyPairPayload) SetCreatedAt(v CreateKeyPairPayloadGetCreatedAtRetType) {
|
||||
setCreateKeyPairPayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetFingerprint returns the Fingerprint field value if set, zero value otherwise.
|
||||
func (o *CreateKeyPairPayload) GetFingerprint() (res CreateKeyPairPayloadGetFingerprintRetType) {
|
||||
res, _ = o.GetFingerprintOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetFingerprintOk returns a tuple with the Fingerprint field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateKeyPairPayload) GetFingerprintOk() (ret CreateKeyPairPayloadGetFingerprintRetType, ok bool) {
|
||||
return getCreateKeyPairPayloadGetFingerprintAttributeTypeOk(o.Fingerprint)
|
||||
}
|
||||
|
||||
// HasFingerprint returns a boolean if a field has been set.
|
||||
func (o *CreateKeyPairPayload) HasFingerprint() bool {
|
||||
_, ok := o.GetFingerprintOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetFingerprint gets a reference to the given string and assigns it to the Fingerprint field.
|
||||
func (o *CreateKeyPairPayload) SetFingerprint(v CreateKeyPairPayloadGetFingerprintRetType) {
|
||||
setCreateKeyPairPayloadGetFingerprintAttributeType(&o.Fingerprint, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateKeyPairPayload) GetLabels() (res CreateKeyPairPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateKeyPairPayload) GetLabelsOk() (ret CreateKeyPairPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateKeyPairPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateKeyPairPayload) SetLabels(v CreateKeyPairPayloadGetLabelsRetType) {
|
||||
setCreateKeyPairPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *CreateKeyPairPayload) GetName() (res CreateKeyPairPayloadGetNameRetType) {
|
||||
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 *CreateKeyPairPayload) GetNameOk() (ret CreateKeyPairPayloadGetNameRetType, ok bool) {
|
||||
return getCreateKeyPairPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *CreateKeyPairPayload) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *CreateKeyPairPayload) SetName(v CreateKeyPairPayloadGetNameRetType) {
|
||||
setCreateKeyPairPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetPublicKey returns the PublicKey field value
|
||||
func (o *CreateKeyPairPayload) GetPublicKey() (ret CreateKeyPairPayloadGetPublicKeyRetType) {
|
||||
ret, _ = o.GetPublicKeyOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPublicKeyOk returns a tuple with the PublicKey field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateKeyPairPayload) GetPublicKeyOk() (ret CreateKeyPairPayloadGetPublicKeyRetType, ok bool) {
|
||||
return getCreateKeyPairPayloadGetPublicKeyAttributeTypeOk(o.PublicKey)
|
||||
}
|
||||
|
||||
// SetPublicKey sets field value
|
||||
func (o *CreateKeyPairPayload) SetPublicKey(v CreateKeyPairPayloadGetPublicKeyRetType) {
|
||||
setCreateKeyPairPayloadGetPublicKeyAttributeType(&o.PublicKey, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateKeyPairPayload) GetUpdatedAt() (res CreateKeyPairPayloadGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateKeyPairPayload) GetUpdatedAtOk() (ret CreateKeyPairPayloadGetUpdatedAtRetType, ok bool) {
|
||||
return getCreateKeyPairPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateKeyPairPayload) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *CreateKeyPairPayload) SetUpdatedAt(v CreateKeyPairPayloadGetUpdatedAtRetType) {
|
||||
setCreateKeyPairPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o CreateKeyPairPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateKeyPairPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getCreateKeyPairPayloadGetFingerprintAttributeTypeOk(o.Fingerprint); ok {
|
||||
toSerialize["Fingerprint"] = val
|
||||
}
|
||||
if val, ok := getCreateKeyPairPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateKeyPairPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateKeyPairPayloadGetPublicKeyAttributeTypeOk(o.PublicKey); ok {
|
||||
toSerialize["PublicKey"] = val
|
||||
}
|
||||
if val, ok := getCreateKeyPairPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateKeyPairPayload struct {
|
||||
value *CreateKeyPairPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateKeyPairPayload) Get() *CreateKeyPairPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateKeyPairPayload) Set(val *CreateKeyPairPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateKeyPairPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateKeyPairPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateKeyPairPayload(val *CreateKeyPairPayload) *NullableCreateKeyPairPayload {
|
||||
return &NullableCreateKeyPairPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateKeyPairPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateKeyPairPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_key_pair_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_key_pair_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
174
pkg/iaasbeta/model_create_network_area_payload.go
Normal file
174
pkg/iaasbeta/model_create_network_area_payload.go
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkAreaPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkAreaPayload{}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateNetworkAreaPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateNetworkAreaPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateNetworkAreaPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateNetworkAreaPayloadGetLabelsAttributeTypeOk(arg CreateNetworkAreaPayloadGetLabelsAttributeType) (ret CreateNetworkAreaPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkAreaPayloadGetLabelsAttributeType(arg *CreateNetworkAreaPayloadGetLabelsAttributeType, val CreateNetworkAreaPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNetworkAreaPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateNetworkAreaPayloadGetNameAttributeTypeOk(arg CreateNetworkAreaPayloadGetNameAttributeType) (ret CreateNetworkAreaPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkAreaPayloadGetNameAttributeType(arg *CreateNetworkAreaPayloadGetNameAttributeType, val CreateNetworkAreaPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNetworkAreaPayloadGetNameArgType = string
|
||||
type CreateNetworkAreaPayloadGetNameRetType = string
|
||||
|
||||
// CreateNetworkAreaPayload Object that represents the network area create request.
|
||||
type CreateNetworkAreaPayload struct {
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateNetworkAreaPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// REQUIRED
|
||||
Name CreateNetworkAreaPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateNetworkAreaPayload CreateNetworkAreaPayload
|
||||
|
||||
// NewCreateNetworkAreaPayload instantiates a new CreateNetworkAreaPayload 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 NewCreateNetworkAreaPayload(name CreateNetworkAreaPayloadGetNameArgType) *CreateNetworkAreaPayload {
|
||||
this := CreateNetworkAreaPayload{}
|
||||
setCreateNetworkAreaPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkAreaPayloadWithDefaults instantiates a new CreateNetworkAreaPayload 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 NewCreateNetworkAreaPayloadWithDefaults() *CreateNetworkAreaPayload {
|
||||
this := CreateNetworkAreaPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkAreaPayload) GetLabels() (res CreateNetworkAreaPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkAreaPayload) GetLabelsOk() (ret CreateNetworkAreaPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateNetworkAreaPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkAreaPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateNetworkAreaPayload) SetLabels(v CreateNetworkAreaPayloadGetLabelsRetType) {
|
||||
setCreateNetworkAreaPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateNetworkAreaPayload) GetName() (ret CreateNetworkAreaPayloadGetNameRetType) {
|
||||
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 *CreateNetworkAreaPayload) GetNameOk() (ret CreateNetworkAreaPayloadGetNameRetType, ok bool) {
|
||||
return getCreateNetworkAreaPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateNetworkAreaPayload) SetName(v CreateNetworkAreaPayloadGetNameRetType) {
|
||||
setCreateNetworkAreaPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkAreaPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkAreaPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkAreaPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkAreaPayload struct {
|
||||
value *CreateNetworkAreaPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaPayload) Get() *CreateNetworkAreaPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaPayload) Set(val *CreateNetworkAreaPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkAreaPayload(val *CreateNetworkAreaPayload) *NullableCreateNetworkAreaPayload {
|
||||
return &NullableCreateNetworkAreaPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_network_area_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_network_area_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
128
pkg/iaasbeta/model_create_network_area_range_payload.go
Normal file
128
pkg/iaasbeta/model_create_network_area_range_payload.go
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkAreaRangePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkAreaRangePayload{}
|
||||
|
||||
/*
|
||||
types and functions for ipv4
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNetworkAreaRangePayloadGetIpv4AttributeType = *[]NetworkRange
|
||||
type CreateNetworkAreaRangePayloadGetIpv4ArgType = []NetworkRange
|
||||
type CreateNetworkAreaRangePayloadGetIpv4RetType = []NetworkRange
|
||||
|
||||
func getCreateNetworkAreaRangePayloadGetIpv4AttributeTypeOk(arg CreateNetworkAreaRangePayloadGetIpv4AttributeType) (ret CreateNetworkAreaRangePayloadGetIpv4RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkAreaRangePayloadGetIpv4AttributeType(arg *CreateNetworkAreaRangePayloadGetIpv4AttributeType, val CreateNetworkAreaRangePayloadGetIpv4RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateNetworkAreaRangePayload struct for CreateNetworkAreaRangePayload
|
||||
type CreateNetworkAreaRangePayload struct {
|
||||
// A list of network ranges.
|
||||
Ipv4 CreateNetworkAreaRangePayloadGetIpv4AttributeType `json:"ipv4,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateNetworkAreaRangePayload instantiates a new CreateNetworkAreaRangePayload 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 NewCreateNetworkAreaRangePayload() *CreateNetworkAreaRangePayload {
|
||||
this := CreateNetworkAreaRangePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkAreaRangePayloadWithDefaults instantiates a new CreateNetworkAreaRangePayload 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 NewCreateNetworkAreaRangePayloadWithDefaults() *CreateNetworkAreaRangePayload {
|
||||
this := CreateNetworkAreaRangePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkAreaRangePayload) GetIpv4() (res CreateNetworkAreaRangePayloadGetIpv4RetType) {
|
||||
res, _ = o.GetIpv4Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkAreaRangePayload) GetIpv4Ok() (ret CreateNetworkAreaRangePayloadGetIpv4RetType, ok bool) {
|
||||
return getCreateNetworkAreaRangePayloadGetIpv4AttributeTypeOk(o.Ipv4)
|
||||
}
|
||||
|
||||
// HasIpv4 returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkAreaRangePayload) HasIpv4() bool {
|
||||
_, ok := o.GetIpv4Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv4 gets a reference to the given []NetworkRange and assigns it to the Ipv4 field.
|
||||
func (o *CreateNetworkAreaRangePayload) SetIpv4(v CreateNetworkAreaRangePayloadGetIpv4RetType) {
|
||||
setCreateNetworkAreaRangePayloadGetIpv4AttributeType(&o.Ipv4, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkAreaRangePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkAreaRangePayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
||||
toSerialize["Ipv4"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkAreaRangePayload struct {
|
||||
value *CreateNetworkAreaRangePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaRangePayload) Get() *CreateNetworkAreaRangePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaRangePayload) Set(val *CreateNetworkAreaRangePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaRangePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaRangePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkAreaRangePayload(val *CreateNetworkAreaRangePayload) *NullableCreateNetworkAreaRangePayload {
|
||||
return &NullableCreateNetworkAreaRangePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaRangePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaRangePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_network_area_range_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_network_area_range_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
126
pkg/iaasbeta/model_create_network_area_route_payload.go
Normal file
126
pkg/iaasbeta/model_create_network_area_route_payload.go
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkAreaRoutePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkAreaRoutePayload{}
|
||||
|
||||
/*
|
||||
types and functions for items
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNetworkAreaRoutePayloadGetItemsAttributeType = *[]Route
|
||||
type CreateNetworkAreaRoutePayloadGetItemsArgType = []Route
|
||||
type CreateNetworkAreaRoutePayloadGetItemsRetType = []Route
|
||||
|
||||
func getCreateNetworkAreaRoutePayloadGetItemsAttributeTypeOk(arg CreateNetworkAreaRoutePayloadGetItemsAttributeType) (ret CreateNetworkAreaRoutePayloadGetItemsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkAreaRoutePayloadGetItemsAttributeType(arg *CreateNetworkAreaRoutePayloadGetItemsAttributeType, val CreateNetworkAreaRoutePayloadGetItemsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateNetworkAreaRoutePayload Object represents a request to add network routes.
|
||||
type CreateNetworkAreaRoutePayload struct {
|
||||
// A list of routes.
|
||||
// REQUIRED
|
||||
Items CreateNetworkAreaRoutePayloadGetItemsAttributeType `json:"items" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateNetworkAreaRoutePayload CreateNetworkAreaRoutePayload
|
||||
|
||||
// NewCreateNetworkAreaRoutePayload instantiates a new CreateNetworkAreaRoutePayload 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 NewCreateNetworkAreaRoutePayload(items CreateNetworkAreaRoutePayloadGetItemsArgType) *CreateNetworkAreaRoutePayload {
|
||||
this := CreateNetworkAreaRoutePayload{}
|
||||
setCreateNetworkAreaRoutePayloadGetItemsAttributeType(&this.Items, items)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkAreaRoutePayloadWithDefaults instantiates a new CreateNetworkAreaRoutePayload 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 NewCreateNetworkAreaRoutePayloadWithDefaults() *CreateNetworkAreaRoutePayload {
|
||||
this := CreateNetworkAreaRoutePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetItems returns the Items field value
|
||||
func (o *CreateNetworkAreaRoutePayload) GetItems() (ret CreateNetworkAreaRoutePayloadGetItemsRetType) {
|
||||
ret, _ = o.GetItemsOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetItemsOk returns a tuple with the Items field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkAreaRoutePayload) GetItemsOk() (ret CreateNetworkAreaRoutePayloadGetItemsRetType, ok bool) {
|
||||
return getCreateNetworkAreaRoutePayloadGetItemsAttributeTypeOk(o.Items)
|
||||
}
|
||||
|
||||
// SetItems sets field value
|
||||
func (o *CreateNetworkAreaRoutePayload) SetItems(v CreateNetworkAreaRoutePayloadGetItemsRetType) {
|
||||
setCreateNetworkAreaRoutePayloadGetItemsAttributeType(&o.Items, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkAreaRoutePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkAreaRoutePayloadGetItemsAttributeTypeOk(o.Items); ok {
|
||||
toSerialize["Items"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkAreaRoutePayload struct {
|
||||
value *CreateNetworkAreaRoutePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaRoutePayload) Get() *CreateNetworkAreaRoutePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaRoutePayload) Set(val *CreateNetworkAreaRoutePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaRoutePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaRoutePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkAreaRoutePayload(val *CreateNetworkAreaRoutePayload) *NullableCreateNetworkAreaRoutePayload {
|
||||
return &NullableCreateNetworkAreaRoutePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkAreaRoutePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkAreaRoutePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_network_area_route_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_network_area_route_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
144
pkg/iaasbeta/model_create_network_ipv4.go
Normal file
144
pkg/iaasbeta/model_create_network_ipv4.go
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CreateNetworkIPv4 - The create request for an IPv4 network.
|
||||
type CreateNetworkIPv4 struct {
|
||||
CreateNetworkIPv4WithPrefix *CreateNetworkIPv4WithPrefix
|
||||
CreateNetworkIPv4WithPrefixLength *CreateNetworkIPv4WithPrefixLength
|
||||
}
|
||||
|
||||
// CreateNetworkIPv4WithPrefixAsCreateNetworkIPv4 is a convenience function that returns CreateNetworkIPv4WithPrefix wrapped in CreateNetworkIPv4
|
||||
func CreateNetworkIPv4WithPrefixAsCreateNetworkIPv4(v *CreateNetworkIPv4WithPrefix) CreateNetworkIPv4 {
|
||||
return CreateNetworkIPv4{
|
||||
CreateNetworkIPv4WithPrefix: v,
|
||||
}
|
||||
}
|
||||
|
||||
// CreateNetworkIPv4WithPrefixLengthAsCreateNetworkIPv4 is a convenience function that returns CreateNetworkIPv4WithPrefixLength wrapped in CreateNetworkIPv4
|
||||
func CreateNetworkIPv4WithPrefixLengthAsCreateNetworkIPv4(v *CreateNetworkIPv4WithPrefixLength) CreateNetworkIPv4 {
|
||||
return CreateNetworkIPv4{
|
||||
CreateNetworkIPv4WithPrefixLength: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *CreateNetworkIPv4) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
match := 0
|
||||
// Workaround until upstream issue is fixed:
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/21751
|
||||
// Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
|
||||
// try to unmarshal data into CreateNetworkIPv4WithPrefix
|
||||
dstCreateNetworkIPv41 := &CreateNetworkIPv4{}
|
||||
err = json.Unmarshal(data, &dstCreateNetworkIPv41.CreateNetworkIPv4WithPrefix)
|
||||
if err == nil {
|
||||
jsonCreateNetworkIPv4WithPrefix, _ := json.Marshal(&dstCreateNetworkIPv41.CreateNetworkIPv4WithPrefix)
|
||||
if string(jsonCreateNetworkIPv4WithPrefix) != "{}" { // empty struct
|
||||
dst.CreateNetworkIPv4WithPrefix = dstCreateNetworkIPv41.CreateNetworkIPv4WithPrefix
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
// try to unmarshal data into CreateNetworkIPv4WithPrefixLength
|
||||
dstCreateNetworkIPv42 := &CreateNetworkIPv4{}
|
||||
err = json.Unmarshal(data, &dstCreateNetworkIPv42.CreateNetworkIPv4WithPrefixLength)
|
||||
if err == nil {
|
||||
jsonCreateNetworkIPv4WithPrefixLength, _ := json.Marshal(&dstCreateNetworkIPv42.CreateNetworkIPv4WithPrefixLength)
|
||||
if string(jsonCreateNetworkIPv4WithPrefixLength) != "{}" { // empty struct
|
||||
dst.CreateNetworkIPv4WithPrefixLength = dstCreateNetworkIPv42.CreateNetworkIPv4WithPrefixLength
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
if match > 1 { // more than 1 match
|
||||
// reset to nil
|
||||
dst.CreateNetworkIPv4WithPrefix = nil
|
||||
dst.CreateNetworkIPv4WithPrefixLength = nil
|
||||
|
||||
return fmt.Errorf("data matches more than one schema in oneOf(CreateNetworkIPv4)")
|
||||
} else if match == 1 {
|
||||
return nil // exactly one match
|
||||
} else { // no match
|
||||
return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv4)")
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src CreateNetworkIPv4) MarshalJSON() ([]byte, error) {
|
||||
if src.CreateNetworkIPv4WithPrefix != nil {
|
||||
return json.Marshal(&src.CreateNetworkIPv4WithPrefix)
|
||||
}
|
||||
|
||||
if src.CreateNetworkIPv4WithPrefixLength != nil {
|
||||
return json.Marshal(&src.CreateNetworkIPv4WithPrefixLength)
|
||||
}
|
||||
|
||||
return []byte("{}"), nil // no data in oneOf schemas => empty JSON object
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *CreateNetworkIPv4) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.CreateNetworkIPv4WithPrefix != nil {
|
||||
return obj.CreateNetworkIPv4WithPrefix
|
||||
}
|
||||
|
||||
if obj.CreateNetworkIPv4WithPrefixLength != nil {
|
||||
return obj.CreateNetworkIPv4WithPrefixLength
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkIPv4 struct {
|
||||
value *CreateNetworkIPv4
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4) Get() *CreateNetworkIPv4 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4) Set(val *CreateNetworkIPv4) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkIPv4(val *CreateNetworkIPv4) *NullableCreateNetworkIPv4 {
|
||||
return &NullableCreateNetworkIPv4{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
43
pkg/iaasbeta/model_create_network_ipv4_test.go
Normal file
43
pkg/iaasbeta/model_create_network_ipv4_test.go
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isOneOf
|
||||
|
||||
func TestCreateNetworkIPv4_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := &CreateNetworkIPv4{}
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
marshalJson, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("failed marshalling CreateNetworkIPv4: %v", err)
|
||||
}
|
||||
if string(marshalJson) != string(tt.args.src) {
|
||||
t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
239
pkg/iaasbeta/model_create_network_ipv4_with_prefix.go
Normal file
239
pkg/iaasbeta/model_create_network_ipv4_with_prefix.go
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkIPv4WithPrefix type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkIPv4WithPrefix{}
|
||||
|
||||
/*
|
||||
types and functions for gateway
|
||||
*/
|
||||
|
||||
// isNullableString
|
||||
type CreateNetworkIPv4WithPrefixGetGatewayAttributeType = *NullableString
|
||||
|
||||
func getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetGatewayAttributeType) (ret CreateNetworkIPv4WithPrefixGetGatewayRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return nil, false
|
||||
}
|
||||
return arg.Get(), true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv4WithPrefixGetGatewayAttributeType(arg *CreateNetworkIPv4WithPrefixGetGatewayAttributeType, val CreateNetworkIPv4WithPrefixGetGatewayRetType) {
|
||||
if IsNil(*arg) {
|
||||
*arg = NewNullableString(val)
|
||||
} else {
|
||||
(*arg).Set(val)
|
||||
}
|
||||
}
|
||||
|
||||
type CreateNetworkIPv4WithPrefixGetGatewayArgType = *string
|
||||
type CreateNetworkIPv4WithPrefixGetGatewayRetType = *string
|
||||
|
||||
/*
|
||||
types and functions for nameservers
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNetworkIPv4WithPrefixGetNameserversAttributeType = *[]string
|
||||
type CreateNetworkIPv4WithPrefixGetNameserversArgType = []string
|
||||
type CreateNetworkIPv4WithPrefixGetNameserversRetType = []string
|
||||
|
||||
func getCreateNetworkIPv4WithPrefixGetNameserversAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetNameserversAttributeType) (ret CreateNetworkIPv4WithPrefixGetNameserversRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv4WithPrefixGetNameserversAttributeType(arg *CreateNetworkIPv4WithPrefixGetNameserversAttributeType, val CreateNetworkIPv4WithPrefixGetNameserversRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for prefix
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNetworkIPv4WithPrefixGetPrefixAttributeType = *string
|
||||
|
||||
func getCreateNetworkIPv4WithPrefixGetPrefixAttributeTypeOk(arg CreateNetworkIPv4WithPrefixGetPrefixAttributeType) (ret CreateNetworkIPv4WithPrefixGetPrefixRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv4WithPrefixGetPrefixAttributeType(arg *CreateNetworkIPv4WithPrefixGetPrefixAttributeType, val CreateNetworkIPv4WithPrefixGetPrefixRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNetworkIPv4WithPrefixGetPrefixArgType = string
|
||||
type CreateNetworkIPv4WithPrefixGetPrefixRetType = string
|
||||
|
||||
// CreateNetworkIPv4WithPrefix The create request for an IPv4 network with a specified prefix.
|
||||
type CreateNetworkIPv4WithPrefix struct {
|
||||
// The IPv4 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.
|
||||
Gateway CreateNetworkIPv4WithPrefixGetGatewayAttributeType `json:"gateway,omitempty"`
|
||||
// A list containing DNS Servers/Nameservers for IPv4.
|
||||
Nameservers CreateNetworkIPv4WithPrefixGetNameserversAttributeType `json:"nameservers,omitempty"`
|
||||
// IPv4 Classless Inter-Domain Routing (CIDR).
|
||||
// REQUIRED
|
||||
Prefix CreateNetworkIPv4WithPrefixGetPrefixAttributeType `json:"prefix" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateNetworkIPv4WithPrefix CreateNetworkIPv4WithPrefix
|
||||
|
||||
// NewCreateNetworkIPv4WithPrefix instantiates a new CreateNetworkIPv4WithPrefix 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 NewCreateNetworkIPv4WithPrefix(prefix CreateNetworkIPv4WithPrefixGetPrefixArgType) *CreateNetworkIPv4WithPrefix {
|
||||
this := CreateNetworkIPv4WithPrefix{}
|
||||
setCreateNetworkIPv4WithPrefixGetPrefixAttributeType(&this.Prefix, prefix)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkIPv4WithPrefixWithDefaults instantiates a new CreateNetworkIPv4WithPrefix 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 NewCreateNetworkIPv4WithPrefixWithDefaults() *CreateNetworkIPv4WithPrefix {
|
||||
this := CreateNetworkIPv4WithPrefix{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CreateNetworkIPv4WithPrefix) GetGateway() (res CreateNetworkIPv4WithPrefixGetGatewayRetType) {
|
||||
res, _ = o.GetGatewayOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CreateNetworkIPv4WithPrefix) GetGatewayOk() (ret CreateNetworkIPv4WithPrefixGetGatewayRetType, ok bool) {
|
||||
return getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(o.Gateway)
|
||||
}
|
||||
|
||||
// HasGateway returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefix) HasGateway() bool {
|
||||
_, ok := o.GetGatewayOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetGateway gets a reference to the given string and assigns it to the Gateway field.
|
||||
func (o *CreateNetworkIPv4WithPrefix) SetGateway(v CreateNetworkIPv4WithPrefixGetGatewayRetType) {
|
||||
setCreateNetworkIPv4WithPrefixGetGatewayAttributeType(&o.Gateway, v)
|
||||
}
|
||||
|
||||
// SetGatewayNil sets the value for Gateway to be an explicit nil
|
||||
func (o *CreateNetworkIPv4WithPrefix) SetGatewayNil() {
|
||||
o.Gateway = nil
|
||||
}
|
||||
|
||||
// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil
|
||||
func (o *CreateNetworkIPv4WithPrefix) UnsetGateway() {
|
||||
o.Gateway = nil
|
||||
}
|
||||
|
||||
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkIPv4WithPrefix) GetNameservers() (res CreateNetworkIPv4WithPrefixGetNameserversRetType) {
|
||||
res, _ = o.GetNameserversOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefix) GetNameserversOk() (ret CreateNetworkIPv4WithPrefixGetNameserversRetType, ok bool) {
|
||||
return getCreateNetworkIPv4WithPrefixGetNameserversAttributeTypeOk(o.Nameservers)
|
||||
}
|
||||
|
||||
// HasNameservers returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefix) HasNameservers() bool {
|
||||
_, ok := o.GetNameserversOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.
|
||||
func (o *CreateNetworkIPv4WithPrefix) SetNameservers(v CreateNetworkIPv4WithPrefixGetNameserversRetType) {
|
||||
setCreateNetworkIPv4WithPrefixGetNameserversAttributeType(&o.Nameservers, v)
|
||||
}
|
||||
|
||||
// GetPrefix returns the Prefix field value
|
||||
func (o *CreateNetworkIPv4WithPrefix) GetPrefix() (ret CreateNetworkIPv4WithPrefixGetPrefixRetType) {
|
||||
ret, _ = o.GetPrefixOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPrefixOk returns a tuple with the Prefix field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefix) GetPrefixOk() (ret CreateNetworkIPv4WithPrefixGetPrefixRetType, ok bool) {
|
||||
return getCreateNetworkIPv4WithPrefixGetPrefixAttributeTypeOk(o.Prefix)
|
||||
}
|
||||
|
||||
// SetPrefix sets field value
|
||||
func (o *CreateNetworkIPv4WithPrefix) SetPrefix(v CreateNetworkIPv4WithPrefixGetPrefixRetType) {
|
||||
setCreateNetworkIPv4WithPrefixGetPrefixAttributeType(&o.Prefix, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkIPv4WithPrefix) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkIPv4WithPrefixGetGatewayAttributeTypeOk(o.Gateway); ok {
|
||||
toSerialize["Gateway"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkIPv4WithPrefixGetNameserversAttributeTypeOk(o.Nameservers); ok {
|
||||
toSerialize["Nameservers"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkIPv4WithPrefixGetPrefixAttributeTypeOk(o.Prefix); ok {
|
||||
toSerialize["Prefix"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkIPv4WithPrefix struct {
|
||||
value *CreateNetworkIPv4WithPrefix
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4WithPrefix) Get() *CreateNetworkIPv4WithPrefix {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4WithPrefix) Set(val *CreateNetworkIPv4WithPrefix) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4WithPrefix) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4WithPrefix) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkIPv4WithPrefix(val *CreateNetworkIPv4WithPrefix) *NullableCreateNetworkIPv4WithPrefix {
|
||||
return &NullableCreateNetworkIPv4WithPrefix{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4WithPrefix) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4WithPrefix) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
173
pkg/iaasbeta/model_create_network_ipv4_with_prefix_length.go
Normal file
173
pkg/iaasbeta/model_create_network_ipv4_with_prefix_length.go
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkIPv4WithPrefixLength type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkIPv4WithPrefixLength{}
|
||||
|
||||
/*
|
||||
types and functions for nameservers
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType = *[]string
|
||||
type CreateNetworkIPv4WithPrefixLengthGetNameserversArgType = []string
|
||||
type CreateNetworkIPv4WithPrefixLengthGetNameserversRetType = []string
|
||||
|
||||
func getCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeTypeOk(arg CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType) (ret CreateNetworkIPv4WithPrefixLengthGetNameserversRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType(arg *CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType, val CreateNetworkIPv4WithPrefixLengthGetNameserversRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for prefixLength
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType = *int64
|
||||
type CreateNetworkIPv4WithPrefixLengthGetPrefixLengthArgType = int64
|
||||
type CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType = int64
|
||||
|
||||
func getCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeTypeOk(arg CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType) (ret CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType(arg *CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType, val CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateNetworkIPv4WithPrefixLength The create request for an IPv4 network with a wanted prefix length.
|
||||
type CreateNetworkIPv4WithPrefixLength struct {
|
||||
// A list containing DNS Servers/Nameservers for IPv4.
|
||||
Nameservers CreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType `json:"nameservers,omitempty"`
|
||||
// REQUIRED
|
||||
PrefixLength CreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType `json:"prefixLength" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateNetworkIPv4WithPrefixLength CreateNetworkIPv4WithPrefixLength
|
||||
|
||||
// NewCreateNetworkIPv4WithPrefixLength instantiates a new CreateNetworkIPv4WithPrefixLength 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 NewCreateNetworkIPv4WithPrefixLength(prefixLength CreateNetworkIPv4WithPrefixLengthGetPrefixLengthArgType) *CreateNetworkIPv4WithPrefixLength {
|
||||
this := CreateNetworkIPv4WithPrefixLength{}
|
||||
setCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType(&this.PrefixLength, prefixLength)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkIPv4WithPrefixLengthWithDefaults instantiates a new CreateNetworkIPv4WithPrefixLength 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 NewCreateNetworkIPv4WithPrefixLengthWithDefaults() *CreateNetworkIPv4WithPrefixLength {
|
||||
this := CreateNetworkIPv4WithPrefixLength{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) GetNameservers() (res CreateNetworkIPv4WithPrefixLengthGetNameserversRetType) {
|
||||
res, _ = o.GetNameserversOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) GetNameserversOk() (ret CreateNetworkIPv4WithPrefixLengthGetNameserversRetType, ok bool) {
|
||||
return getCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers)
|
||||
}
|
||||
|
||||
// HasNameservers returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) HasNameservers() bool {
|
||||
_, ok := o.GetNameserversOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) SetNameservers(v CreateNetworkIPv4WithPrefixLengthGetNameserversRetType) {
|
||||
setCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeType(&o.Nameservers, v)
|
||||
}
|
||||
|
||||
// GetPrefixLength returns the PrefixLength field value
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) GetPrefixLength() (ret CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType) {
|
||||
ret, _ = o.GetPrefixLengthOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPrefixLengthOk returns a tuple with the PrefixLength field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) GetPrefixLengthOk() (ret CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType, ok bool) {
|
||||
return getCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength)
|
||||
}
|
||||
|
||||
// SetPrefixLength sets field value
|
||||
func (o *CreateNetworkIPv4WithPrefixLength) SetPrefixLength(v CreateNetworkIPv4WithPrefixLengthGetPrefixLengthRetType) {
|
||||
setCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeType(&o.PrefixLength, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkIPv4WithPrefixLength) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkIPv4WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers); ok {
|
||||
toSerialize["Nameservers"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkIPv4WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength); ok {
|
||||
toSerialize["PrefixLength"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkIPv4WithPrefixLength struct {
|
||||
value *CreateNetworkIPv4WithPrefixLength
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4WithPrefixLength) Get() *CreateNetworkIPv4WithPrefixLength {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4WithPrefixLength) Set(val *CreateNetworkIPv4WithPrefixLength) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4WithPrefixLength) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4WithPrefixLength) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkIPv4WithPrefixLength(val *CreateNetworkIPv4WithPrefixLength) *NullableCreateNetworkIPv4WithPrefixLength {
|
||||
return &NullableCreateNetworkIPv4WithPrefixLength{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv4WithPrefixLength) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv4WithPrefixLength) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
11
pkg/iaasbeta/model_create_network_ipv4_with_prefix_test.go
Normal file
11
pkg/iaasbeta/model_create_network_ipv4_with_prefix_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
144
pkg/iaasbeta/model_create_network_ipv6.go
Normal file
144
pkg/iaasbeta/model_create_network_ipv6.go
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CreateNetworkIPv6 - The create request for an IPv6 network.
|
||||
type CreateNetworkIPv6 struct {
|
||||
CreateNetworkIPv6WithPrefix *CreateNetworkIPv6WithPrefix
|
||||
CreateNetworkIPv6WithPrefixLength *CreateNetworkIPv6WithPrefixLength
|
||||
}
|
||||
|
||||
// CreateNetworkIPv6WithPrefixAsCreateNetworkIPv6 is a convenience function that returns CreateNetworkIPv6WithPrefix wrapped in CreateNetworkIPv6
|
||||
func CreateNetworkIPv6WithPrefixAsCreateNetworkIPv6(v *CreateNetworkIPv6WithPrefix) CreateNetworkIPv6 {
|
||||
return CreateNetworkIPv6{
|
||||
CreateNetworkIPv6WithPrefix: v,
|
||||
}
|
||||
}
|
||||
|
||||
// CreateNetworkIPv6WithPrefixLengthAsCreateNetworkIPv6 is a convenience function that returns CreateNetworkIPv6WithPrefixLength wrapped in CreateNetworkIPv6
|
||||
func CreateNetworkIPv6WithPrefixLengthAsCreateNetworkIPv6(v *CreateNetworkIPv6WithPrefixLength) CreateNetworkIPv6 {
|
||||
return CreateNetworkIPv6{
|
||||
CreateNetworkIPv6WithPrefixLength: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *CreateNetworkIPv6) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
match := 0
|
||||
// Workaround until upstream issue is fixed:
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/21751
|
||||
// Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
|
||||
// try to unmarshal data into CreateNetworkIPv6WithPrefix
|
||||
dstCreateNetworkIPv61 := &CreateNetworkIPv6{}
|
||||
err = json.Unmarshal(data, &dstCreateNetworkIPv61.CreateNetworkIPv6WithPrefix)
|
||||
if err == nil {
|
||||
jsonCreateNetworkIPv6WithPrefix, _ := json.Marshal(&dstCreateNetworkIPv61.CreateNetworkIPv6WithPrefix)
|
||||
if string(jsonCreateNetworkIPv6WithPrefix) != "{}" { // empty struct
|
||||
dst.CreateNetworkIPv6WithPrefix = dstCreateNetworkIPv61.CreateNetworkIPv6WithPrefix
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
// try to unmarshal data into CreateNetworkIPv6WithPrefixLength
|
||||
dstCreateNetworkIPv62 := &CreateNetworkIPv6{}
|
||||
err = json.Unmarshal(data, &dstCreateNetworkIPv62.CreateNetworkIPv6WithPrefixLength)
|
||||
if err == nil {
|
||||
jsonCreateNetworkIPv6WithPrefixLength, _ := json.Marshal(&dstCreateNetworkIPv62.CreateNetworkIPv6WithPrefixLength)
|
||||
if string(jsonCreateNetworkIPv6WithPrefixLength) != "{}" { // empty struct
|
||||
dst.CreateNetworkIPv6WithPrefixLength = dstCreateNetworkIPv62.CreateNetworkIPv6WithPrefixLength
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
if match > 1 { // more than 1 match
|
||||
// reset to nil
|
||||
dst.CreateNetworkIPv6WithPrefix = nil
|
||||
dst.CreateNetworkIPv6WithPrefixLength = nil
|
||||
|
||||
return fmt.Errorf("data matches more than one schema in oneOf(CreateNetworkIPv6)")
|
||||
} else if match == 1 {
|
||||
return nil // exactly one match
|
||||
} else { // no match
|
||||
return fmt.Errorf("data failed to match schemas in oneOf(CreateNetworkIPv6)")
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src CreateNetworkIPv6) MarshalJSON() ([]byte, error) {
|
||||
if src.CreateNetworkIPv6WithPrefix != nil {
|
||||
return json.Marshal(&src.CreateNetworkIPv6WithPrefix)
|
||||
}
|
||||
|
||||
if src.CreateNetworkIPv6WithPrefixLength != nil {
|
||||
return json.Marshal(&src.CreateNetworkIPv6WithPrefixLength)
|
||||
}
|
||||
|
||||
return []byte("{}"), nil // no data in oneOf schemas => empty JSON object
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *CreateNetworkIPv6) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.CreateNetworkIPv6WithPrefix != nil {
|
||||
return obj.CreateNetworkIPv6WithPrefix
|
||||
}
|
||||
|
||||
if obj.CreateNetworkIPv6WithPrefixLength != nil {
|
||||
return obj.CreateNetworkIPv6WithPrefixLength
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkIPv6 struct {
|
||||
value *CreateNetworkIPv6
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6) Get() *CreateNetworkIPv6 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6) Set(val *CreateNetworkIPv6) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkIPv6(val *CreateNetworkIPv6) *NullableCreateNetworkIPv6 {
|
||||
return &NullableCreateNetworkIPv6{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
43
pkg/iaasbeta/model_create_network_ipv6_test.go
Normal file
43
pkg/iaasbeta/model_create_network_ipv6_test.go
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isOneOf
|
||||
|
||||
func TestCreateNetworkIPv6_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := &CreateNetworkIPv6{}
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
marshalJson, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("failed marshalling CreateNetworkIPv6: %v", err)
|
||||
}
|
||||
if string(marshalJson) != string(tt.args.src) {
|
||||
t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
239
pkg/iaasbeta/model_create_network_ipv6_with_prefix.go
Normal file
239
pkg/iaasbeta/model_create_network_ipv6_with_prefix.go
Normal file
|
|
@ -0,0 +1,239 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkIPv6WithPrefix type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkIPv6WithPrefix{}
|
||||
|
||||
/*
|
||||
types and functions for gateway
|
||||
*/
|
||||
|
||||
// isNullableString
|
||||
type CreateNetworkIPv6WithPrefixGetGatewayAttributeType = *NullableString
|
||||
|
||||
func getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetGatewayAttributeType) (ret CreateNetworkIPv6WithPrefixGetGatewayRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return nil, false
|
||||
}
|
||||
return arg.Get(), true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv6WithPrefixGetGatewayAttributeType(arg *CreateNetworkIPv6WithPrefixGetGatewayAttributeType, val CreateNetworkIPv6WithPrefixGetGatewayRetType) {
|
||||
if IsNil(*arg) {
|
||||
*arg = NewNullableString(val)
|
||||
} else {
|
||||
(*arg).Set(val)
|
||||
}
|
||||
}
|
||||
|
||||
type CreateNetworkIPv6WithPrefixGetGatewayArgType = *string
|
||||
type CreateNetworkIPv6WithPrefixGetGatewayRetType = *string
|
||||
|
||||
/*
|
||||
types and functions for nameservers
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNetworkIPv6WithPrefixGetNameserversAttributeType = *[]string
|
||||
type CreateNetworkIPv6WithPrefixGetNameserversArgType = []string
|
||||
type CreateNetworkIPv6WithPrefixGetNameserversRetType = []string
|
||||
|
||||
func getCreateNetworkIPv6WithPrefixGetNameserversAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetNameserversAttributeType) (ret CreateNetworkIPv6WithPrefixGetNameserversRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv6WithPrefixGetNameserversAttributeType(arg *CreateNetworkIPv6WithPrefixGetNameserversAttributeType, val CreateNetworkIPv6WithPrefixGetNameserversRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for prefix
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNetworkIPv6WithPrefixGetPrefixAttributeType = *string
|
||||
|
||||
func getCreateNetworkIPv6WithPrefixGetPrefixAttributeTypeOk(arg CreateNetworkIPv6WithPrefixGetPrefixAttributeType) (ret CreateNetworkIPv6WithPrefixGetPrefixRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv6WithPrefixGetPrefixAttributeType(arg *CreateNetworkIPv6WithPrefixGetPrefixAttributeType, val CreateNetworkIPv6WithPrefixGetPrefixRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNetworkIPv6WithPrefixGetPrefixArgType = string
|
||||
type CreateNetworkIPv6WithPrefixGetPrefixRetType = string
|
||||
|
||||
// CreateNetworkIPv6WithPrefix The create request for an IPv6 network with a specified prefix.
|
||||
type CreateNetworkIPv6WithPrefix struct {
|
||||
// The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.
|
||||
Gateway CreateNetworkIPv6WithPrefixGetGatewayAttributeType `json:"gateway,omitempty"`
|
||||
// A list containing DNS Servers/Nameservers for IPv6.
|
||||
Nameservers CreateNetworkIPv6WithPrefixGetNameserversAttributeType `json:"nameservers,omitempty"`
|
||||
// Classless Inter-Domain Routing (CIDR) for IPv6.
|
||||
// REQUIRED
|
||||
Prefix CreateNetworkIPv6WithPrefixGetPrefixAttributeType `json:"prefix" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateNetworkIPv6WithPrefix CreateNetworkIPv6WithPrefix
|
||||
|
||||
// NewCreateNetworkIPv6WithPrefix instantiates a new CreateNetworkIPv6WithPrefix 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 NewCreateNetworkIPv6WithPrefix(prefix CreateNetworkIPv6WithPrefixGetPrefixArgType) *CreateNetworkIPv6WithPrefix {
|
||||
this := CreateNetworkIPv6WithPrefix{}
|
||||
setCreateNetworkIPv6WithPrefixGetPrefixAttributeType(&this.Prefix, prefix)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkIPv6WithPrefixWithDefaults instantiates a new CreateNetworkIPv6WithPrefix 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 NewCreateNetworkIPv6WithPrefixWithDefaults() *CreateNetworkIPv6WithPrefix {
|
||||
this := CreateNetworkIPv6WithPrefix{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CreateNetworkIPv6WithPrefix) GetGateway() (res CreateNetworkIPv6WithPrefixGetGatewayRetType) {
|
||||
res, _ = o.GetGatewayOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CreateNetworkIPv6WithPrefix) GetGatewayOk() (ret CreateNetworkIPv6WithPrefixGetGatewayRetType, ok bool) {
|
||||
return getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(o.Gateway)
|
||||
}
|
||||
|
||||
// HasGateway returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefix) HasGateway() bool {
|
||||
_, ok := o.GetGatewayOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetGateway gets a reference to the given string and assigns it to the Gateway field.
|
||||
func (o *CreateNetworkIPv6WithPrefix) SetGateway(v CreateNetworkIPv6WithPrefixGetGatewayRetType) {
|
||||
setCreateNetworkIPv6WithPrefixGetGatewayAttributeType(&o.Gateway, v)
|
||||
}
|
||||
|
||||
// SetGatewayNil sets the value for Gateway to be an explicit nil
|
||||
func (o *CreateNetworkIPv6WithPrefix) SetGatewayNil() {
|
||||
o.Gateway = nil
|
||||
}
|
||||
|
||||
// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil
|
||||
func (o *CreateNetworkIPv6WithPrefix) UnsetGateway() {
|
||||
o.Gateway = nil
|
||||
}
|
||||
|
||||
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkIPv6WithPrefix) GetNameservers() (res CreateNetworkIPv6WithPrefixGetNameserversRetType) {
|
||||
res, _ = o.GetNameserversOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefix) GetNameserversOk() (ret CreateNetworkIPv6WithPrefixGetNameserversRetType, ok bool) {
|
||||
return getCreateNetworkIPv6WithPrefixGetNameserversAttributeTypeOk(o.Nameservers)
|
||||
}
|
||||
|
||||
// HasNameservers returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefix) HasNameservers() bool {
|
||||
_, ok := o.GetNameserversOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.
|
||||
func (o *CreateNetworkIPv6WithPrefix) SetNameservers(v CreateNetworkIPv6WithPrefixGetNameserversRetType) {
|
||||
setCreateNetworkIPv6WithPrefixGetNameserversAttributeType(&o.Nameservers, v)
|
||||
}
|
||||
|
||||
// GetPrefix returns the Prefix field value
|
||||
func (o *CreateNetworkIPv6WithPrefix) GetPrefix() (ret CreateNetworkIPv6WithPrefixGetPrefixRetType) {
|
||||
ret, _ = o.GetPrefixOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPrefixOk returns a tuple with the Prefix field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefix) GetPrefixOk() (ret CreateNetworkIPv6WithPrefixGetPrefixRetType, ok bool) {
|
||||
return getCreateNetworkIPv6WithPrefixGetPrefixAttributeTypeOk(o.Prefix)
|
||||
}
|
||||
|
||||
// SetPrefix sets field value
|
||||
func (o *CreateNetworkIPv6WithPrefix) SetPrefix(v CreateNetworkIPv6WithPrefixGetPrefixRetType) {
|
||||
setCreateNetworkIPv6WithPrefixGetPrefixAttributeType(&o.Prefix, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkIPv6WithPrefix) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkIPv6WithPrefixGetGatewayAttributeTypeOk(o.Gateway); ok {
|
||||
toSerialize["Gateway"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkIPv6WithPrefixGetNameserversAttributeTypeOk(o.Nameservers); ok {
|
||||
toSerialize["Nameservers"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkIPv6WithPrefixGetPrefixAttributeTypeOk(o.Prefix); ok {
|
||||
toSerialize["Prefix"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkIPv6WithPrefix struct {
|
||||
value *CreateNetworkIPv6WithPrefix
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6WithPrefix) Get() *CreateNetworkIPv6WithPrefix {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6WithPrefix) Set(val *CreateNetworkIPv6WithPrefix) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6WithPrefix) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6WithPrefix) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkIPv6WithPrefix(val *CreateNetworkIPv6WithPrefix) *NullableCreateNetworkIPv6WithPrefix {
|
||||
return &NullableCreateNetworkIPv6WithPrefix{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6WithPrefix) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6WithPrefix) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
173
pkg/iaasbeta/model_create_network_ipv6_with_prefix_length.go
Normal file
173
pkg/iaasbeta/model_create_network_ipv6_with_prefix_length.go
Normal file
|
|
@ -0,0 +1,173 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkIPv6WithPrefixLength type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkIPv6WithPrefixLength{}
|
||||
|
||||
/*
|
||||
types and functions for nameservers
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType = *[]string
|
||||
type CreateNetworkIPv6WithPrefixLengthGetNameserversArgType = []string
|
||||
type CreateNetworkIPv6WithPrefixLengthGetNameserversRetType = []string
|
||||
|
||||
func getCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeTypeOk(arg CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType) (ret CreateNetworkIPv6WithPrefixLengthGetNameserversRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType(arg *CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType, val CreateNetworkIPv6WithPrefixLengthGetNameserversRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for prefixLength
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType = *int64
|
||||
type CreateNetworkIPv6WithPrefixLengthGetPrefixLengthArgType = int64
|
||||
type CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType = int64
|
||||
|
||||
func getCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeTypeOk(arg CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType) (ret CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType(arg *CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType, val CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateNetworkIPv6WithPrefixLength The create request for an IPv6 network with a wanted prefix length.
|
||||
type CreateNetworkIPv6WithPrefixLength struct {
|
||||
// A list containing DNS Servers/Nameservers for IPv6.
|
||||
Nameservers CreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType `json:"nameservers,omitempty"`
|
||||
// REQUIRED
|
||||
PrefixLength CreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType `json:"prefixLength" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateNetworkIPv6WithPrefixLength CreateNetworkIPv6WithPrefixLength
|
||||
|
||||
// NewCreateNetworkIPv6WithPrefixLength instantiates a new CreateNetworkIPv6WithPrefixLength 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 NewCreateNetworkIPv6WithPrefixLength(prefixLength CreateNetworkIPv6WithPrefixLengthGetPrefixLengthArgType) *CreateNetworkIPv6WithPrefixLength {
|
||||
this := CreateNetworkIPv6WithPrefixLength{}
|
||||
setCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType(&this.PrefixLength, prefixLength)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkIPv6WithPrefixLengthWithDefaults instantiates a new CreateNetworkIPv6WithPrefixLength 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 NewCreateNetworkIPv6WithPrefixLengthWithDefaults() *CreateNetworkIPv6WithPrefixLength {
|
||||
this := CreateNetworkIPv6WithPrefixLength{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) GetNameservers() (res CreateNetworkIPv6WithPrefixLengthGetNameserversRetType) {
|
||||
res, _ = o.GetNameserversOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) GetNameserversOk() (ret CreateNetworkIPv6WithPrefixLengthGetNameserversRetType, ok bool) {
|
||||
return getCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers)
|
||||
}
|
||||
|
||||
// HasNameservers returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) HasNameservers() bool {
|
||||
_, ok := o.GetNameserversOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) SetNameservers(v CreateNetworkIPv6WithPrefixLengthGetNameserversRetType) {
|
||||
setCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeType(&o.Nameservers, v)
|
||||
}
|
||||
|
||||
// GetPrefixLength returns the PrefixLength field value
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) GetPrefixLength() (ret CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType) {
|
||||
ret, _ = o.GetPrefixLengthOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetPrefixLengthOk returns a tuple with the PrefixLength field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) GetPrefixLengthOk() (ret CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType, ok bool) {
|
||||
return getCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength)
|
||||
}
|
||||
|
||||
// SetPrefixLength sets field value
|
||||
func (o *CreateNetworkIPv6WithPrefixLength) SetPrefixLength(v CreateNetworkIPv6WithPrefixLengthGetPrefixLengthRetType) {
|
||||
setCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeType(&o.PrefixLength, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkIPv6WithPrefixLength) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkIPv6WithPrefixLengthGetNameserversAttributeTypeOk(o.Nameservers); ok {
|
||||
toSerialize["Nameservers"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkIPv6WithPrefixLengthGetPrefixLengthAttributeTypeOk(o.PrefixLength); ok {
|
||||
toSerialize["PrefixLength"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkIPv6WithPrefixLength struct {
|
||||
value *CreateNetworkIPv6WithPrefixLength
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6WithPrefixLength) Get() *CreateNetworkIPv6WithPrefixLength {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6WithPrefixLength) Set(val *CreateNetworkIPv6WithPrefixLength) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6WithPrefixLength) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6WithPrefixLength) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkIPv6WithPrefixLength(val *CreateNetworkIPv6WithPrefixLength) *NullableCreateNetworkIPv6WithPrefixLength {
|
||||
return &NullableCreateNetworkIPv6WithPrefixLength{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkIPv6WithPrefixLength) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkIPv6WithPrefixLength) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
11
pkg/iaasbeta/model_create_network_ipv6_with_prefix_test.go
Normal file
11
pkg/iaasbeta/model_create_network_ipv6_with_prefix_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
416
pkg/iaasbeta/model_create_network_payload.go
Normal file
416
pkg/iaasbeta/model_create_network_payload.go
Normal file
|
|
@ -0,0 +1,416 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNetworkPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNetworkPayload{}
|
||||
|
||||
/*
|
||||
types and functions for dhcp
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateNetworkPayloadgetDhcpAttributeType = *bool
|
||||
type CreateNetworkPayloadgetDhcpArgType = bool
|
||||
type CreateNetworkPayloadgetDhcpRetType = bool
|
||||
|
||||
func getCreateNetworkPayloadgetDhcpAttributeTypeOk(arg CreateNetworkPayloadgetDhcpAttributeType) (ret CreateNetworkPayloadgetDhcpRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadgetDhcpAttributeType(arg *CreateNetworkPayloadgetDhcpAttributeType, val CreateNetworkPayloadgetDhcpRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for ipv4
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateNetworkPayloadGetIpv4AttributeType = *CreateNetworkIPv4
|
||||
type CreateNetworkPayloadGetIpv4ArgType = CreateNetworkIPv4
|
||||
type CreateNetworkPayloadGetIpv4RetType = CreateNetworkIPv4
|
||||
|
||||
func getCreateNetworkPayloadGetIpv4AttributeTypeOk(arg CreateNetworkPayloadGetIpv4AttributeType) (ret CreateNetworkPayloadGetIpv4RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadGetIpv4AttributeType(arg *CreateNetworkPayloadGetIpv4AttributeType, val CreateNetworkPayloadGetIpv4RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for ipv6
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateNetworkPayloadGetIpv6AttributeType = *CreateNetworkIPv6
|
||||
type CreateNetworkPayloadGetIpv6ArgType = CreateNetworkIPv6
|
||||
type CreateNetworkPayloadGetIpv6RetType = CreateNetworkIPv6
|
||||
|
||||
func getCreateNetworkPayloadGetIpv6AttributeTypeOk(arg CreateNetworkPayloadGetIpv6AttributeType) (ret CreateNetworkPayloadGetIpv6RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadGetIpv6AttributeType(arg *CreateNetworkPayloadGetIpv6AttributeType, val CreateNetworkPayloadGetIpv6RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateNetworkPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateNetworkPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateNetworkPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateNetworkPayloadGetLabelsAttributeTypeOk(arg CreateNetworkPayloadGetLabelsAttributeType) (ret CreateNetworkPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadGetLabelsAttributeType(arg *CreateNetworkPayloadGetLabelsAttributeType, val CreateNetworkPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNetworkPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateNetworkPayloadGetNameAttributeTypeOk(arg CreateNetworkPayloadGetNameAttributeType) (ret CreateNetworkPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadGetNameAttributeType(arg *CreateNetworkPayloadGetNameAttributeType, val CreateNetworkPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNetworkPayloadGetNameArgType = string
|
||||
type CreateNetworkPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for routed
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateNetworkPayloadgetRoutedAttributeType = *bool
|
||||
type CreateNetworkPayloadgetRoutedArgType = bool
|
||||
type CreateNetworkPayloadgetRoutedRetType = bool
|
||||
|
||||
func getCreateNetworkPayloadgetRoutedAttributeTypeOk(arg CreateNetworkPayloadgetRoutedAttributeType) (ret CreateNetworkPayloadgetRoutedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadgetRoutedAttributeType(arg *CreateNetworkPayloadgetRoutedAttributeType, val CreateNetworkPayloadgetRoutedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for routingTableId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNetworkPayloadGetRoutingTableIdAttributeType = *string
|
||||
|
||||
func getCreateNetworkPayloadGetRoutingTableIdAttributeTypeOk(arg CreateNetworkPayloadGetRoutingTableIdAttributeType) (ret CreateNetworkPayloadGetRoutingTableIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNetworkPayloadGetRoutingTableIdAttributeType(arg *CreateNetworkPayloadGetRoutingTableIdAttributeType, val CreateNetworkPayloadGetRoutingTableIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNetworkPayloadGetRoutingTableIdArgType = string
|
||||
type CreateNetworkPayloadGetRoutingTableIdRetType = string
|
||||
|
||||
// CreateNetworkPayload Object that represents the request body for a network create.
|
||||
type CreateNetworkPayload struct {
|
||||
// Enable or disable DHCP for a network.
|
||||
Dhcp CreateNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"`
|
||||
Ipv4 CreateNetworkPayloadGetIpv4AttributeType `json:"ipv4,omitempty"`
|
||||
Ipv6 CreateNetworkPayloadGetIpv6AttributeType `json:"ipv6,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name CreateNetworkPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// Shows if the network is routed and therefore accessible from other networks.
|
||||
Routed CreateNetworkPayloadgetRoutedAttributeType `json:"routed,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
RoutingTableId CreateNetworkPayloadGetRoutingTableIdAttributeType `json:"routingTableId,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateNetworkPayload CreateNetworkPayload
|
||||
|
||||
// NewCreateNetworkPayload instantiates a new CreateNetworkPayload 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 NewCreateNetworkPayload(name CreateNetworkPayloadGetNameArgType) *CreateNetworkPayload {
|
||||
this := CreateNetworkPayload{}
|
||||
setCreateNetworkPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNetworkPayloadWithDefaults instantiates a new CreateNetworkPayload 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 NewCreateNetworkPayloadWithDefaults() *CreateNetworkPayload {
|
||||
this := CreateNetworkPayload{}
|
||||
var dhcp bool = true
|
||||
this.Dhcp = &dhcp
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDhcp returns the Dhcp field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkPayload) GetDhcp() (res CreateNetworkPayloadgetDhcpRetType) {
|
||||
res, _ = o.GetDhcpOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkPayload) GetDhcpOk() (ret CreateNetworkPayloadgetDhcpRetType, ok bool) {
|
||||
return getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp)
|
||||
}
|
||||
|
||||
// HasDhcp returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkPayload) HasDhcp() bool {
|
||||
_, ok := o.GetDhcpOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field.
|
||||
func (o *CreateNetworkPayload) SetDhcp(v CreateNetworkPayloadgetDhcpRetType) {
|
||||
setCreateNetworkPayloadgetDhcpAttributeType(&o.Dhcp, v)
|
||||
}
|
||||
|
||||
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkPayload) GetIpv4() (res CreateNetworkPayloadGetIpv4RetType) {
|
||||
res, _ = o.GetIpv4Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkPayload) GetIpv4Ok() (ret CreateNetworkPayloadGetIpv4RetType, ok bool) {
|
||||
return getCreateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4)
|
||||
}
|
||||
|
||||
// HasIpv4 returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkPayload) HasIpv4() bool {
|
||||
_, ok := o.GetIpv4Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv4 gets a reference to the given CreateNetworkIPv4 and assigns it to the Ipv4 field.
|
||||
func (o *CreateNetworkPayload) SetIpv4(v CreateNetworkPayloadGetIpv4RetType) {
|
||||
setCreateNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v)
|
||||
}
|
||||
|
||||
// GetIpv6 returns the Ipv6 field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkPayload) GetIpv6() (res CreateNetworkPayloadGetIpv6RetType) {
|
||||
res, _ = o.GetIpv6Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkPayload) GetIpv6Ok() (ret CreateNetworkPayloadGetIpv6RetType, ok bool) {
|
||||
return getCreateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6)
|
||||
}
|
||||
|
||||
// HasIpv6 returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkPayload) HasIpv6() bool {
|
||||
_, ok := o.GetIpv6Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv6 gets a reference to the given CreateNetworkIPv6 and assigns it to the Ipv6 field.
|
||||
func (o *CreateNetworkPayload) SetIpv6(v CreateNetworkPayloadGetIpv6RetType) {
|
||||
setCreateNetworkPayloadGetIpv6AttributeType(&o.Ipv6, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkPayload) GetLabels() (res CreateNetworkPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkPayload) GetLabelsOk() (ret CreateNetworkPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateNetworkPayload) SetLabels(v CreateNetworkPayloadGetLabelsRetType) {
|
||||
setCreateNetworkPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateNetworkPayload) GetName() (ret CreateNetworkPayloadGetNameRetType) {
|
||||
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 *CreateNetworkPayload) GetNameOk() (ret CreateNetworkPayloadGetNameRetType, ok bool) {
|
||||
return getCreateNetworkPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateNetworkPayload) SetName(v CreateNetworkPayloadGetNameRetType) {
|
||||
setCreateNetworkPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetRouted returns the Routed field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkPayload) GetRouted() (res CreateNetworkPayloadgetRoutedRetType) {
|
||||
res, _ = o.GetRoutedOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRoutedOk returns a tuple with the Routed field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkPayload) GetRoutedOk() (ret CreateNetworkPayloadgetRoutedRetType, ok bool) {
|
||||
return getCreateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed)
|
||||
}
|
||||
|
||||
// HasRouted returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkPayload) HasRouted() bool {
|
||||
_, ok := o.GetRoutedOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRouted gets a reference to the given bool and assigns it to the Routed field.
|
||||
func (o *CreateNetworkPayload) SetRouted(v CreateNetworkPayloadgetRoutedRetType) {
|
||||
setCreateNetworkPayloadgetRoutedAttributeType(&o.Routed, v)
|
||||
}
|
||||
|
||||
// GetRoutingTableId returns the RoutingTableId field value if set, zero value otherwise.
|
||||
func (o *CreateNetworkPayload) GetRoutingTableId() (res CreateNetworkPayloadGetRoutingTableIdRetType) {
|
||||
res, _ = o.GetRoutingTableIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRoutingTableIdOk returns a tuple with the RoutingTableId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNetworkPayload) GetRoutingTableIdOk() (ret CreateNetworkPayloadGetRoutingTableIdRetType, ok bool) {
|
||||
return getCreateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId)
|
||||
}
|
||||
|
||||
// HasRoutingTableId returns a boolean if a field has been set.
|
||||
func (o *CreateNetworkPayload) HasRoutingTableId() bool {
|
||||
_, ok := o.GetRoutingTableIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRoutingTableId gets a reference to the given string and assigns it to the RoutingTableId field.
|
||||
func (o *CreateNetworkPayload) SetRoutingTableId(v CreateNetworkPayloadGetRoutingTableIdRetType) {
|
||||
setCreateNetworkPayloadGetRoutingTableIdAttributeType(&o.RoutingTableId, v)
|
||||
}
|
||||
|
||||
func (o CreateNetworkPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok {
|
||||
toSerialize["Dhcp"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
||||
toSerialize["Ipv4"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok {
|
||||
toSerialize["Ipv6"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkPayloadgetRoutedAttributeTypeOk(o.Routed); ok {
|
||||
toSerialize["Routed"] = val
|
||||
}
|
||||
if val, ok := getCreateNetworkPayloadGetRoutingTableIdAttributeTypeOk(o.RoutingTableId); ok {
|
||||
toSerialize["RoutingTableId"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNetworkPayload struct {
|
||||
value *CreateNetworkPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkPayload) Get() *CreateNetworkPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkPayload) Set(val *CreateNetworkPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNetworkPayload(val *CreateNetworkPayload) *NullableCreateNetworkPayload {
|
||||
return &NullableCreateNetworkPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNetworkPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNetworkPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_network_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_network_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
764
pkg/iaasbeta/model_create_nic_payload.go
Normal file
764
pkg/iaasbeta/model_create_nic_payload.go
Normal file
|
|
@ -0,0 +1,764 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateNicPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateNicPayload{}
|
||||
|
||||
/*
|
||||
types and functions for allowedAddresses
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNicPayloadGetAllowedAddressesAttributeType = *[]AllowedAddressesInner
|
||||
type CreateNicPayloadGetAllowedAddressesArgType = []AllowedAddressesInner
|
||||
type CreateNicPayloadGetAllowedAddressesRetType = []AllowedAddressesInner
|
||||
|
||||
func getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(arg CreateNicPayloadGetAllowedAddressesAttributeType) (ret CreateNicPayloadGetAllowedAddressesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetAllowedAddressesAttributeType(arg *CreateNicPayloadGetAllowedAddressesAttributeType, val CreateNicPayloadGetAllowedAddressesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetDescriptionAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetDescriptionAttributeTypeOk(arg CreateNicPayloadGetDescriptionAttributeType) (ret CreateNicPayloadGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetDescriptionAttributeType(arg *CreateNicPayloadGetDescriptionAttributeType, val CreateNicPayloadGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetDescriptionArgType = string
|
||||
type CreateNicPayloadGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for device
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetDeviceAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetDeviceAttributeTypeOk(arg CreateNicPayloadGetDeviceAttributeType) (ret CreateNicPayloadGetDeviceRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetDeviceAttributeType(arg *CreateNicPayloadGetDeviceAttributeType, val CreateNicPayloadGetDeviceRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetDeviceArgType = string
|
||||
type CreateNicPayloadGetDeviceRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetIdAttributeTypeOk(arg CreateNicPayloadGetIdAttributeType) (ret CreateNicPayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetIdAttributeType(arg *CreateNicPayloadGetIdAttributeType, val CreateNicPayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetIdArgType = string
|
||||
type CreateNicPayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for ipv4
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetIpv4AttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetIpv4AttributeTypeOk(arg CreateNicPayloadGetIpv4AttributeType) (ret CreateNicPayloadGetIpv4RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetIpv4AttributeType(arg *CreateNicPayloadGetIpv4AttributeType, val CreateNicPayloadGetIpv4RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetIpv4ArgType = string
|
||||
type CreateNicPayloadGetIpv4RetType = string
|
||||
|
||||
/*
|
||||
types and functions for ipv6
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetIpv6AttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetIpv6AttributeTypeOk(arg CreateNicPayloadGetIpv6AttributeType) (ret CreateNicPayloadGetIpv6RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetIpv6AttributeType(arg *CreateNicPayloadGetIpv6AttributeType, val CreateNicPayloadGetIpv6RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetIpv6ArgType = string
|
||||
type CreateNicPayloadGetIpv6RetType = string
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateNicPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateNicPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateNicPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateNicPayloadGetLabelsAttributeTypeOk(arg CreateNicPayloadGetLabelsAttributeType) (ret CreateNicPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetLabelsAttributeType(arg *CreateNicPayloadGetLabelsAttributeType, val CreateNicPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for mac
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetMacAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetMacAttributeTypeOk(arg CreateNicPayloadGetMacAttributeType) (ret CreateNicPayloadGetMacRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetMacAttributeType(arg *CreateNicPayloadGetMacAttributeType, val CreateNicPayloadGetMacRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetMacArgType = string
|
||||
type CreateNicPayloadGetMacRetType = string
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetNameAttributeTypeOk(arg CreateNicPayloadGetNameAttributeType) (ret CreateNicPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetNameAttributeType(arg *CreateNicPayloadGetNameAttributeType, val CreateNicPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetNameArgType = string
|
||||
type CreateNicPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for networkId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetNetworkIdAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetNetworkIdAttributeTypeOk(arg CreateNicPayloadGetNetworkIdAttributeType) (ret CreateNicPayloadGetNetworkIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetNetworkIdAttributeType(arg *CreateNicPayloadGetNetworkIdAttributeType, val CreateNicPayloadGetNetworkIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetNetworkIdArgType = string
|
||||
type CreateNicPayloadGetNetworkIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for nicSecurity
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateNicPayloadgetNicSecurityAttributeType = *bool
|
||||
type CreateNicPayloadgetNicSecurityArgType = bool
|
||||
type CreateNicPayloadgetNicSecurityRetType = bool
|
||||
|
||||
func getCreateNicPayloadgetNicSecurityAttributeTypeOk(arg CreateNicPayloadgetNicSecurityAttributeType) (ret CreateNicPayloadgetNicSecurityRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadgetNicSecurityAttributeType(arg *CreateNicPayloadgetNicSecurityAttributeType, val CreateNicPayloadgetNicSecurityRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for securityGroups
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateNicPayloadGetSecurityGroupsAttributeType = *[]string
|
||||
type CreateNicPayloadGetSecurityGroupsArgType = []string
|
||||
type CreateNicPayloadGetSecurityGroupsRetType = []string
|
||||
|
||||
func getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(arg CreateNicPayloadGetSecurityGroupsAttributeType) (ret CreateNicPayloadGetSecurityGroupsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetSecurityGroupsAttributeType(arg *CreateNicPayloadGetSecurityGroupsAttributeType, val CreateNicPayloadGetSecurityGroupsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetStatusAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetStatusAttributeTypeOk(arg CreateNicPayloadGetStatusAttributeType) (ret CreateNicPayloadGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetStatusAttributeType(arg *CreateNicPayloadGetStatusAttributeType, val CreateNicPayloadGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetStatusArgType = string
|
||||
type CreateNicPayloadGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateNicPayloadGetTypeAttributeType = *string
|
||||
|
||||
func getCreateNicPayloadGetTypeAttributeTypeOk(arg CreateNicPayloadGetTypeAttributeType) (ret CreateNicPayloadGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateNicPayloadGetTypeAttributeType(arg *CreateNicPayloadGetTypeAttributeType, val CreateNicPayloadGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateNicPayloadGetTypeArgType = string
|
||||
type CreateNicPayloadGetTypeRetType = string
|
||||
|
||||
// CreateNicPayload Object that represents a network interface.
|
||||
type CreateNicPayload struct {
|
||||
// A list of IPs or CIDR notations.
|
||||
AllowedAddresses CreateNicPayloadGetAllowedAddressesAttributeType `json:"allowedAddresses,omitempty"`
|
||||
// Description Object. Allows string up to 255 Characters.
|
||||
Description CreateNicPayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Device CreateNicPayloadGetDeviceAttributeType `json:"device,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreateNicPayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// Object that represents an IP address.
|
||||
Ipv4 CreateNicPayloadGetIpv4AttributeType `json:"ipv4,omitempty"`
|
||||
// String that represents an IPv6 address.
|
||||
Ipv6 CreateNicPayloadGetIpv6AttributeType `json:"ipv6,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateNicPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// Object that represents an MAC address.
|
||||
Mac CreateNicPayloadGetMacAttributeType `json:"mac,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
Name CreateNicPayloadGetNameAttributeType `json:"name,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
NetworkId CreateNicPayloadGetNetworkIdAttributeType `json:"networkId,omitempty"`
|
||||
// If this is set to false, then no security groups will apply to this network interface.
|
||||
NicSecurity CreateNicPayloadgetNicSecurityAttributeType `json:"nicSecurity,omitempty"`
|
||||
// A list of UUIDs.
|
||||
SecurityGroups CreateNicPayloadGetSecurityGroupsAttributeType `json:"securityGroups,omitempty"`
|
||||
// Possible values: `ACTIVE`, `DOWN`.
|
||||
Status CreateNicPayloadGetStatusAttributeType `json:"status,omitempty"`
|
||||
// Possible values: `server`, `metadata`, `gateway`, `none`.
|
||||
Type CreateNicPayloadGetTypeAttributeType `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateNicPayload instantiates a new CreateNicPayload 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 NewCreateNicPayload() *CreateNicPayload {
|
||||
this := CreateNicPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateNicPayloadWithDefaults instantiates a new CreateNicPayload 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 NewCreateNicPayloadWithDefaults() *CreateNicPayload {
|
||||
this := CreateNicPayload{}
|
||||
var nicSecurity bool = true
|
||||
this.NicSecurity = &nicSecurity
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAllowedAddresses returns the AllowedAddresses field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetAllowedAddresses() (res CreateNicPayloadGetAllowedAddressesRetType) {
|
||||
res, _ = o.GetAllowedAddressesOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAllowedAddressesOk returns a tuple with the AllowedAddresses field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetAllowedAddressesOk() (ret CreateNicPayloadGetAllowedAddressesRetType, ok bool) {
|
||||
return getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses)
|
||||
}
|
||||
|
||||
// HasAllowedAddresses returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasAllowedAddresses() bool {
|
||||
_, ok := o.GetAllowedAddressesOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAllowedAddresses gets a reference to the given []AllowedAddressesInner and assigns it to the AllowedAddresses field.
|
||||
func (o *CreateNicPayload) SetAllowedAddresses(v CreateNicPayloadGetAllowedAddressesRetType) {
|
||||
setCreateNicPayloadGetAllowedAddressesAttributeType(&o.AllowedAddresses, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetDescription() (res CreateNicPayloadGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetDescriptionOk() (ret CreateNicPayloadGetDescriptionRetType, ok bool) {
|
||||
return getCreateNicPayloadGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *CreateNicPayload) SetDescription(v CreateNicPayloadGetDescriptionRetType) {
|
||||
setCreateNicPayloadGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetDevice returns the Device field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetDevice() (res CreateNicPayloadGetDeviceRetType) {
|
||||
res, _ = o.GetDeviceOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDeviceOk returns a tuple with the Device field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetDeviceOk() (ret CreateNicPayloadGetDeviceRetType, ok bool) {
|
||||
return getCreateNicPayloadGetDeviceAttributeTypeOk(o.Device)
|
||||
}
|
||||
|
||||
// HasDevice returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasDevice() bool {
|
||||
_, ok := o.GetDeviceOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDevice gets a reference to the given string and assigns it to the Device field.
|
||||
func (o *CreateNicPayload) SetDevice(v CreateNicPayloadGetDeviceRetType) {
|
||||
setCreateNicPayloadGetDeviceAttributeType(&o.Device, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetId() (res CreateNicPayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetIdOk() (ret CreateNicPayloadGetIdRetType, ok bool) {
|
||||
return getCreateNicPayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreateNicPayload) SetId(v CreateNicPayloadGetIdRetType) {
|
||||
setCreateNicPayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetIpv4() (res CreateNicPayloadGetIpv4RetType) {
|
||||
res, _ = o.GetIpv4Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetIpv4Ok() (ret CreateNicPayloadGetIpv4RetType, ok bool) {
|
||||
return getCreateNicPayloadGetIpv4AttributeTypeOk(o.Ipv4)
|
||||
}
|
||||
|
||||
// HasIpv4 returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasIpv4() bool {
|
||||
_, ok := o.GetIpv4Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv4 gets a reference to the given string and assigns it to the Ipv4 field.
|
||||
func (o *CreateNicPayload) SetIpv4(v CreateNicPayloadGetIpv4RetType) {
|
||||
setCreateNicPayloadGetIpv4AttributeType(&o.Ipv4, v)
|
||||
}
|
||||
|
||||
// GetIpv6 returns the Ipv6 field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetIpv6() (res CreateNicPayloadGetIpv6RetType) {
|
||||
res, _ = o.GetIpv6Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv6Ok returns a tuple with the Ipv6 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetIpv6Ok() (ret CreateNicPayloadGetIpv6RetType, ok bool) {
|
||||
return getCreateNicPayloadGetIpv6AttributeTypeOk(o.Ipv6)
|
||||
}
|
||||
|
||||
// HasIpv6 returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasIpv6() bool {
|
||||
_, ok := o.GetIpv6Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv6 gets a reference to the given string and assigns it to the Ipv6 field.
|
||||
func (o *CreateNicPayload) SetIpv6(v CreateNicPayloadGetIpv6RetType) {
|
||||
setCreateNicPayloadGetIpv6AttributeType(&o.Ipv6, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetLabels() (res CreateNicPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetLabelsOk() (ret CreateNicPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateNicPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateNicPayload) SetLabels(v CreateNicPayloadGetLabelsRetType) {
|
||||
setCreateNicPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetMac returns the Mac field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetMac() (res CreateNicPayloadGetMacRetType) {
|
||||
res, _ = o.GetMacOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMacOk returns a tuple with the Mac field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetMacOk() (ret CreateNicPayloadGetMacRetType, ok bool) {
|
||||
return getCreateNicPayloadGetMacAttributeTypeOk(o.Mac)
|
||||
}
|
||||
|
||||
// HasMac returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasMac() bool {
|
||||
_, ok := o.GetMacOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMac gets a reference to the given string and assigns it to the Mac field.
|
||||
func (o *CreateNicPayload) SetMac(v CreateNicPayloadGetMacRetType) {
|
||||
setCreateNicPayloadGetMacAttributeType(&o.Mac, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetName() (res CreateNicPayloadGetNameRetType) {
|
||||
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 *CreateNicPayload) GetNameOk() (ret CreateNicPayloadGetNameRetType, ok bool) {
|
||||
return getCreateNicPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *CreateNicPayload) SetName(v CreateNicPayloadGetNameRetType) {
|
||||
setCreateNicPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetNetworkId returns the NetworkId field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetNetworkId() (res CreateNicPayloadGetNetworkIdRetType) {
|
||||
res, _ = o.GetNetworkIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetNetworkIdOk() (ret CreateNicPayloadGetNetworkIdRetType, ok bool) {
|
||||
return getCreateNicPayloadGetNetworkIdAttributeTypeOk(o.NetworkId)
|
||||
}
|
||||
|
||||
// HasNetworkId returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasNetworkId() bool {
|
||||
_, ok := o.GetNetworkIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field.
|
||||
func (o *CreateNicPayload) SetNetworkId(v CreateNicPayloadGetNetworkIdRetType) {
|
||||
setCreateNicPayloadGetNetworkIdAttributeType(&o.NetworkId, v)
|
||||
}
|
||||
|
||||
// GetNicSecurity returns the NicSecurity field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetNicSecurity() (res CreateNicPayloadgetNicSecurityRetType) {
|
||||
res, _ = o.GetNicSecurityOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNicSecurityOk returns a tuple with the NicSecurity field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetNicSecurityOk() (ret CreateNicPayloadgetNicSecurityRetType, ok bool) {
|
||||
return getCreateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity)
|
||||
}
|
||||
|
||||
// HasNicSecurity returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasNicSecurity() bool {
|
||||
_, ok := o.GetNicSecurityOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNicSecurity gets a reference to the given bool and assigns it to the NicSecurity field.
|
||||
func (o *CreateNicPayload) SetNicSecurity(v CreateNicPayloadgetNicSecurityRetType) {
|
||||
setCreateNicPayloadgetNicSecurityAttributeType(&o.NicSecurity, v)
|
||||
}
|
||||
|
||||
// GetSecurityGroups returns the SecurityGroups field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetSecurityGroups() (res CreateNicPayloadGetSecurityGroupsRetType) {
|
||||
res, _ = o.GetSecurityGroupsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSecurityGroupsOk returns a tuple with the SecurityGroups field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetSecurityGroupsOk() (ret CreateNicPayloadGetSecurityGroupsRetType, ok bool) {
|
||||
return getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups)
|
||||
}
|
||||
|
||||
// HasSecurityGroups returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasSecurityGroups() bool {
|
||||
_, ok := o.GetSecurityGroupsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSecurityGroups gets a reference to the given []string and assigns it to the SecurityGroups field.
|
||||
func (o *CreateNicPayload) SetSecurityGroups(v CreateNicPayloadGetSecurityGroupsRetType) {
|
||||
setCreateNicPayloadGetSecurityGroupsAttributeType(&o.SecurityGroups, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetStatus() (res CreateNicPayloadGetStatusRetType) {
|
||||
res, _ = o.GetStatusOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetStatusOk() (ret CreateNicPayloadGetStatusRetType, ok bool) {
|
||||
return getCreateNicPayloadGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasStatus() bool {
|
||||
_, ok := o.GetStatusOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *CreateNicPayload) SetStatus(v CreateNicPayloadGetStatusRetType) {
|
||||
setCreateNicPayloadGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value if set, zero value otherwise.
|
||||
func (o *CreateNicPayload) GetType() (res CreateNicPayloadGetTypeRetType) {
|
||||
res, _ = o.GetTypeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateNicPayload) GetTypeOk() (ret CreateNicPayloadGetTypeRetType, ok bool) {
|
||||
return getCreateNicPayloadGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// HasType returns a boolean if a field has been set.
|
||||
func (o *CreateNicPayload) HasType() bool {
|
||||
_, ok := o.GetTypeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetType gets a reference to the given string and assigns it to the Type field.
|
||||
func (o *CreateNicPayload) SetType(v CreateNicPayloadGetTypeRetType) {
|
||||
setCreateNicPayloadGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o CreateNicPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateNicPayloadGetAllowedAddressesAttributeTypeOk(o.AllowedAddresses); ok {
|
||||
toSerialize["AllowedAddresses"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetDeviceAttributeTypeOk(o.Device); ok {
|
||||
toSerialize["Device"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
||||
toSerialize["Ipv4"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetIpv6AttributeTypeOk(o.Ipv6); ok {
|
||||
toSerialize["Ipv6"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetMacAttributeTypeOk(o.Mac); ok {
|
||||
toSerialize["Mac"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetNetworkIdAttributeTypeOk(o.NetworkId); ok {
|
||||
toSerialize["NetworkId"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadgetNicSecurityAttributeTypeOk(o.NicSecurity); ok {
|
||||
toSerialize["NicSecurity"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetSecurityGroupsAttributeTypeOk(o.SecurityGroups); ok {
|
||||
toSerialize["SecurityGroups"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getCreateNicPayloadGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateNicPayload struct {
|
||||
value *CreateNicPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateNicPayload) Get() *CreateNicPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateNicPayload) Set(val *CreateNicPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateNicPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateNicPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateNicPayload(val *CreateNicPayload) *NullableCreateNicPayload {
|
||||
return &NullableCreateNicPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateNicPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateNicPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_nic_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_nic_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
144
pkg/iaasbeta/model_create_protocol.go
Normal file
144
pkg/iaasbeta/model_create_protocol.go
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CreateProtocol - The schema for a protocol when creating a security group rule.
|
||||
type CreateProtocol struct {
|
||||
Int64 *int64
|
||||
String *string
|
||||
}
|
||||
|
||||
// int64AsCreateProtocol is a convenience function that returns int64 wrapped in CreateProtocol
|
||||
func Int64AsCreateProtocol(v *int64) CreateProtocol {
|
||||
return CreateProtocol{
|
||||
Int64: v,
|
||||
}
|
||||
}
|
||||
|
||||
// stringAsCreateProtocol is a convenience function that returns string wrapped in CreateProtocol
|
||||
func StringAsCreateProtocol(v *string) CreateProtocol {
|
||||
return CreateProtocol{
|
||||
String: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *CreateProtocol) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
match := 0
|
||||
// Workaround until upstream issue is fixed:
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/21751
|
||||
// Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
|
||||
// try to unmarshal data into Int64
|
||||
dstCreateProtocol1 := &CreateProtocol{}
|
||||
err = json.Unmarshal(data, &dstCreateProtocol1.Int64)
|
||||
if err == nil {
|
||||
jsonInt64, _ := json.Marshal(&dstCreateProtocol1.Int64)
|
||||
if string(jsonInt64) != "{}" { // empty struct
|
||||
dst.Int64 = dstCreateProtocol1.Int64
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
// try to unmarshal data into String
|
||||
dstCreateProtocol2 := &CreateProtocol{}
|
||||
err = json.Unmarshal(data, &dstCreateProtocol2.String)
|
||||
if err == nil {
|
||||
jsonString, _ := json.Marshal(&dstCreateProtocol2.String)
|
||||
if string(jsonString) != "{}" { // empty struct
|
||||
dst.String = dstCreateProtocol2.String
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
if match > 1 { // more than 1 match
|
||||
// reset to nil
|
||||
dst.Int64 = nil
|
||||
dst.String = nil
|
||||
|
||||
return fmt.Errorf("data matches more than one schema in oneOf(CreateProtocol)")
|
||||
} else if match == 1 {
|
||||
return nil // exactly one match
|
||||
} else { // no match
|
||||
return fmt.Errorf("data failed to match schemas in oneOf(CreateProtocol)")
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src CreateProtocol) MarshalJSON() ([]byte, error) {
|
||||
if src.Int64 != nil {
|
||||
return json.Marshal(&src.Int64)
|
||||
}
|
||||
|
||||
if src.String != nil {
|
||||
return json.Marshal(&src.String)
|
||||
}
|
||||
|
||||
return []byte("{}"), nil // no data in oneOf schemas => empty JSON object
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *CreateProtocol) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.Int64 != nil {
|
||||
return obj.Int64
|
||||
}
|
||||
|
||||
if obj.String != nil {
|
||||
return obj.String
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableCreateProtocol struct {
|
||||
value *CreateProtocol
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateProtocol) Get() *CreateProtocol {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateProtocol) Set(val *CreateProtocol) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateProtocol) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateProtocol) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateProtocol(val *CreateProtocol) *NullableCreateProtocol {
|
||||
return &NullableCreateProtocol{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateProtocol) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateProtocol) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
60
pkg/iaasbeta/model_create_protocol_test.go
Normal file
60
pkg/iaasbeta/model_create_protocol_test.go
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isOneOf
|
||||
|
||||
func TestCreateProtocol_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{
|
||||
|
||||
{
|
||||
name: "success - int64 1",
|
||||
args: args{
|
||||
src: []byte(`"1"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
|
||||
{
|
||||
name: "success - string null",
|
||||
args: args{
|
||||
src: []byte(`"null"`),
|
||||
},
|
||||
wantErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := &CreateProtocol{}
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
marshalJson, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("failed marshalling CreateProtocol: %v", err)
|
||||
}
|
||||
if string(marshalJson) != string(tt.args.src) {
|
||||
t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
290
pkg/iaasbeta/model_create_public_ip_payload.go
Normal file
290
pkg/iaasbeta/model_create_public_ip_payload.go
Normal file
|
|
@ -0,0 +1,290 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreatePublicIPPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreatePublicIPPayload{}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreatePublicIPPayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreatePublicIPPayloadGetIdAttributeTypeOk(arg CreatePublicIPPayloadGetIdAttributeType) (ret CreatePublicIPPayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreatePublicIPPayloadGetIdAttributeType(arg *CreatePublicIPPayloadGetIdAttributeType, val CreatePublicIPPayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreatePublicIPPayloadGetIdArgType = string
|
||||
type CreatePublicIPPayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for ip
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreatePublicIPPayloadGetIpAttributeType = *string
|
||||
|
||||
func getCreatePublicIPPayloadGetIpAttributeTypeOk(arg CreatePublicIPPayloadGetIpAttributeType) (ret CreatePublicIPPayloadGetIpRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreatePublicIPPayloadGetIpAttributeType(arg *CreatePublicIPPayloadGetIpAttributeType, val CreatePublicIPPayloadGetIpRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreatePublicIPPayloadGetIpArgType = string
|
||||
type CreatePublicIPPayloadGetIpRetType = string
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreatePublicIPPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreatePublicIPPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreatePublicIPPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreatePublicIPPayloadGetLabelsAttributeTypeOk(arg CreatePublicIPPayloadGetLabelsAttributeType) (ret CreatePublicIPPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreatePublicIPPayloadGetLabelsAttributeType(arg *CreatePublicIPPayloadGetLabelsAttributeType, val CreatePublicIPPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for networkInterface
|
||||
*/
|
||||
|
||||
// isNullableString
|
||||
type CreatePublicIPPayloadGetNetworkInterfaceAttributeType = *NullableString
|
||||
|
||||
func getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(arg CreatePublicIPPayloadGetNetworkInterfaceAttributeType) (ret CreatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return nil, false
|
||||
}
|
||||
return arg.Get(), true
|
||||
}
|
||||
|
||||
func setCreatePublicIPPayloadGetNetworkInterfaceAttributeType(arg *CreatePublicIPPayloadGetNetworkInterfaceAttributeType, val CreatePublicIPPayloadGetNetworkInterfaceRetType) {
|
||||
if IsNil(*arg) {
|
||||
*arg = NewNullableString(val)
|
||||
} else {
|
||||
(*arg).Set(val)
|
||||
}
|
||||
}
|
||||
|
||||
type CreatePublicIPPayloadGetNetworkInterfaceArgType = *string
|
||||
type CreatePublicIPPayloadGetNetworkInterfaceRetType = *string
|
||||
|
||||
// CreatePublicIPPayload Object that represents a public IP.
|
||||
type CreatePublicIPPayload struct {
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreatePublicIPPayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// String that represents an IPv4 address.
|
||||
Ip CreatePublicIPPayloadGetIpAttributeType `json:"ip,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreatePublicIPPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
NetworkInterface CreatePublicIPPayloadGetNetworkInterfaceAttributeType `json:"networkInterface,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreatePublicIPPayload instantiates a new CreatePublicIPPayload 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 NewCreatePublicIPPayload() *CreatePublicIPPayload {
|
||||
this := CreatePublicIPPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreatePublicIPPayloadWithDefaults instantiates a new CreatePublicIPPayload 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 NewCreatePublicIPPayloadWithDefaults() *CreatePublicIPPayload {
|
||||
this := CreatePublicIPPayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreatePublicIPPayload) GetId() (res CreatePublicIPPayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreatePublicIPPayload) GetIdOk() (ret CreatePublicIPPayloadGetIdRetType, ok bool) {
|
||||
return getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreatePublicIPPayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreatePublicIPPayload) SetId(v CreatePublicIPPayloadGetIdRetType) {
|
||||
setCreatePublicIPPayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetIp returns the Ip field value if set, zero value otherwise.
|
||||
func (o *CreatePublicIPPayload) GetIp() (res CreatePublicIPPayloadGetIpRetType) {
|
||||
res, _ = o.GetIpOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpOk returns a tuple with the Ip field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreatePublicIPPayload) GetIpOk() (ret CreatePublicIPPayloadGetIpRetType, ok bool) {
|
||||
return getCreatePublicIPPayloadGetIpAttributeTypeOk(o.Ip)
|
||||
}
|
||||
|
||||
// HasIp returns a boolean if a field has been set.
|
||||
func (o *CreatePublicIPPayload) HasIp() bool {
|
||||
_, ok := o.GetIpOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIp gets a reference to the given string and assigns it to the Ip field.
|
||||
func (o *CreatePublicIPPayload) SetIp(v CreatePublicIPPayloadGetIpRetType) {
|
||||
setCreatePublicIPPayloadGetIpAttributeType(&o.Ip, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreatePublicIPPayload) GetLabels() (res CreatePublicIPPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreatePublicIPPayload) GetLabelsOk() (ret CreatePublicIPPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreatePublicIPPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreatePublicIPPayload) SetLabels(v CreatePublicIPPayloadGetLabelsRetType) {
|
||||
setCreatePublicIPPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetNetworkInterface returns the NetworkInterface field value if set, zero value otherwise (both if not set or set to explicit null).
|
||||
func (o *CreatePublicIPPayload) GetNetworkInterface() (res CreatePublicIPPayloadGetNetworkInterfaceRetType) {
|
||||
res, _ = o.GetNetworkInterfaceOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNetworkInterfaceOk returns a tuple with the NetworkInterface field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
||||
func (o *CreatePublicIPPayload) GetNetworkInterfaceOk() (ret CreatePublicIPPayloadGetNetworkInterfaceRetType, ok bool) {
|
||||
return getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface)
|
||||
}
|
||||
|
||||
// HasNetworkInterface returns a boolean if a field has been set.
|
||||
func (o *CreatePublicIPPayload) HasNetworkInterface() bool {
|
||||
_, ok := o.GetNetworkInterfaceOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNetworkInterface gets a reference to the given string and assigns it to the NetworkInterface field.
|
||||
func (o *CreatePublicIPPayload) SetNetworkInterface(v CreatePublicIPPayloadGetNetworkInterfaceRetType) {
|
||||
setCreatePublicIPPayloadGetNetworkInterfaceAttributeType(&o.NetworkInterface, v)
|
||||
}
|
||||
|
||||
// SetNetworkInterfaceNil sets the value for NetworkInterface to be an explicit nil
|
||||
func (o *CreatePublicIPPayload) SetNetworkInterfaceNil() {
|
||||
o.NetworkInterface = nil
|
||||
}
|
||||
|
||||
// UnsetNetworkInterface ensures that no value is present for NetworkInterface, not even an explicit nil
|
||||
func (o *CreatePublicIPPayload) UnsetNetworkInterface() {
|
||||
o.NetworkInterface = nil
|
||||
}
|
||||
|
||||
func (o CreatePublicIPPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreatePublicIPPayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreatePublicIPPayloadGetIpAttributeTypeOk(o.Ip); ok {
|
||||
toSerialize["Ip"] = val
|
||||
}
|
||||
if val, ok := getCreatePublicIPPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreatePublicIPPayloadGetNetworkInterfaceAttributeTypeOk(o.NetworkInterface); ok {
|
||||
toSerialize["NetworkInterface"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreatePublicIPPayload struct {
|
||||
value *CreatePublicIPPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreatePublicIPPayload) Get() *CreatePublicIPPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreatePublicIPPayload) Set(val *CreatePublicIPPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreatePublicIPPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreatePublicIPPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreatePublicIPPayload(val *CreatePublicIPPayload) *NullableCreatePublicIPPayload {
|
||||
return &NullableCreatePublicIPPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreatePublicIPPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreatePublicIPPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_public_ip_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_public_ip_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
468
pkg/iaasbeta/model_create_security_group_payload.go
Normal file
468
pkg/iaasbeta/model_create_security_group_payload.go
Normal file
|
|
@ -0,0 +1,468 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the CreateSecurityGroupPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateSecurityGroupPayload{}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateSecurityGroupPayloadGetCreatedAtAttributeType = *time.Time
|
||||
type CreateSecurityGroupPayloadGetCreatedAtArgType = time.Time
|
||||
type CreateSecurityGroupPayloadGetCreatedAtRetType = time.Time
|
||||
|
||||
func getCreateSecurityGroupPayloadGetCreatedAtAttributeTypeOk(arg CreateSecurityGroupPayloadGetCreatedAtAttributeType) (ret CreateSecurityGroupPayloadGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetCreatedAtAttributeType(arg *CreateSecurityGroupPayloadGetCreatedAtAttributeType, val CreateSecurityGroupPayloadGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupPayloadGetDescriptionAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupPayloadGetDescriptionAttributeTypeOk(arg CreateSecurityGroupPayloadGetDescriptionAttributeType) (ret CreateSecurityGroupPayloadGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetDescriptionAttributeType(arg *CreateSecurityGroupPayloadGetDescriptionAttributeType, val CreateSecurityGroupPayloadGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupPayloadGetDescriptionArgType = string
|
||||
type CreateSecurityGroupPayloadGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupPayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupPayloadGetIdAttributeTypeOk(arg CreateSecurityGroupPayloadGetIdAttributeType) (ret CreateSecurityGroupPayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetIdAttributeType(arg *CreateSecurityGroupPayloadGetIdAttributeType, val CreateSecurityGroupPayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupPayloadGetIdArgType = string
|
||||
type CreateSecurityGroupPayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateSecurityGroupPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateSecurityGroupPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateSecurityGroupPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateSecurityGroupPayloadGetLabelsAttributeTypeOk(arg CreateSecurityGroupPayloadGetLabelsAttributeType) (ret CreateSecurityGroupPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetLabelsAttributeType(arg *CreateSecurityGroupPayloadGetLabelsAttributeType, val CreateSecurityGroupPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupPayloadGetNameAttributeTypeOk(arg CreateSecurityGroupPayloadGetNameAttributeType) (ret CreateSecurityGroupPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetNameAttributeType(arg *CreateSecurityGroupPayloadGetNameAttributeType, val CreateSecurityGroupPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupPayloadGetNameArgType = string
|
||||
type CreateSecurityGroupPayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for rules
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateSecurityGroupPayloadGetRulesAttributeType = *[]SecurityGroupRule
|
||||
type CreateSecurityGroupPayloadGetRulesArgType = []SecurityGroupRule
|
||||
type CreateSecurityGroupPayloadGetRulesRetType = []SecurityGroupRule
|
||||
|
||||
func getCreateSecurityGroupPayloadGetRulesAttributeTypeOk(arg CreateSecurityGroupPayloadGetRulesAttributeType) (ret CreateSecurityGroupPayloadGetRulesRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetRulesAttributeType(arg *CreateSecurityGroupPayloadGetRulesAttributeType, val CreateSecurityGroupPayloadGetRulesRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for stateful
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateSecurityGroupPayloadgetStatefulAttributeType = *bool
|
||||
type CreateSecurityGroupPayloadgetStatefulArgType = bool
|
||||
type CreateSecurityGroupPayloadgetStatefulRetType = bool
|
||||
|
||||
func getCreateSecurityGroupPayloadgetStatefulAttributeTypeOk(arg CreateSecurityGroupPayloadgetStatefulAttributeType) (ret CreateSecurityGroupPayloadgetStatefulRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadgetStatefulAttributeType(arg *CreateSecurityGroupPayloadgetStatefulAttributeType, val CreateSecurityGroupPayloadgetStatefulRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateSecurityGroupPayloadGetUpdatedAtAttributeType = *time.Time
|
||||
type CreateSecurityGroupPayloadGetUpdatedAtArgType = time.Time
|
||||
type CreateSecurityGroupPayloadGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getCreateSecurityGroupPayloadGetUpdatedAtAttributeTypeOk(arg CreateSecurityGroupPayloadGetUpdatedAtAttributeType) (ret CreateSecurityGroupPayloadGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupPayloadGetUpdatedAtAttributeType(arg *CreateSecurityGroupPayloadGetUpdatedAtAttributeType, val CreateSecurityGroupPayloadGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateSecurityGroupPayload Object that represents a security group.
|
||||
type CreateSecurityGroupPayload struct {
|
||||
// Date-time when resource was created.
|
||||
CreatedAt CreateSecurityGroupPayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Description Object. Allows string up to 255 Characters.
|
||||
Description CreateSecurityGroupPayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreateSecurityGroupPayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateSecurityGroupPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name CreateSecurityGroupPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
// A list containing security group rule objects.
|
||||
Rules CreateSecurityGroupPayloadGetRulesAttributeType `json:"rules,omitempty"`
|
||||
// Shows if a security group is stateful or stateless. You can only have one type of security groups per network interface/server.
|
||||
Stateful CreateSecurityGroupPayloadgetStatefulAttributeType `json:"stateful,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt CreateSecurityGroupPayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateSecurityGroupPayload CreateSecurityGroupPayload
|
||||
|
||||
// NewCreateSecurityGroupPayload instantiates a new CreateSecurityGroupPayload 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 NewCreateSecurityGroupPayload(name CreateSecurityGroupPayloadGetNameArgType) *CreateSecurityGroupPayload {
|
||||
this := CreateSecurityGroupPayload{}
|
||||
setCreateSecurityGroupPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateSecurityGroupPayloadWithDefaults instantiates a new CreateSecurityGroupPayload 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 NewCreateSecurityGroupPayloadWithDefaults() *CreateSecurityGroupPayload {
|
||||
this := CreateSecurityGroupPayload{}
|
||||
var stateful bool = true
|
||||
this.Stateful = &stateful
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetCreatedAt() (res CreateSecurityGroupPayloadGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetCreatedAtOk() (ret CreateSecurityGroupPayloadGetCreatedAtRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *CreateSecurityGroupPayload) SetCreatedAt(v CreateSecurityGroupPayloadGetCreatedAtRetType) {
|
||||
setCreateSecurityGroupPayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetDescription() (res CreateSecurityGroupPayloadGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetDescriptionOk() (ret CreateSecurityGroupPayloadGetDescriptionRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *CreateSecurityGroupPayload) SetDescription(v CreateSecurityGroupPayloadGetDescriptionRetType) {
|
||||
setCreateSecurityGroupPayloadGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetId() (res CreateSecurityGroupPayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetIdOk() (ret CreateSecurityGroupPayloadGetIdRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreateSecurityGroupPayload) SetId(v CreateSecurityGroupPayloadGetIdRetType) {
|
||||
setCreateSecurityGroupPayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetLabels() (res CreateSecurityGroupPayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetLabelsOk() (ret CreateSecurityGroupPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateSecurityGroupPayload) SetLabels(v CreateSecurityGroupPayloadGetLabelsRetType) {
|
||||
setCreateSecurityGroupPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateSecurityGroupPayload) GetName() (ret CreateSecurityGroupPayloadGetNameRetType) {
|
||||
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 *CreateSecurityGroupPayload) GetNameOk() (ret CreateSecurityGroupPayloadGetNameRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateSecurityGroupPayload) SetName(v CreateSecurityGroupPayloadGetNameRetType) {
|
||||
setCreateSecurityGroupPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetRules returns the Rules field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetRules() (res CreateSecurityGroupPayloadGetRulesRetType) {
|
||||
res, _ = o.GetRulesOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetRulesOk() (ret CreateSecurityGroupPayloadGetRulesRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetRulesAttributeTypeOk(o.Rules)
|
||||
}
|
||||
|
||||
// HasRules returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasRules() bool {
|
||||
_, ok := o.GetRulesOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRules gets a reference to the given []SecurityGroupRule and assigns it to the Rules field.
|
||||
func (o *CreateSecurityGroupPayload) SetRules(v CreateSecurityGroupPayloadGetRulesRetType) {
|
||||
setCreateSecurityGroupPayloadGetRulesAttributeType(&o.Rules, v)
|
||||
}
|
||||
|
||||
// GetStateful returns the Stateful field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetStateful() (res CreateSecurityGroupPayloadgetStatefulRetType) {
|
||||
res, _ = o.GetStatefulOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatefulOk returns a tuple with the Stateful field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetStatefulOk() (ret CreateSecurityGroupPayloadgetStatefulRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadgetStatefulAttributeTypeOk(o.Stateful)
|
||||
}
|
||||
|
||||
// HasStateful returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasStateful() bool {
|
||||
_, ok := o.GetStatefulOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStateful gets a reference to the given bool and assigns it to the Stateful field.
|
||||
func (o *CreateSecurityGroupPayload) SetStateful(v CreateSecurityGroupPayloadgetStatefulRetType) {
|
||||
setCreateSecurityGroupPayloadgetStatefulAttributeType(&o.Stateful, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupPayload) GetUpdatedAt() (res CreateSecurityGroupPayloadGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupPayload) GetUpdatedAtOk() (ret CreateSecurityGroupPayloadGetUpdatedAtRetType, ok bool) {
|
||||
return getCreateSecurityGroupPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupPayload) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *CreateSecurityGroupPayload) SetUpdatedAt(v CreateSecurityGroupPayloadGetUpdatedAtRetType) {
|
||||
setCreateSecurityGroupPayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o CreateSecurityGroupPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetRulesAttributeTypeOk(o.Rules); ok {
|
||||
toSerialize["Rules"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadgetStatefulAttributeTypeOk(o.Stateful); ok {
|
||||
toSerialize["Stateful"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupPayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateSecurityGroupPayload struct {
|
||||
value *CreateSecurityGroupPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupPayload) Get() *CreateSecurityGroupPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupPayload) Set(val *CreateSecurityGroupPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateSecurityGroupPayload(val *CreateSecurityGroupPayload) *NullableCreateSecurityGroupPayload {
|
||||
return &NullableCreateSecurityGroupPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_security_group_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_security_group_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
661
pkg/iaasbeta/model_create_security_group_rule_payload.go
Normal file
661
pkg/iaasbeta/model_create_security_group_rule_payload.go
Normal file
|
|
@ -0,0 +1,661 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the CreateSecurityGroupRulePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateSecurityGroupRulePayload{}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateSecurityGroupRulePayloadGetCreatedAtAttributeType = *time.Time
|
||||
type CreateSecurityGroupRulePayloadGetCreatedAtArgType = time.Time
|
||||
type CreateSecurityGroupRulePayloadGetCreatedAtRetType = time.Time
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetCreatedAtAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetCreatedAtAttributeType) (ret CreateSecurityGroupRulePayloadGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetCreatedAtAttributeType(arg *CreateSecurityGroupRulePayloadGetCreatedAtAttributeType, val CreateSecurityGroupRulePayloadGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetDescriptionAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetDescriptionAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetDescriptionAttributeType) (ret CreateSecurityGroupRulePayloadGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetDescriptionAttributeType(arg *CreateSecurityGroupRulePayloadGetDescriptionAttributeType, val CreateSecurityGroupRulePayloadGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetDescriptionArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for direction
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetDirectionAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetDirectionAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetDirectionAttributeType) (ret CreateSecurityGroupRulePayloadGetDirectionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetDirectionAttributeType(arg *CreateSecurityGroupRulePayloadGetDirectionAttributeType, val CreateSecurityGroupRulePayloadGetDirectionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetDirectionArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetDirectionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for ethertype
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetEthertypeAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetEthertypeAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetEthertypeAttributeType) (ret CreateSecurityGroupRulePayloadGetEthertypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetEthertypeAttributeType(arg *CreateSecurityGroupRulePayloadGetEthertypeAttributeType, val CreateSecurityGroupRulePayloadGetEthertypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetEthertypeArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetEthertypeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for icmpParameters
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType = *ICMPParameters
|
||||
type CreateSecurityGroupRulePayloadGetIcmpParametersArgType = ICMPParameters
|
||||
type CreateSecurityGroupRulePayloadGetIcmpParametersRetType = ICMPParameters
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetIcmpParametersAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType) (ret CreateSecurityGroupRulePayloadGetIcmpParametersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetIcmpParametersAttributeType(arg *CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType, val CreateSecurityGroupRulePayloadGetIcmpParametersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetIdAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetIdAttributeType) (ret CreateSecurityGroupRulePayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetIdAttributeType(arg *CreateSecurityGroupRulePayloadGetIdAttributeType, val CreateSecurityGroupRulePayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetIdArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for ipRange
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetIpRangeAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetIpRangeAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetIpRangeAttributeType) (ret CreateSecurityGroupRulePayloadGetIpRangeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetIpRangeAttributeType(arg *CreateSecurityGroupRulePayloadGetIpRangeAttributeType, val CreateSecurityGroupRulePayloadGetIpRangeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetIpRangeArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetIpRangeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for portRange
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateSecurityGroupRulePayloadGetPortRangeAttributeType = *PortRange
|
||||
type CreateSecurityGroupRulePayloadGetPortRangeArgType = PortRange
|
||||
type CreateSecurityGroupRulePayloadGetPortRangeRetType = PortRange
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetPortRangeAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetPortRangeAttributeType) (ret CreateSecurityGroupRulePayloadGetPortRangeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetPortRangeAttributeType(arg *CreateSecurityGroupRulePayloadGetPortRangeAttributeType, val CreateSecurityGroupRulePayloadGetPortRangeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for remoteSecurityGroupId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType) (ret CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType(arg *CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType, val CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for securityGroupId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType = *string
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType) (ret CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType(arg *CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType, val CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateSecurityGroupRulePayloadGetSecurityGroupIdArgType = string
|
||||
type CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType = *time.Time
|
||||
type CreateSecurityGroupRulePayloadGetUpdatedAtArgType = time.Time
|
||||
type CreateSecurityGroupRulePayloadGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetUpdatedAtAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType) (ret CreateSecurityGroupRulePayloadGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetUpdatedAtAttributeType(arg *CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType, val CreateSecurityGroupRulePayloadGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for protocol
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateSecurityGroupRulePayloadGetProtocolAttributeType = *CreateProtocol
|
||||
type CreateSecurityGroupRulePayloadGetProtocolArgType = CreateProtocol
|
||||
type CreateSecurityGroupRulePayloadGetProtocolRetType = CreateProtocol
|
||||
|
||||
func getCreateSecurityGroupRulePayloadGetProtocolAttributeTypeOk(arg CreateSecurityGroupRulePayloadGetProtocolAttributeType) (ret CreateSecurityGroupRulePayloadGetProtocolRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRulePayloadGetProtocolAttributeType(arg *CreateSecurityGroupRulePayloadGetProtocolAttributeType, val CreateSecurityGroupRulePayloadGetProtocolRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateSecurityGroupRulePayload Object that represents a request body for security group rule creation.
|
||||
type CreateSecurityGroupRulePayload struct {
|
||||
// Date-time when resource was created.
|
||||
CreatedAt CreateSecurityGroupRulePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Description Object. Allows string up to 255 Characters.
|
||||
Description CreateSecurityGroupRulePayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
// The direction of the traffic which the rule should match. Possible values: `ingress`, `egress`.
|
||||
// REQUIRED
|
||||
Direction CreateSecurityGroupRulePayloadGetDirectionAttributeType `json:"direction" required:"true"`
|
||||
// The ethertype which the rule should match. Possible values: `IPv4`, `IPv6`.
|
||||
Ethertype CreateSecurityGroupRulePayloadGetEthertypeAttributeType `json:"ethertype,omitempty"`
|
||||
IcmpParameters CreateSecurityGroupRulePayloadGetIcmpParametersAttributeType `json:"icmpParameters,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreateSecurityGroupRulePayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
// Classless Inter-Domain Routing (CIDR).
|
||||
IpRange CreateSecurityGroupRulePayloadGetIpRangeAttributeType `json:"ipRange,omitempty"`
|
||||
PortRange CreateSecurityGroupRulePayloadGetPortRangeAttributeType `json:"portRange,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
RemoteSecurityGroupId CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType `json:"remoteSecurityGroupId,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
SecurityGroupId CreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType `json:"securityGroupId,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt CreateSecurityGroupRulePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
Protocol CreateSecurityGroupRulePayloadGetProtocolAttributeType `json:"protocol,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateSecurityGroupRulePayload CreateSecurityGroupRulePayload
|
||||
|
||||
// NewCreateSecurityGroupRulePayload instantiates a new CreateSecurityGroupRulePayload 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 NewCreateSecurityGroupRulePayload(direction CreateSecurityGroupRulePayloadGetDirectionArgType) *CreateSecurityGroupRulePayload {
|
||||
this := CreateSecurityGroupRulePayload{}
|
||||
setCreateSecurityGroupRulePayloadGetDirectionAttributeType(&this.Direction, direction)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateSecurityGroupRulePayloadWithDefaults instantiates a new CreateSecurityGroupRulePayload 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 NewCreateSecurityGroupRulePayloadWithDefaults() *CreateSecurityGroupRulePayload {
|
||||
this := CreateSecurityGroupRulePayload{}
|
||||
var ethertype string = "IPv4"
|
||||
this.Ethertype = ðertype
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetCreatedAt() (res CreateSecurityGroupRulePayloadGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetCreatedAtOk() (ret CreateSecurityGroupRulePayloadGetCreatedAtRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetCreatedAt(v CreateSecurityGroupRulePayloadGetCreatedAtRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetDescription() (res CreateSecurityGroupRulePayloadGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetDescriptionOk() (ret CreateSecurityGroupRulePayloadGetDescriptionRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetDescription(v CreateSecurityGroupRulePayloadGetDescriptionRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetDirection returns the Direction field value
|
||||
func (o *CreateSecurityGroupRulePayload) GetDirection() (ret CreateSecurityGroupRulePayloadGetDirectionRetType) {
|
||||
ret, _ = o.GetDirectionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDirectionOk returns a tuple with the Direction field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetDirectionOk() (ret CreateSecurityGroupRulePayloadGetDirectionRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetDirectionAttributeTypeOk(o.Direction)
|
||||
}
|
||||
|
||||
// SetDirection sets field value
|
||||
func (o *CreateSecurityGroupRulePayload) SetDirection(v CreateSecurityGroupRulePayloadGetDirectionRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetDirectionAttributeType(&o.Direction, v)
|
||||
}
|
||||
|
||||
// GetEthertype returns the Ethertype field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetEthertype() (res CreateSecurityGroupRulePayloadGetEthertypeRetType) {
|
||||
res, _ = o.GetEthertypeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEthertypeOk returns a tuple with the Ethertype field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetEthertypeOk() (ret CreateSecurityGroupRulePayloadGetEthertypeRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetEthertypeAttributeTypeOk(o.Ethertype)
|
||||
}
|
||||
|
||||
// HasEthertype returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasEthertype() bool {
|
||||
_, ok := o.GetEthertypeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEthertype gets a reference to the given string and assigns it to the Ethertype field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetEthertype(v CreateSecurityGroupRulePayloadGetEthertypeRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetEthertypeAttributeType(&o.Ethertype, v)
|
||||
}
|
||||
|
||||
// GetIcmpParameters returns the IcmpParameters field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetIcmpParameters() (res CreateSecurityGroupRulePayloadGetIcmpParametersRetType) {
|
||||
res, _ = o.GetIcmpParametersOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIcmpParametersOk returns a tuple with the IcmpParameters field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetIcmpParametersOk() (ret CreateSecurityGroupRulePayloadGetIcmpParametersRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetIcmpParametersAttributeTypeOk(o.IcmpParameters)
|
||||
}
|
||||
|
||||
// HasIcmpParameters returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasIcmpParameters() bool {
|
||||
_, ok := o.GetIcmpParametersOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIcmpParameters gets a reference to the given ICMPParameters and assigns it to the IcmpParameters field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetIcmpParameters(v CreateSecurityGroupRulePayloadGetIcmpParametersRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetIcmpParametersAttributeType(&o.IcmpParameters, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetId() (res CreateSecurityGroupRulePayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetIdOk() (ret CreateSecurityGroupRulePayloadGetIdRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetId(v CreateSecurityGroupRulePayloadGetIdRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetIpRange returns the IpRange field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetIpRange() (res CreateSecurityGroupRulePayloadGetIpRangeRetType) {
|
||||
res, _ = o.GetIpRangeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpRangeOk returns a tuple with the IpRange field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetIpRangeOk() (ret CreateSecurityGroupRulePayloadGetIpRangeRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetIpRangeAttributeTypeOk(o.IpRange)
|
||||
}
|
||||
|
||||
// HasIpRange returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasIpRange() bool {
|
||||
_, ok := o.GetIpRangeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpRange gets a reference to the given string and assigns it to the IpRange field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetIpRange(v CreateSecurityGroupRulePayloadGetIpRangeRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetIpRangeAttributeType(&o.IpRange, v)
|
||||
}
|
||||
|
||||
// GetPortRange returns the PortRange field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetPortRange() (res CreateSecurityGroupRulePayloadGetPortRangeRetType) {
|
||||
res, _ = o.GetPortRangeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetPortRangeOk returns a tuple with the PortRange field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetPortRangeOk() (ret CreateSecurityGroupRulePayloadGetPortRangeRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetPortRangeAttributeTypeOk(o.PortRange)
|
||||
}
|
||||
|
||||
// HasPortRange returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasPortRange() bool {
|
||||
_, ok := o.GetPortRangeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPortRange gets a reference to the given PortRange and assigns it to the PortRange field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetPortRange(v CreateSecurityGroupRulePayloadGetPortRangeRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetPortRangeAttributeType(&o.PortRange, v)
|
||||
}
|
||||
|
||||
// GetRemoteSecurityGroupId returns the RemoteSecurityGroupId field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetRemoteSecurityGroupId() (res CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType) {
|
||||
res, _ = o.GetRemoteSecurityGroupIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetRemoteSecurityGroupIdOk returns a tuple with the RemoteSecurityGroupId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetRemoteSecurityGroupIdOk() (ret CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId)
|
||||
}
|
||||
|
||||
// HasRemoteSecurityGroupId returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasRemoteSecurityGroupId() bool {
|
||||
_, ok := o.GetRemoteSecurityGroupIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetRemoteSecurityGroupId gets a reference to the given string and assigns it to the RemoteSecurityGroupId field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetRemoteSecurityGroupId(v CreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeType(&o.RemoteSecurityGroupId, v)
|
||||
}
|
||||
|
||||
// GetSecurityGroupId returns the SecurityGroupId field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetSecurityGroupId() (res CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType) {
|
||||
res, _ = o.GetSecurityGroupIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSecurityGroupIdOk returns a tuple with the SecurityGroupId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetSecurityGroupIdOk() (ret CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId)
|
||||
}
|
||||
|
||||
// HasSecurityGroupId returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasSecurityGroupId() bool {
|
||||
_, ok := o.GetSecurityGroupIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSecurityGroupId gets a reference to the given string and assigns it to the SecurityGroupId field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetSecurityGroupId(v CreateSecurityGroupRulePayloadGetSecurityGroupIdRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeType(&o.SecurityGroupId, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetUpdatedAt() (res CreateSecurityGroupRulePayloadGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetUpdatedAtOk() (ret CreateSecurityGroupRulePayloadGetUpdatedAtRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetUpdatedAt(v CreateSecurityGroupRulePayloadGetUpdatedAtRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
// GetProtocol returns the Protocol field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRulePayload) GetProtocol() (res CreateSecurityGroupRulePayloadGetProtocolRetType) {
|
||||
res, _ = o.GetProtocolOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) GetProtocolOk() (ret CreateSecurityGroupRulePayloadGetProtocolRetType, ok bool) {
|
||||
return getCreateSecurityGroupRulePayloadGetProtocolAttributeTypeOk(o.Protocol)
|
||||
}
|
||||
|
||||
// HasProtocol returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRulePayload) HasProtocol() bool {
|
||||
_, ok := o.GetProtocolOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProtocol gets a reference to the given CreateProtocol and assigns it to the Protocol field.
|
||||
func (o *CreateSecurityGroupRulePayload) SetProtocol(v CreateSecurityGroupRulePayloadGetProtocolRetType) {
|
||||
setCreateSecurityGroupRulePayloadGetProtocolAttributeType(&o.Protocol, v)
|
||||
}
|
||||
|
||||
func (o CreateSecurityGroupRulePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetDirectionAttributeTypeOk(o.Direction); ok {
|
||||
toSerialize["Direction"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetEthertypeAttributeTypeOk(o.Ethertype); ok {
|
||||
toSerialize["Ethertype"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetIcmpParametersAttributeTypeOk(o.IcmpParameters); ok {
|
||||
toSerialize["IcmpParameters"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetIpRangeAttributeTypeOk(o.IpRange); ok {
|
||||
toSerialize["IpRange"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetPortRangeAttributeTypeOk(o.PortRange); ok {
|
||||
toSerialize["PortRange"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetRemoteSecurityGroupIdAttributeTypeOk(o.RemoteSecurityGroupId); ok {
|
||||
toSerialize["RemoteSecurityGroupId"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetSecurityGroupIdAttributeTypeOk(o.SecurityGroupId); ok {
|
||||
toSerialize["SecurityGroupId"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
if val, ok := getCreateSecurityGroupRulePayloadGetProtocolAttributeTypeOk(o.Protocol); ok {
|
||||
toSerialize["Protocol"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateSecurityGroupRulePayload struct {
|
||||
value *CreateSecurityGroupRulePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupRulePayload) Get() *CreateSecurityGroupRulePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupRulePayload) Set(val *CreateSecurityGroupRulePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupRulePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupRulePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateSecurityGroupRulePayload(val *CreateSecurityGroupRulePayload) *NullableCreateSecurityGroupRulePayload {
|
||||
return &NullableCreateSecurityGroupRulePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupRulePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupRulePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
127
pkg/iaasbeta/model_create_security_group_rule_protocol.go
Normal file
127
pkg/iaasbeta/model_create_security_group_rule_protocol.go
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateSecurityGroupRuleProtocol type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateSecurityGroupRuleProtocol{}
|
||||
|
||||
/*
|
||||
types and functions for protocol
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateSecurityGroupRuleProtocolGetProtocolAttributeType = *CreateProtocol
|
||||
type CreateSecurityGroupRuleProtocolGetProtocolArgType = CreateProtocol
|
||||
type CreateSecurityGroupRuleProtocolGetProtocolRetType = CreateProtocol
|
||||
|
||||
func getCreateSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(arg CreateSecurityGroupRuleProtocolGetProtocolAttributeType) (ret CreateSecurityGroupRuleProtocolGetProtocolRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateSecurityGroupRuleProtocolGetProtocolAttributeType(arg *CreateSecurityGroupRuleProtocolGetProtocolAttributeType, val CreateSecurityGroupRuleProtocolGetProtocolRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateSecurityGroupRuleProtocol The internet protocol which the rule should match.
|
||||
type CreateSecurityGroupRuleProtocol struct {
|
||||
Protocol CreateSecurityGroupRuleProtocolGetProtocolAttributeType `json:"protocol,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateSecurityGroupRuleProtocol instantiates a new CreateSecurityGroupRuleProtocol 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 NewCreateSecurityGroupRuleProtocol() *CreateSecurityGroupRuleProtocol {
|
||||
this := CreateSecurityGroupRuleProtocol{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateSecurityGroupRuleProtocolWithDefaults instantiates a new CreateSecurityGroupRuleProtocol 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 NewCreateSecurityGroupRuleProtocolWithDefaults() *CreateSecurityGroupRuleProtocol {
|
||||
this := CreateSecurityGroupRuleProtocol{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProtocol returns the Protocol field value if set, zero value otherwise.
|
||||
func (o *CreateSecurityGroupRuleProtocol) GetProtocol() (res CreateSecurityGroupRuleProtocolGetProtocolRetType) {
|
||||
res, _ = o.GetProtocolOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProtocolOk returns a tuple with the Protocol field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateSecurityGroupRuleProtocol) GetProtocolOk() (ret CreateSecurityGroupRuleProtocolGetProtocolRetType, ok bool) {
|
||||
return getCreateSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(o.Protocol)
|
||||
}
|
||||
|
||||
// HasProtocol returns a boolean if a field has been set.
|
||||
func (o *CreateSecurityGroupRuleProtocol) HasProtocol() bool {
|
||||
_, ok := o.GetProtocolOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProtocol gets a reference to the given CreateProtocol and assigns it to the Protocol field.
|
||||
func (o *CreateSecurityGroupRuleProtocol) SetProtocol(v CreateSecurityGroupRuleProtocolGetProtocolRetType) {
|
||||
setCreateSecurityGroupRuleProtocolGetProtocolAttributeType(&o.Protocol, v)
|
||||
}
|
||||
|
||||
func (o CreateSecurityGroupRuleProtocol) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateSecurityGroupRuleProtocolGetProtocolAttributeTypeOk(o.Protocol); ok {
|
||||
toSerialize["Protocol"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateSecurityGroupRuleProtocol struct {
|
||||
value *CreateSecurityGroupRuleProtocol
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupRuleProtocol) Get() *CreateSecurityGroupRuleProtocol {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupRuleProtocol) Set(val *CreateSecurityGroupRuleProtocol) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupRuleProtocol) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupRuleProtocol) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateSecurityGroupRuleProtocol(val *CreateSecurityGroupRuleProtocol) *NullableCreateSecurityGroupRuleProtocol {
|
||||
return &NullableCreateSecurityGroupRuleProtocol{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateSecurityGroupRuleProtocol) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateSecurityGroupRuleProtocol) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
129
pkg/iaasbeta/model_create_server_networking.go
Normal file
129
pkg/iaasbeta/model_create_server_networking.go
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateServerNetworking type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateServerNetworking{}
|
||||
|
||||
/*
|
||||
types and functions for networkId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateServerNetworkingGetNetworkIdAttributeType = *string
|
||||
|
||||
func getCreateServerNetworkingGetNetworkIdAttributeTypeOk(arg CreateServerNetworkingGetNetworkIdAttributeType) (ret CreateServerNetworkingGetNetworkIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateServerNetworkingGetNetworkIdAttributeType(arg *CreateServerNetworkingGetNetworkIdAttributeType, val CreateServerNetworkingGetNetworkIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateServerNetworkingGetNetworkIdArgType = string
|
||||
type CreateServerNetworkingGetNetworkIdRetType = string
|
||||
|
||||
// CreateServerNetworking The initial networking setup for the server creation with a network.
|
||||
type CreateServerNetworking struct {
|
||||
// Universally Unique Identifier (UUID).
|
||||
NetworkId CreateServerNetworkingGetNetworkIdAttributeType `json:"networkId,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateServerNetworking instantiates a new CreateServerNetworking 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 NewCreateServerNetworking() *CreateServerNetworking {
|
||||
this := CreateServerNetworking{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateServerNetworkingWithDefaults instantiates a new CreateServerNetworking 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 NewCreateServerNetworkingWithDefaults() *CreateServerNetworking {
|
||||
this := CreateServerNetworking{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNetworkId returns the NetworkId field value if set, zero value otherwise.
|
||||
func (o *CreateServerNetworking) GetNetworkId() (res CreateServerNetworkingGetNetworkIdRetType) {
|
||||
res, _ = o.GetNetworkIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNetworkIdOk returns a tuple with the NetworkId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateServerNetworking) GetNetworkIdOk() (ret CreateServerNetworkingGetNetworkIdRetType, ok bool) {
|
||||
return getCreateServerNetworkingGetNetworkIdAttributeTypeOk(o.NetworkId)
|
||||
}
|
||||
|
||||
// HasNetworkId returns a boolean if a field has been set.
|
||||
func (o *CreateServerNetworking) HasNetworkId() bool {
|
||||
_, ok := o.GetNetworkIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNetworkId gets a reference to the given string and assigns it to the NetworkId field.
|
||||
func (o *CreateServerNetworking) SetNetworkId(v CreateServerNetworkingGetNetworkIdRetType) {
|
||||
setCreateServerNetworkingGetNetworkIdAttributeType(&o.NetworkId, v)
|
||||
}
|
||||
|
||||
func (o CreateServerNetworking) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateServerNetworkingGetNetworkIdAttributeTypeOk(o.NetworkId); ok {
|
||||
toSerialize["NetworkId"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateServerNetworking struct {
|
||||
value *CreateServerNetworking
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateServerNetworking) Get() *CreateServerNetworking {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerNetworking) Set(val *CreateServerNetworking) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateServerNetworking) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerNetworking) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateServerNetworking(val *CreateServerNetworking) *NullableCreateServerNetworking {
|
||||
return &NullableCreateServerNetworking{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateServerNetworking) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerNetworking) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_server_networking_test.go
Normal file
11
pkg/iaasbeta/model_create_server_networking_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
128
pkg/iaasbeta/model_create_server_networking_with_nics.go
Normal file
128
pkg/iaasbeta/model_create_server_networking_with_nics.go
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateServerNetworkingWithNics type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateServerNetworkingWithNics{}
|
||||
|
||||
/*
|
||||
types and functions for nicIds
|
||||
*/
|
||||
|
||||
// isArray
|
||||
type CreateServerNetworkingWithNicsGetNicIdsAttributeType = *[]string
|
||||
type CreateServerNetworkingWithNicsGetNicIdsArgType = []string
|
||||
type CreateServerNetworkingWithNicsGetNicIdsRetType = []string
|
||||
|
||||
func getCreateServerNetworkingWithNicsGetNicIdsAttributeTypeOk(arg CreateServerNetworkingWithNicsGetNicIdsAttributeType) (ret CreateServerNetworkingWithNicsGetNicIdsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateServerNetworkingWithNicsGetNicIdsAttributeType(arg *CreateServerNetworkingWithNicsGetNicIdsAttributeType, val CreateServerNetworkingWithNicsGetNicIdsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateServerNetworkingWithNics The initial networking setup for the server creation with a network interface.
|
||||
type CreateServerNetworkingWithNics struct {
|
||||
// A list of UUIDs.
|
||||
NicIds CreateServerNetworkingWithNicsGetNicIdsAttributeType `json:"nicIds,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateServerNetworkingWithNics instantiates a new CreateServerNetworkingWithNics 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 NewCreateServerNetworkingWithNics() *CreateServerNetworkingWithNics {
|
||||
this := CreateServerNetworkingWithNics{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateServerNetworkingWithNicsWithDefaults instantiates a new CreateServerNetworkingWithNics 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 NewCreateServerNetworkingWithNicsWithDefaults() *CreateServerNetworkingWithNics {
|
||||
this := CreateServerNetworkingWithNics{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNicIds returns the NicIds field value if set, zero value otherwise.
|
||||
func (o *CreateServerNetworkingWithNics) GetNicIds() (res CreateServerNetworkingWithNicsGetNicIdsRetType) {
|
||||
res, _ = o.GetNicIdsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNicIdsOk returns a tuple with the NicIds field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateServerNetworkingWithNics) GetNicIdsOk() (ret CreateServerNetworkingWithNicsGetNicIdsRetType, ok bool) {
|
||||
return getCreateServerNetworkingWithNicsGetNicIdsAttributeTypeOk(o.NicIds)
|
||||
}
|
||||
|
||||
// HasNicIds returns a boolean if a field has been set.
|
||||
func (o *CreateServerNetworkingWithNics) HasNicIds() bool {
|
||||
_, ok := o.GetNicIdsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNicIds gets a reference to the given []string and assigns it to the NicIds field.
|
||||
func (o *CreateServerNetworkingWithNics) SetNicIds(v CreateServerNetworkingWithNicsGetNicIdsRetType) {
|
||||
setCreateServerNetworkingWithNicsGetNicIdsAttributeType(&o.NicIds, v)
|
||||
}
|
||||
|
||||
func (o CreateServerNetworkingWithNics) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateServerNetworkingWithNicsGetNicIdsAttributeTypeOk(o.NicIds); ok {
|
||||
toSerialize["NicIds"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateServerNetworkingWithNics struct {
|
||||
value *CreateServerNetworkingWithNics
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateServerNetworkingWithNics) Get() *CreateServerNetworkingWithNics {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerNetworkingWithNics) Set(val *CreateServerNetworkingWithNics) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateServerNetworkingWithNics) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerNetworkingWithNics) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateServerNetworkingWithNics(val *CreateServerNetworkingWithNics) *NullableCreateServerNetworkingWithNics {
|
||||
return &NullableCreateServerNetworkingWithNics{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateServerNetworkingWithNics) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerNetworkingWithNics) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
1229
pkg/iaasbeta/model_create_server_payload.go
Normal file
1229
pkg/iaasbeta/model_create_server_payload.go
Normal file
File diff suppressed because it is too large
Load diff
125
pkg/iaasbeta/model_create_server_payload_all_of.go
Normal file
125
pkg/iaasbeta/model_create_server_payload_all_of.go
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateServerPayloadAllOf type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateServerPayloadAllOf{}
|
||||
|
||||
/*
|
||||
types and functions for networking
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateServerPayloadAllOfGetNetworkingAttributeType = *CreateServerPayloadAllOfNetworking
|
||||
type CreateServerPayloadAllOfGetNetworkingArgType = CreateServerPayloadAllOfNetworking
|
||||
type CreateServerPayloadAllOfGetNetworkingRetType = CreateServerPayloadAllOfNetworking
|
||||
|
||||
func getCreateServerPayloadAllOfGetNetworkingAttributeTypeOk(arg CreateServerPayloadAllOfGetNetworkingAttributeType) (ret CreateServerPayloadAllOfGetNetworkingRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateServerPayloadAllOfGetNetworkingAttributeType(arg *CreateServerPayloadAllOfGetNetworkingAttributeType, val CreateServerPayloadAllOfGetNetworkingRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateServerPayloadAllOf struct for CreateServerPayloadAllOf
|
||||
type CreateServerPayloadAllOf struct {
|
||||
// REQUIRED
|
||||
Networking CreateServerPayloadAllOfGetNetworkingAttributeType `json:"networking" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateServerPayloadAllOf CreateServerPayloadAllOf
|
||||
|
||||
// NewCreateServerPayloadAllOf instantiates a new CreateServerPayloadAllOf 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 NewCreateServerPayloadAllOf(networking CreateServerPayloadAllOfGetNetworkingArgType) *CreateServerPayloadAllOf {
|
||||
this := CreateServerPayloadAllOf{}
|
||||
setCreateServerPayloadAllOfGetNetworkingAttributeType(&this.Networking, networking)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateServerPayloadAllOfWithDefaults instantiates a new CreateServerPayloadAllOf 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 NewCreateServerPayloadAllOfWithDefaults() *CreateServerPayloadAllOf {
|
||||
this := CreateServerPayloadAllOf{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetNetworking returns the Networking field value
|
||||
func (o *CreateServerPayloadAllOf) GetNetworking() (ret CreateServerPayloadAllOfGetNetworkingRetType) {
|
||||
ret, _ = o.GetNetworkingOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetNetworkingOk returns a tuple with the Networking field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateServerPayloadAllOf) GetNetworkingOk() (ret CreateServerPayloadAllOfGetNetworkingRetType, ok bool) {
|
||||
return getCreateServerPayloadAllOfGetNetworkingAttributeTypeOk(o.Networking)
|
||||
}
|
||||
|
||||
// SetNetworking sets field value
|
||||
func (o *CreateServerPayloadAllOf) SetNetworking(v CreateServerPayloadAllOfGetNetworkingRetType) {
|
||||
setCreateServerPayloadAllOfGetNetworkingAttributeType(&o.Networking, v)
|
||||
}
|
||||
|
||||
func (o CreateServerPayloadAllOf) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateServerPayloadAllOfGetNetworkingAttributeTypeOk(o.Networking); ok {
|
||||
toSerialize["Networking"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateServerPayloadAllOf struct {
|
||||
value *CreateServerPayloadAllOf
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateServerPayloadAllOf) Get() *CreateServerPayloadAllOf {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerPayloadAllOf) Set(val *CreateServerPayloadAllOf) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateServerPayloadAllOf) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerPayloadAllOf) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateServerPayloadAllOf(val *CreateServerPayloadAllOf) *NullableCreateServerPayloadAllOf {
|
||||
return &NullableCreateServerPayloadAllOf{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateServerPayloadAllOf) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerPayloadAllOf) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
144
pkg/iaasbeta/model_create_server_payload_all_of_networking.go
Normal file
144
pkg/iaasbeta/model_create_server_payload_all_of_networking.go
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// CreateServerPayloadAllOfNetworking - struct for CreateServerPayloadAllOfNetworking
|
||||
type CreateServerPayloadAllOfNetworking struct {
|
||||
CreateServerNetworking *CreateServerNetworking
|
||||
CreateServerNetworkingWithNics *CreateServerNetworkingWithNics
|
||||
}
|
||||
|
||||
// CreateServerNetworkingAsCreateServerPayloadAllOfNetworking is a convenience function that returns CreateServerNetworking wrapped in CreateServerPayloadAllOfNetworking
|
||||
func CreateServerNetworkingAsCreateServerPayloadAllOfNetworking(v *CreateServerNetworking) CreateServerPayloadAllOfNetworking {
|
||||
return CreateServerPayloadAllOfNetworking{
|
||||
CreateServerNetworking: v,
|
||||
}
|
||||
}
|
||||
|
||||
// CreateServerNetworkingWithNicsAsCreateServerPayloadAllOfNetworking is a convenience function that returns CreateServerNetworkingWithNics wrapped in CreateServerPayloadAllOfNetworking
|
||||
func CreateServerNetworkingWithNicsAsCreateServerPayloadAllOfNetworking(v *CreateServerNetworkingWithNics) CreateServerPayloadAllOfNetworking {
|
||||
return CreateServerPayloadAllOfNetworking{
|
||||
CreateServerNetworkingWithNics: v,
|
||||
}
|
||||
}
|
||||
|
||||
// Unmarshal JSON data into one of the pointers in the struct
|
||||
func (dst *CreateServerPayloadAllOfNetworking) UnmarshalJSON(data []byte) error {
|
||||
var err error
|
||||
match := 0
|
||||
// Workaround until upstream issue is fixed:
|
||||
// https://github.com/OpenAPITools/openapi-generator/issues/21751
|
||||
// Tracking issue on our side: https://jira.schwarz/browse/STACKITSDK-226
|
||||
// try to unmarshal data into CreateServerNetworking
|
||||
dstCreateServerPayloadAllOfNetworking1 := &CreateServerPayloadAllOfNetworking{}
|
||||
err = json.Unmarshal(data, &dstCreateServerPayloadAllOfNetworking1.CreateServerNetworking)
|
||||
if err == nil {
|
||||
jsonCreateServerNetworking, _ := json.Marshal(&dstCreateServerPayloadAllOfNetworking1.CreateServerNetworking)
|
||||
if string(jsonCreateServerNetworking) != "{}" { // empty struct
|
||||
dst.CreateServerNetworking = dstCreateServerPayloadAllOfNetworking1.CreateServerNetworking
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
// try to unmarshal data into CreateServerNetworkingWithNics
|
||||
dstCreateServerPayloadAllOfNetworking2 := &CreateServerPayloadAllOfNetworking{}
|
||||
err = json.Unmarshal(data, &dstCreateServerPayloadAllOfNetworking2.CreateServerNetworkingWithNics)
|
||||
if err == nil {
|
||||
jsonCreateServerNetworkingWithNics, _ := json.Marshal(&dstCreateServerPayloadAllOfNetworking2.CreateServerNetworkingWithNics)
|
||||
if string(jsonCreateServerNetworkingWithNics) != "{}" { // empty struct
|
||||
dst.CreateServerNetworkingWithNics = dstCreateServerPayloadAllOfNetworking2.CreateServerNetworkingWithNics
|
||||
match++
|
||||
}
|
||||
}
|
||||
|
||||
if match > 1 { // more than 1 match
|
||||
// reset to nil
|
||||
dst.CreateServerNetworking = nil
|
||||
dst.CreateServerNetworkingWithNics = nil
|
||||
|
||||
return fmt.Errorf("data matches more than one schema in oneOf(CreateServerPayloadAllOfNetworking)")
|
||||
} else if match == 1 {
|
||||
return nil // exactly one match
|
||||
} else { // no match
|
||||
return fmt.Errorf("data failed to match schemas in oneOf(CreateServerPayloadAllOfNetworking)")
|
||||
}
|
||||
}
|
||||
|
||||
// Marshal data from the first non-nil pointers in the struct to JSON
|
||||
func (src CreateServerPayloadAllOfNetworking) MarshalJSON() ([]byte, error) {
|
||||
if src.CreateServerNetworking != nil {
|
||||
return json.Marshal(&src.CreateServerNetworking)
|
||||
}
|
||||
|
||||
if src.CreateServerNetworkingWithNics != nil {
|
||||
return json.Marshal(&src.CreateServerNetworkingWithNics)
|
||||
}
|
||||
|
||||
return []byte("{}"), nil // no data in oneOf schemas => empty JSON object
|
||||
}
|
||||
|
||||
// Get the actual instance
|
||||
func (obj *CreateServerPayloadAllOfNetworking) GetActualInstance() interface{} {
|
||||
if obj == nil {
|
||||
return nil
|
||||
}
|
||||
if obj.CreateServerNetworking != nil {
|
||||
return obj.CreateServerNetworking
|
||||
}
|
||||
|
||||
if obj.CreateServerNetworkingWithNics != nil {
|
||||
return obj.CreateServerNetworkingWithNics
|
||||
}
|
||||
|
||||
// all schemas are nil
|
||||
return nil
|
||||
}
|
||||
|
||||
type NullableCreateServerPayloadAllOfNetworking struct {
|
||||
value *CreateServerPayloadAllOfNetworking
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateServerPayloadAllOfNetworking) Get() *CreateServerPayloadAllOfNetworking {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerPayloadAllOfNetworking) Set(val *CreateServerPayloadAllOfNetworking) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateServerPayloadAllOfNetworking) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerPayloadAllOfNetworking) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateServerPayloadAllOfNetworking(val *CreateServerPayloadAllOfNetworking) *NullableCreateServerPayloadAllOfNetworking {
|
||||
return &NullableCreateServerPayloadAllOfNetworking{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateServerPayloadAllOfNetworking) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateServerPayloadAllOfNetworking) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
// isOneOf
|
||||
|
||||
func TestCreateServerPayloadAllOfNetworking_UnmarshalJSON(t *testing.T) {
|
||||
type args struct {
|
||||
src []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
wantErr bool
|
||||
}{}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
v := &CreateServerPayloadAllOfNetworking{}
|
||||
if err := v.UnmarshalJSON(tt.args.src); (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalJSON() error = %v, wantErr %v", err, tt.wantErr)
|
||||
}
|
||||
marshalJson, err := v.MarshalJSON()
|
||||
if err != nil {
|
||||
t.Fatalf("failed marshalling CreateServerPayloadAllOfNetworking: %v", err)
|
||||
}
|
||||
if string(marshalJson) != string(tt.args.src) {
|
||||
t.Fatalf("wanted %s, get %s", tt.args.src, marshalJson)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_server_payload_all_of_test.go
Normal file
11
pkg/iaasbeta/model_create_server_payload_all_of_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
11
pkg/iaasbeta/model_create_server_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_server_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
851
pkg/iaasbeta/model_create_volume_payload.go
Normal file
851
pkg/iaasbeta/model_create_volume_payload.go
Normal file
|
|
@ -0,0 +1,851 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the CreateVolumePayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateVolumePayload{}
|
||||
|
||||
/*
|
||||
types and functions for availabilityZone
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetAvailabilityZoneAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(arg CreateVolumePayloadGetAvailabilityZoneAttributeType) (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetAvailabilityZoneAttributeType(arg *CreateVolumePayloadGetAvailabilityZoneAttributeType, val CreateVolumePayloadGetAvailabilityZoneRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetAvailabilityZoneArgType = string
|
||||
type CreateVolumePayloadGetAvailabilityZoneRetType = string
|
||||
|
||||
/*
|
||||
types and functions for bootable
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateVolumePayloadgetBootableAttributeType = *bool
|
||||
type CreateVolumePayloadgetBootableArgType = bool
|
||||
type CreateVolumePayloadgetBootableRetType = bool
|
||||
|
||||
func getCreateVolumePayloadgetBootableAttributeTypeOk(arg CreateVolumePayloadgetBootableAttributeType) (ret CreateVolumePayloadgetBootableRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadgetBootableAttributeType(arg *CreateVolumePayloadgetBootableAttributeType, val CreateVolumePayloadgetBootableRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateVolumePayloadGetCreatedAtAttributeType = *time.Time
|
||||
type CreateVolumePayloadGetCreatedAtArgType = time.Time
|
||||
type CreateVolumePayloadGetCreatedAtRetType = time.Time
|
||||
|
||||
func getCreateVolumePayloadGetCreatedAtAttributeTypeOk(arg CreateVolumePayloadGetCreatedAtAttributeType) (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetCreatedAtAttributeType(arg *CreateVolumePayloadGetCreatedAtAttributeType, val CreateVolumePayloadGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for description
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetDescriptionAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetDescriptionAttributeTypeOk(arg CreateVolumePayloadGetDescriptionAttributeType) (ret CreateVolumePayloadGetDescriptionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetDescriptionAttributeType(arg *CreateVolumePayloadGetDescriptionAttributeType, val CreateVolumePayloadGetDescriptionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetDescriptionArgType = string
|
||||
type CreateVolumePayloadGetDescriptionRetType = string
|
||||
|
||||
/*
|
||||
types and functions for encrypted
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateVolumePayloadgetEncryptedAttributeType = *bool
|
||||
type CreateVolumePayloadgetEncryptedArgType = bool
|
||||
type CreateVolumePayloadgetEncryptedRetType = bool
|
||||
|
||||
func getCreateVolumePayloadgetEncryptedAttributeTypeOk(arg CreateVolumePayloadgetEncryptedAttributeType) (ret CreateVolumePayloadgetEncryptedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadgetEncryptedAttributeType(arg *CreateVolumePayloadgetEncryptedAttributeType, val CreateVolumePayloadgetEncryptedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for encryptionParameters
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateVolumePayloadGetEncryptionParametersAttributeType = *VolumeEncryptionParameter
|
||||
type CreateVolumePayloadGetEncryptionParametersArgType = VolumeEncryptionParameter
|
||||
type CreateVolumePayloadGetEncryptionParametersRetType = VolumeEncryptionParameter
|
||||
|
||||
func getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(arg CreateVolumePayloadGetEncryptionParametersAttributeType) (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetEncryptionParametersAttributeType(arg *CreateVolumePayloadGetEncryptionParametersAttributeType, val CreateVolumePayloadGetEncryptionParametersRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetIdAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetIdAttributeTypeOk(arg CreateVolumePayloadGetIdAttributeType) (ret CreateVolumePayloadGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetIdAttributeType(arg *CreateVolumePayloadGetIdAttributeType, val CreateVolumePayloadGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetIdArgType = string
|
||||
type CreateVolumePayloadGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for imageConfig
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateVolumePayloadGetImageConfigAttributeType = *ImageConfig
|
||||
type CreateVolumePayloadGetImageConfigArgType = ImageConfig
|
||||
type CreateVolumePayloadGetImageConfigRetType = ImageConfig
|
||||
|
||||
func getCreateVolumePayloadGetImageConfigAttributeTypeOk(arg CreateVolumePayloadGetImageConfigAttributeType) (ret CreateVolumePayloadGetImageConfigRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetImageConfigAttributeType(arg *CreateVolumePayloadGetImageConfigAttributeType, val CreateVolumePayloadGetImageConfigRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateVolumePayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateVolumePayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateVolumePayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateVolumePayloadGetLabelsAttributeTypeOk(arg CreateVolumePayloadGetLabelsAttributeType) (ret CreateVolumePayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetLabelsAttributeType(arg *CreateVolumePayloadGetLabelsAttributeType, val CreateVolumePayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetNameAttributeTypeOk(arg CreateVolumePayloadGetNameAttributeType) (ret CreateVolumePayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetNameAttributeType(arg *CreateVolumePayloadGetNameAttributeType, val CreateVolumePayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetNameArgType = string
|
||||
type CreateVolumePayloadGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for performanceClass
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetPerformanceClassAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(arg CreateVolumePayloadGetPerformanceClassAttributeType) (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetPerformanceClassAttributeType(arg *CreateVolumePayloadGetPerformanceClassAttributeType, val CreateVolumePayloadGetPerformanceClassRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetPerformanceClassArgType = string
|
||||
type CreateVolumePayloadGetPerformanceClassRetType = string
|
||||
|
||||
/*
|
||||
types and functions for serverId
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetServerIdAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetServerIdAttributeTypeOk(arg CreateVolumePayloadGetServerIdAttributeType) (ret CreateVolumePayloadGetServerIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetServerIdAttributeType(arg *CreateVolumePayloadGetServerIdAttributeType, val CreateVolumePayloadGetServerIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetServerIdArgType = string
|
||||
type CreateVolumePayloadGetServerIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type CreateVolumePayloadGetSizeAttributeType = *int64
|
||||
type CreateVolumePayloadGetSizeArgType = int64
|
||||
type CreateVolumePayloadGetSizeRetType = int64
|
||||
|
||||
func getCreateVolumePayloadGetSizeAttributeTypeOk(arg CreateVolumePayloadGetSizeAttributeType) (ret CreateVolumePayloadGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetSizeAttributeType(arg *CreateVolumePayloadGetSizeAttributeType, val CreateVolumePayloadGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for source
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateVolumePayloadGetSourceAttributeType = *VolumeSource
|
||||
type CreateVolumePayloadGetSourceArgType = VolumeSource
|
||||
type CreateVolumePayloadGetSourceRetType = VolumeSource
|
||||
|
||||
func getCreateVolumePayloadGetSourceAttributeTypeOk(arg CreateVolumePayloadGetSourceAttributeType) (ret CreateVolumePayloadGetSourceRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetSourceAttributeType(arg *CreateVolumePayloadGetSourceAttributeType, val CreateVolumePayloadGetSourceRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateVolumePayloadGetStatusAttributeType = *string
|
||||
|
||||
func getCreateVolumePayloadGetStatusAttributeTypeOk(arg CreateVolumePayloadGetStatusAttributeType) (ret CreateVolumePayloadGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetStatusAttributeType(arg *CreateVolumePayloadGetStatusAttributeType, val CreateVolumePayloadGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateVolumePayloadGetStatusArgType = string
|
||||
type CreateVolumePayloadGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type CreateVolumePayloadGetUpdatedAtAttributeType = *time.Time
|
||||
type CreateVolumePayloadGetUpdatedAtArgType = time.Time
|
||||
type CreateVolumePayloadGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(arg CreateVolumePayloadGetUpdatedAtAttributeType) (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateVolumePayloadGetUpdatedAtAttributeType(arg *CreateVolumePayloadGetUpdatedAtAttributeType, val CreateVolumePayloadGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// CreateVolumePayload Object that represents a volume and its parameters. Volumes sized up to 16000GB are supported.
|
||||
type CreateVolumePayload struct {
|
||||
// Object that represents an availability zone.
|
||||
// REQUIRED
|
||||
AvailabilityZone CreateVolumePayloadGetAvailabilityZoneAttributeType `json:"availabilityZone" required:"true"`
|
||||
// Indicates if a volume is bootable.
|
||||
Bootable CreateVolumePayloadgetBootableAttributeType `json:"bootable,omitempty"`
|
||||
// Date-time when resource was created.
|
||||
CreatedAt CreateVolumePayloadGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Description Object. Allows string up to 255 Characters.
|
||||
Description CreateVolumePayloadGetDescriptionAttributeType `json:"description,omitempty"`
|
||||
// Indicates if a volume is encrypted.
|
||||
Encrypted CreateVolumePayloadgetEncryptedAttributeType `json:"encrypted,omitempty"`
|
||||
EncryptionParameters CreateVolumePayloadGetEncryptionParametersAttributeType `json:"encryptionParameters,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id CreateVolumePayloadGetIdAttributeType `json:"id,omitempty"`
|
||||
ImageConfig CreateVolumePayloadGetImageConfigAttributeType `json:"imageConfig,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels CreateVolumePayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
Name CreateVolumePayloadGetNameAttributeType `json:"name,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
PerformanceClass CreateVolumePayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
ServerId CreateVolumePayloadGetServerIdAttributeType `json:"serverId,omitempty"`
|
||||
// Size in Gigabyte.
|
||||
Size CreateVolumePayloadGetSizeAttributeType `json:"size,omitempty"`
|
||||
Source CreateVolumePayloadGetSourceAttributeType `json:"source,omitempty"`
|
||||
// The status of a volume object. Possible values: `ATTACHED`, `ATTACHING`, `AVAILABLE`, `AWAITING-TRANSFER`, `BACKING-UP`, `CREATING`, `DELETED`, `DELETING`, `DETACHING`, `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, `MAINTENANCE`, `RESERVED`, `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`.
|
||||
Status CreateVolumePayloadGetStatusAttributeType `json:"status,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt CreateVolumePayloadGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _CreateVolumePayload CreateVolumePayload
|
||||
|
||||
// NewCreateVolumePayload instantiates a new CreateVolumePayload 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 NewCreateVolumePayload(availabilityZone CreateVolumePayloadGetAvailabilityZoneArgType) *CreateVolumePayload {
|
||||
this := CreateVolumePayload{}
|
||||
setCreateVolumePayloadGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateVolumePayloadWithDefaults instantiates a new CreateVolumePayload 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 NewCreateVolumePayloadWithDefaults() *CreateVolumePayload {
|
||||
this := CreateVolumePayload{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAvailabilityZone returns the AvailabilityZone field value
|
||||
func (o *CreateVolumePayload) GetAvailabilityZone() (ret CreateVolumePayloadGetAvailabilityZoneRetType) {
|
||||
ret, _ = o.GetAvailabilityZoneOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetAvailabilityZoneOk() (ret CreateVolumePayloadGetAvailabilityZoneRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
|
||||
}
|
||||
|
||||
// SetAvailabilityZone sets field value
|
||||
func (o *CreateVolumePayload) SetAvailabilityZone(v CreateVolumePayloadGetAvailabilityZoneRetType) {
|
||||
setCreateVolumePayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
|
||||
}
|
||||
|
||||
// GetBootable returns the Bootable field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetBootable() (res CreateVolumePayloadgetBootableRetType) {
|
||||
res, _ = o.GetBootableOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetBootableOk returns a tuple with the Bootable field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetBootableOk() (ret CreateVolumePayloadgetBootableRetType, ok bool) {
|
||||
return getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable)
|
||||
}
|
||||
|
||||
// HasBootable returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasBootable() bool {
|
||||
_, ok := o.GetBootableOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetBootable gets a reference to the given bool and assigns it to the Bootable field.
|
||||
func (o *CreateVolumePayload) SetBootable(v CreateVolumePayloadgetBootableRetType) {
|
||||
setCreateVolumePayloadgetBootableAttributeType(&o.Bootable, v)
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetCreatedAt() (res CreateVolumePayloadGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetCreatedAtOk() (ret CreateVolumePayloadGetCreatedAtRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *CreateVolumePayload) SetCreatedAt(v CreateVolumePayloadGetCreatedAtRetType) {
|
||||
setCreateVolumePayloadGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDescription returns the Description field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetDescription() (res CreateVolumePayloadGetDescriptionRetType) {
|
||||
res, _ = o.GetDescriptionOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetDescriptionOk() (ret CreateVolumePayloadGetDescriptionRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description)
|
||||
}
|
||||
|
||||
// HasDescription returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasDescription() bool {
|
||||
_, ok := o.GetDescriptionOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
||||
func (o *CreateVolumePayload) SetDescription(v CreateVolumePayloadGetDescriptionRetType) {
|
||||
setCreateVolumePayloadGetDescriptionAttributeType(&o.Description, v)
|
||||
}
|
||||
|
||||
// GetEncrypted returns the Encrypted field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetEncrypted() (res CreateVolumePayloadgetEncryptedRetType) {
|
||||
res, _ = o.GetEncryptedOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEncryptedOk returns a tuple with the Encrypted field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetEncryptedOk() (ret CreateVolumePayloadgetEncryptedRetType, ok bool) {
|
||||
return getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted)
|
||||
}
|
||||
|
||||
// HasEncrypted returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasEncrypted() bool {
|
||||
_, ok := o.GetEncryptedOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEncrypted gets a reference to the given bool and assigns it to the Encrypted field.
|
||||
func (o *CreateVolumePayload) SetEncrypted(v CreateVolumePayloadgetEncryptedRetType) {
|
||||
setCreateVolumePayloadgetEncryptedAttributeType(&o.Encrypted, v)
|
||||
}
|
||||
|
||||
// GetEncryptionParameters returns the EncryptionParameters field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetEncryptionParameters() (res CreateVolumePayloadGetEncryptionParametersRetType) {
|
||||
res, _ = o.GetEncryptionParametersOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetEncryptionParametersOk returns a tuple with the EncryptionParameters field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetEncryptionParametersOk() (ret CreateVolumePayloadGetEncryptionParametersRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters)
|
||||
}
|
||||
|
||||
// HasEncryptionParameters returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasEncryptionParameters() bool {
|
||||
_, ok := o.GetEncryptionParametersOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetEncryptionParameters gets a reference to the given VolumeEncryptionParameter and assigns it to the EncryptionParameters field.
|
||||
func (o *CreateVolumePayload) SetEncryptionParameters(v CreateVolumePayloadGetEncryptionParametersRetType) {
|
||||
setCreateVolumePayloadGetEncryptionParametersAttributeType(&o.EncryptionParameters, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetId() (res CreateVolumePayloadGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetIdOk() (ret CreateVolumePayloadGetIdRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *CreateVolumePayload) SetId(v CreateVolumePayloadGetIdRetType) {
|
||||
setCreateVolumePayloadGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetImageConfig returns the ImageConfig field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetImageConfig() (res CreateVolumePayloadGetImageConfigRetType) {
|
||||
res, _ = o.GetImageConfigOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetImageConfigOk returns a tuple with the ImageConfig field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetImageConfigOk() (ret CreateVolumePayloadGetImageConfigRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig)
|
||||
}
|
||||
|
||||
// HasImageConfig returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasImageConfig() bool {
|
||||
_, ok := o.GetImageConfigOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetImageConfig gets a reference to the given ImageConfig and assigns it to the ImageConfig field.
|
||||
func (o *CreateVolumePayload) SetImageConfig(v CreateVolumePayloadGetImageConfigRetType) {
|
||||
setCreateVolumePayloadGetImageConfigAttributeType(&o.ImageConfig, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetLabels() (res CreateVolumePayloadGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetLabelsOk() (ret CreateVolumePayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *CreateVolumePayload) SetLabels(v CreateVolumePayloadGetLabelsRetType) {
|
||||
setCreateVolumePayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetName() (res CreateVolumePayloadGetNameRetType) {
|
||||
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 *CreateVolumePayload) GetNameOk() (ret CreateVolumePayloadGetNameRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *CreateVolumePayload) SetName(v CreateVolumePayloadGetNameRetType) {
|
||||
setCreateVolumePayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetPerformanceClass() (res CreateVolumePayloadGetPerformanceClassRetType) {
|
||||
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 *CreateVolumePayload) GetPerformanceClassOk() (ret CreateVolumePayloadGetPerformanceClassRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
|
||||
}
|
||||
|
||||
// HasPerformanceClass returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasPerformanceClass() bool {
|
||||
_, ok := o.GetPerformanceClassOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
|
||||
func (o *CreateVolumePayload) SetPerformanceClass(v CreateVolumePayloadGetPerformanceClassRetType) {
|
||||
setCreateVolumePayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
|
||||
}
|
||||
|
||||
// GetServerId returns the ServerId field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetServerId() (res CreateVolumePayloadGetServerIdRetType) {
|
||||
res, _ = o.GetServerIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetServerIdOk returns a tuple with the ServerId field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetServerIdOk() (ret CreateVolumePayloadGetServerIdRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId)
|
||||
}
|
||||
|
||||
// HasServerId returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasServerId() bool {
|
||||
_, ok := o.GetServerIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetServerId gets a reference to the given string and assigns it to the ServerId field.
|
||||
func (o *CreateVolumePayload) SetServerId(v CreateVolumePayloadGetServerIdRetType) {
|
||||
setCreateVolumePayloadGetServerIdAttributeType(&o.ServerId, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetSize() (res CreateVolumePayloadGetSizeRetType) {
|
||||
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 *CreateVolumePayload) GetSizeOk() (ret CreateVolumePayloadGetSizeRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasSize() bool {
|
||||
_, ok := o.GetSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||
func (o *CreateVolumePayload) SetSize(v CreateVolumePayloadGetSizeRetType) {
|
||||
setCreateVolumePayloadGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetSource returns the Source field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetSource() (res CreateVolumePayloadGetSourceRetType) {
|
||||
res, _ = o.GetSourceOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetSourceOk() (ret CreateVolumePayloadGetSourceRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source)
|
||||
}
|
||||
|
||||
// HasSource returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasSource() bool {
|
||||
_, ok := o.GetSourceOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSource gets a reference to the given VolumeSource and assigns it to the Source field.
|
||||
func (o *CreateVolumePayload) SetSource(v CreateVolumePayloadGetSourceRetType) {
|
||||
setCreateVolumePayloadGetSourceAttributeType(&o.Source, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetStatus() (res CreateVolumePayloadGetStatusRetType) {
|
||||
res, _ = o.GetStatusOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetStatusOk() (ret CreateVolumePayloadGetStatusRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasStatus() bool {
|
||||
_, ok := o.GetStatusOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *CreateVolumePayload) SetStatus(v CreateVolumePayloadGetStatusRetType) {
|
||||
setCreateVolumePayloadGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *CreateVolumePayload) GetUpdatedAt() (res CreateVolumePayloadGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateVolumePayload) GetUpdatedAtOk() (ret CreateVolumePayloadGetUpdatedAtRetType, ok bool) {
|
||||
return getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *CreateVolumePayload) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *CreateVolumePayload) SetUpdatedAt(v CreateVolumePayloadGetUpdatedAtRetType) {
|
||||
setCreateVolumePayloadGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o CreateVolumePayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateVolumePayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
|
||||
toSerialize["AvailabilityZone"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadgetBootableAttributeTypeOk(o.Bootable); ok {
|
||||
toSerialize["Bootable"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetDescriptionAttributeTypeOk(o.Description); ok {
|
||||
toSerialize["Description"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadgetEncryptedAttributeTypeOk(o.Encrypted); ok {
|
||||
toSerialize["Encrypted"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetEncryptionParametersAttributeTypeOk(o.EncryptionParameters); ok {
|
||||
toSerialize["EncryptionParameters"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetImageConfigAttributeTypeOk(o.ImageConfig); ok {
|
||||
toSerialize["ImageConfig"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
|
||||
toSerialize["PerformanceClass"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetServerIdAttributeTypeOk(o.ServerId); ok {
|
||||
toSerialize["ServerId"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetSourceAttributeTypeOk(o.Source); ok {
|
||||
toSerialize["Source"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getCreateVolumePayloadGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateVolumePayload struct {
|
||||
value *CreateVolumePayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateVolumePayload) Get() *CreateVolumePayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateVolumePayload) Set(val *CreateVolumePayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateVolumePayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateVolumePayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateVolumePayload(val *CreateVolumePayload) *NullableCreateVolumePayload {
|
||||
return &NullableCreateVolumePayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateVolumePayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateVolumePayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_create_volume_payload_test.go
Normal file
11
pkg/iaasbeta/model_create_volume_payload_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
171
pkg/iaasbeta/model_destination_cidrv4.go
Normal file
171
pkg/iaasbeta/model_destination_cidrv4.go
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DestinationCIDRv4 type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DestinationCIDRv4{}
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DestinationCIDRv4GetTypeAttributeType = *string
|
||||
|
||||
func getDestinationCIDRv4GetTypeAttributeTypeOk(arg DestinationCIDRv4GetTypeAttributeType) (ret DestinationCIDRv4GetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDestinationCIDRv4GetTypeAttributeType(arg *DestinationCIDRv4GetTypeAttributeType, val DestinationCIDRv4GetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DestinationCIDRv4GetTypeArgType = string
|
||||
type DestinationCIDRv4GetTypeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for value
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DestinationCIDRv4GetValueAttributeType = *string
|
||||
|
||||
func getDestinationCIDRv4GetValueAttributeTypeOk(arg DestinationCIDRv4GetValueAttributeType) (ret DestinationCIDRv4GetValueRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDestinationCIDRv4GetValueAttributeType(arg *DestinationCIDRv4GetValueAttributeType, val DestinationCIDRv4GetValueRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DestinationCIDRv4GetValueArgType = string
|
||||
type DestinationCIDRv4GetValueRetType = string
|
||||
|
||||
// DestinationCIDRv4 IPv4 Classless Inter-Domain Routing (CIDR) Object.
|
||||
type DestinationCIDRv4 struct {
|
||||
// REQUIRED
|
||||
Type DestinationCIDRv4GetTypeAttributeType `json:"type" required:"true"`
|
||||
// An CIDRv4 string.
|
||||
// REQUIRED
|
||||
Value DestinationCIDRv4GetValueAttributeType `json:"value" required:"true"`
|
||||
}
|
||||
|
||||
type _DestinationCIDRv4 DestinationCIDRv4
|
||||
|
||||
// NewDestinationCIDRv4 instantiates a new DestinationCIDRv4 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 NewDestinationCIDRv4(types DestinationCIDRv4GetTypeArgType, value DestinationCIDRv4GetValueArgType) *DestinationCIDRv4 {
|
||||
this := DestinationCIDRv4{}
|
||||
setDestinationCIDRv4GetTypeAttributeType(&this.Type, types)
|
||||
setDestinationCIDRv4GetValueAttributeType(&this.Value, value)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDestinationCIDRv4WithDefaults instantiates a new DestinationCIDRv4 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 NewDestinationCIDRv4WithDefaults() *DestinationCIDRv4 {
|
||||
this := DestinationCIDRv4{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *DestinationCIDRv4) GetType() (ret DestinationCIDRv4GetTypeRetType) {
|
||||
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 *DestinationCIDRv4) GetTypeOk() (ret DestinationCIDRv4GetTypeRetType, ok bool) {
|
||||
return getDestinationCIDRv4GetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *DestinationCIDRv4) SetType(v DestinationCIDRv4GetTypeRetType) {
|
||||
setDestinationCIDRv4GetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
// GetValue returns the Value field value
|
||||
func (o *DestinationCIDRv4) GetValue() (ret DestinationCIDRv4GetValueRetType) {
|
||||
ret, _ = o.GetValueOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetValueOk returns a tuple with the Value field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DestinationCIDRv4) GetValueOk() (ret DestinationCIDRv4GetValueRetType, ok bool) {
|
||||
return getDestinationCIDRv4GetValueAttributeTypeOk(o.Value)
|
||||
}
|
||||
|
||||
// SetValue sets field value
|
||||
func (o *DestinationCIDRv4) SetValue(v DestinationCIDRv4GetValueRetType) {
|
||||
setDestinationCIDRv4GetValueAttributeType(&o.Value, v)
|
||||
}
|
||||
|
||||
func (o DestinationCIDRv4) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getDestinationCIDRv4GetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
if val, ok := getDestinationCIDRv4GetValueAttributeTypeOk(o.Value); ok {
|
||||
toSerialize["Value"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableDestinationCIDRv4 struct {
|
||||
value *DestinationCIDRv4
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDestinationCIDRv4) Get() *DestinationCIDRv4 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDestinationCIDRv4) Set(val *DestinationCIDRv4) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDestinationCIDRv4) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDestinationCIDRv4) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDestinationCIDRv4(val *DestinationCIDRv4) *NullableDestinationCIDRv4 {
|
||||
return &NullableDestinationCIDRv4{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDestinationCIDRv4) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDestinationCIDRv4) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_destination_cidrv4_test.go
Normal file
11
pkg/iaasbeta/model_destination_cidrv4_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
171
pkg/iaasbeta/model_destination_cidrv6.go
Normal file
171
pkg/iaasbeta/model_destination_cidrv6.go
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the DestinationCIDRv6 type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &DestinationCIDRv6{}
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DestinationCIDRv6GetTypeAttributeType = *string
|
||||
|
||||
func getDestinationCIDRv6GetTypeAttributeTypeOk(arg DestinationCIDRv6GetTypeAttributeType) (ret DestinationCIDRv6GetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDestinationCIDRv6GetTypeAttributeType(arg *DestinationCIDRv6GetTypeAttributeType, val DestinationCIDRv6GetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DestinationCIDRv6GetTypeArgType = string
|
||||
type DestinationCIDRv6GetTypeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for value
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type DestinationCIDRv6GetValueAttributeType = *string
|
||||
|
||||
func getDestinationCIDRv6GetValueAttributeTypeOk(arg DestinationCIDRv6GetValueAttributeType) (ret DestinationCIDRv6GetValueRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setDestinationCIDRv6GetValueAttributeType(arg *DestinationCIDRv6GetValueAttributeType, val DestinationCIDRv6GetValueRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type DestinationCIDRv6GetValueArgType = string
|
||||
type DestinationCIDRv6GetValueRetType = string
|
||||
|
||||
// DestinationCIDRv6 IPv6 Classless Inter-Domain Routing (CIDR) Object.
|
||||
type DestinationCIDRv6 struct {
|
||||
// REQUIRED
|
||||
Type DestinationCIDRv6GetTypeAttributeType `json:"type" required:"true"`
|
||||
// An CIDRv6 string.
|
||||
// REQUIRED
|
||||
Value DestinationCIDRv6GetValueAttributeType `json:"value" required:"true"`
|
||||
}
|
||||
|
||||
type _DestinationCIDRv6 DestinationCIDRv6
|
||||
|
||||
// NewDestinationCIDRv6 instantiates a new DestinationCIDRv6 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 NewDestinationCIDRv6(types DestinationCIDRv6GetTypeArgType, value DestinationCIDRv6GetValueArgType) *DestinationCIDRv6 {
|
||||
this := DestinationCIDRv6{}
|
||||
setDestinationCIDRv6GetTypeAttributeType(&this.Type, types)
|
||||
setDestinationCIDRv6GetValueAttributeType(&this.Value, value)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewDestinationCIDRv6WithDefaults instantiates a new DestinationCIDRv6 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 NewDestinationCIDRv6WithDefaults() *DestinationCIDRv6 {
|
||||
this := DestinationCIDRv6{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *DestinationCIDRv6) GetType() (ret DestinationCIDRv6GetTypeRetType) {
|
||||
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 *DestinationCIDRv6) GetTypeOk() (ret DestinationCIDRv6GetTypeRetType, ok bool) {
|
||||
return getDestinationCIDRv6GetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *DestinationCIDRv6) SetType(v DestinationCIDRv6GetTypeRetType) {
|
||||
setDestinationCIDRv6GetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
// GetValue returns the Value field value
|
||||
func (o *DestinationCIDRv6) GetValue() (ret DestinationCIDRv6GetValueRetType) {
|
||||
ret, _ = o.GetValueOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetValueOk returns a tuple with the Value field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DestinationCIDRv6) GetValueOk() (ret DestinationCIDRv6GetValueRetType, ok bool) {
|
||||
return getDestinationCIDRv6GetValueAttributeTypeOk(o.Value)
|
||||
}
|
||||
|
||||
// SetValue sets field value
|
||||
func (o *DestinationCIDRv6) SetValue(v DestinationCIDRv6GetValueRetType) {
|
||||
setDestinationCIDRv6GetValueAttributeType(&o.Value, v)
|
||||
}
|
||||
|
||||
func (o DestinationCIDRv6) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getDestinationCIDRv6GetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
if val, ok := getDestinationCIDRv6GetValueAttributeTypeOk(o.Value); ok {
|
||||
toSerialize["Value"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableDestinationCIDRv6 struct {
|
||||
value *DestinationCIDRv6
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableDestinationCIDRv6) Get() *DestinationCIDRv6 {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableDestinationCIDRv6) Set(val *DestinationCIDRv6) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableDestinationCIDRv6) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableDestinationCIDRv6) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableDestinationCIDRv6(val *DestinationCIDRv6) *NullableDestinationCIDRv6 {
|
||||
return &NullableDestinationCIDRv6{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableDestinationCIDRv6) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableDestinationCIDRv6) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_destination_cidrv6_test.go
Normal file
11
pkg/iaasbeta/model_destination_cidrv6_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
170
pkg/iaasbeta/model_error.go
Normal file
170
pkg/iaasbeta/model_error.go
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the Error type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Error{}
|
||||
|
||||
/*
|
||||
types and functions for code
|
||||
*/
|
||||
|
||||
// isLong
|
||||
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 msg
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ErrorGetMsgAttributeType = *string
|
||||
|
||||
func getErrorGetMsgAttributeTypeOk(arg ErrorGetMsgAttributeType) (ret ErrorGetMsgRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setErrorGetMsgAttributeType(arg *ErrorGetMsgAttributeType, val ErrorGetMsgRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ErrorGetMsgArgType = string
|
||||
type ErrorGetMsgRetType = string
|
||||
|
||||
// Error Error with HTTP error code and an error message.
|
||||
type Error struct {
|
||||
// REQUIRED
|
||||
Code ErrorGetCodeAttributeType `json:"code" required:"true"`
|
||||
// An error message.
|
||||
// REQUIRED
|
||||
Msg ErrorGetMsgAttributeType `json:"msg" 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, msg ErrorGetMsgArgType) *Error {
|
||||
this := Error{}
|
||||
setErrorGetCodeAttributeType(&this.Code, code)
|
||||
setErrorGetMsgAttributeType(&this.Msg, msg)
|
||||
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)
|
||||
}
|
||||
|
||||
// GetMsg returns the Msg field value
|
||||
func (o *Error) GetMsg() (ret ErrorGetMsgRetType) {
|
||||
ret, _ = o.GetMsgOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetMsgOk returns a tuple with the Msg field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Error) GetMsgOk() (ret ErrorGetMsgRetType, ok bool) {
|
||||
return getErrorGetMsgAttributeTypeOk(o.Msg)
|
||||
}
|
||||
|
||||
// SetMsg sets field value
|
||||
func (o *Error) SetMsg(v ErrorGetMsgRetType) {
|
||||
setErrorGetMsgAttributeType(&o.Msg, 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 := getErrorGetMsgAttributeTypeOk(o.Msg); ok {
|
||||
toSerialize["Msg"] = 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/iaasbeta/model_error_test.go
Normal file
11
pkg/iaasbeta/model_error_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
128
pkg/iaasbeta/model_get_server_log_200_response.go
Normal file
128
pkg/iaasbeta/model_get_server_log_200_response.go
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the GetServerLog200Response type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &GetServerLog200Response{}
|
||||
|
||||
/*
|
||||
types and functions for output
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type GetServerLog200ResponseGetOutputAttributeType = *string
|
||||
|
||||
func getGetServerLog200ResponseGetOutputAttributeTypeOk(arg GetServerLog200ResponseGetOutputAttributeType) (ret GetServerLog200ResponseGetOutputRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setGetServerLog200ResponseGetOutputAttributeType(arg *GetServerLog200ResponseGetOutputAttributeType, val GetServerLog200ResponseGetOutputRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type GetServerLog200ResponseGetOutputArgType = string
|
||||
type GetServerLog200ResponseGetOutputRetType = string
|
||||
|
||||
// GetServerLog200Response struct for GetServerLog200Response
|
||||
type GetServerLog200Response struct {
|
||||
Output GetServerLog200ResponseGetOutputAttributeType `json:"output,omitempty"`
|
||||
}
|
||||
|
||||
// NewGetServerLog200Response instantiates a new GetServerLog200Response 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 NewGetServerLog200Response() *GetServerLog200Response {
|
||||
this := GetServerLog200Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewGetServerLog200ResponseWithDefaults instantiates a new GetServerLog200Response 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 NewGetServerLog200ResponseWithDefaults() *GetServerLog200Response {
|
||||
this := GetServerLog200Response{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetOutput returns the Output field value if set, zero value otherwise.
|
||||
func (o *GetServerLog200Response) GetOutput() (res GetServerLog200ResponseGetOutputRetType) {
|
||||
res, _ = o.GetOutputOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetOutputOk returns a tuple with the Output field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *GetServerLog200Response) GetOutputOk() (ret GetServerLog200ResponseGetOutputRetType, ok bool) {
|
||||
return getGetServerLog200ResponseGetOutputAttributeTypeOk(o.Output)
|
||||
}
|
||||
|
||||
// HasOutput returns a boolean if a field has been set.
|
||||
func (o *GetServerLog200Response) HasOutput() bool {
|
||||
_, ok := o.GetOutputOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetOutput gets a reference to the given string and assigns it to the Output field.
|
||||
func (o *GetServerLog200Response) SetOutput(v GetServerLog200ResponseGetOutputRetType) {
|
||||
setGetServerLog200ResponseGetOutputAttributeType(&o.Output, v)
|
||||
}
|
||||
|
||||
func (o GetServerLog200Response) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getGetServerLog200ResponseGetOutputAttributeTypeOk(o.Output); ok {
|
||||
toSerialize["Output"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableGetServerLog200Response struct {
|
||||
value *GetServerLog200Response
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableGetServerLog200Response) Get() *GetServerLog200Response {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableGetServerLog200Response) Set(val *GetServerLog200Response) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableGetServerLog200Response) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableGetServerLog200Response) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableGetServerLog200Response(val *GetServerLog200Response) *NullableGetServerLog200Response {
|
||||
return &NullableGetServerLog200Response{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableGetServerLog200Response) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableGetServerLog200Response) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_get_server_log_200_response_test.go
Normal file
11
pkg/iaasbeta/model_get_server_log_200_response_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
170
pkg/iaasbeta/model_icmp_parameters.go
Normal file
170
pkg/iaasbeta/model_icmp_parameters.go
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ICMPParameters type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ICMPParameters{}
|
||||
|
||||
/*
|
||||
types and functions for code
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ICMPParametersGetCodeAttributeType = *int64
|
||||
type ICMPParametersGetCodeArgType = int64
|
||||
type ICMPParametersGetCodeRetType = int64
|
||||
|
||||
func getICMPParametersGetCodeAttributeTypeOk(arg ICMPParametersGetCodeAttributeType) (ret ICMPParametersGetCodeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setICMPParametersGetCodeAttributeType(arg *ICMPParametersGetCodeAttributeType, val ICMPParametersGetCodeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ICMPParametersGetTypeAttributeType = *int64
|
||||
type ICMPParametersGetTypeArgType = int64
|
||||
type ICMPParametersGetTypeRetType = int64
|
||||
|
||||
func getICMPParametersGetTypeAttributeTypeOk(arg ICMPParametersGetTypeAttributeType) (ret ICMPParametersGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setICMPParametersGetTypeAttributeType(arg *ICMPParametersGetTypeAttributeType, val ICMPParametersGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ICMPParameters Object that represents ICMP parameters.
|
||||
type ICMPParameters struct {
|
||||
// ICMP code. Can be set if the protocol is ICMP.
|
||||
// REQUIRED
|
||||
Code ICMPParametersGetCodeAttributeType `json:"code" required:"true"`
|
||||
// ICMP type. Can be set if the protocol is ICMP.
|
||||
// REQUIRED
|
||||
Type ICMPParametersGetTypeAttributeType `json:"type" required:"true"`
|
||||
}
|
||||
|
||||
type _ICMPParameters ICMPParameters
|
||||
|
||||
// NewICMPParameters instantiates a new ICMPParameters 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 NewICMPParameters(code ICMPParametersGetCodeArgType, types ICMPParametersGetTypeArgType) *ICMPParameters {
|
||||
this := ICMPParameters{}
|
||||
setICMPParametersGetCodeAttributeType(&this.Code, code)
|
||||
setICMPParametersGetTypeAttributeType(&this.Type, types)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewICMPParametersWithDefaults instantiates a new ICMPParameters 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 NewICMPParametersWithDefaults() *ICMPParameters {
|
||||
this := ICMPParameters{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCode returns the Code field value
|
||||
func (o *ICMPParameters) GetCode() (ret ICMPParametersGetCodeRetType) {
|
||||
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 *ICMPParameters) GetCodeOk() (ret ICMPParametersGetCodeRetType, ok bool) {
|
||||
return getICMPParametersGetCodeAttributeTypeOk(o.Code)
|
||||
}
|
||||
|
||||
// SetCode sets field value
|
||||
func (o *ICMPParameters) SetCode(v ICMPParametersGetCodeRetType) {
|
||||
setICMPParametersGetCodeAttributeType(&o.Code, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value
|
||||
func (o *ICMPParameters) GetType() (ret ICMPParametersGetTypeRetType) {
|
||||
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 *ICMPParameters) GetTypeOk() (ret ICMPParametersGetTypeRetType, ok bool) {
|
||||
return getICMPParametersGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// SetType sets field value
|
||||
func (o *ICMPParameters) SetType(v ICMPParametersGetTypeRetType) {
|
||||
setICMPParametersGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o ICMPParameters) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getICMPParametersGetCodeAttributeTypeOk(o.Code); ok {
|
||||
toSerialize["Code"] = val
|
||||
}
|
||||
if val, ok := getICMPParametersGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableICMPParameters struct {
|
||||
value *ICMPParameters
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableICMPParameters) Get() *ICMPParameters {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableICMPParameters) Set(val *ICMPParameters) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableICMPParameters) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableICMPParameters) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableICMPParameters(val *ICMPParameters) *NullableICMPParameters {
|
||||
return &NullableICMPParameters{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableICMPParameters) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableICMPParameters) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_icmp_parameters_test.go
Normal file
11
pkg/iaasbeta/model_icmp_parameters_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
894
pkg/iaasbeta/model_image.go
Normal file
894
pkg/iaasbeta/model_image.go
Normal file
|
|
@ -0,0 +1,894 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
// checks if the Image type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Image{}
|
||||
|
||||
/*
|
||||
types and functions for agent
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ImageGetAgentAttributeType = *ImageAgent
|
||||
type ImageGetAgentArgType = ImageAgent
|
||||
type ImageGetAgentRetType = ImageAgent
|
||||
|
||||
func getImageGetAgentAttributeTypeOk(arg ImageGetAgentAttributeType) (ret ImageGetAgentRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetAgentAttributeType(arg *ImageGetAgentAttributeType, val ImageGetAgentRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for checksum
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ImageGetChecksumAttributeType = *ImageChecksum
|
||||
type ImageGetChecksumArgType = ImageChecksum
|
||||
type ImageGetChecksumRetType = ImageChecksum
|
||||
|
||||
func getImageGetChecksumAttributeTypeOk(arg ImageGetChecksumAttributeType) (ret ImageGetChecksumRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetChecksumAttributeType(arg *ImageGetChecksumAttributeType, val ImageGetChecksumRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for config
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type ImageGetConfigAttributeType = *ImageConfig
|
||||
type ImageGetConfigArgType = ImageConfig
|
||||
type ImageGetConfigRetType = ImageConfig
|
||||
|
||||
func getImageGetConfigAttributeTypeOk(arg ImageGetConfigAttributeType) (ret ImageGetConfigRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetConfigAttributeType(arg *ImageGetConfigAttributeType, val ImageGetConfigRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for createdAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type ImageGetCreatedAtAttributeType = *time.Time
|
||||
type ImageGetCreatedAtArgType = time.Time
|
||||
type ImageGetCreatedAtRetType = time.Time
|
||||
|
||||
func getImageGetCreatedAtAttributeTypeOk(arg ImageGetCreatedAtAttributeType) (ret ImageGetCreatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetCreatedAtAttributeType(arg *ImageGetCreatedAtAttributeType, val ImageGetCreatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for diskFormat
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ImageGetDiskFormatAttributeType = *string
|
||||
|
||||
func getImageGetDiskFormatAttributeTypeOk(arg ImageGetDiskFormatAttributeType) (ret ImageGetDiskFormatRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetDiskFormatAttributeType(arg *ImageGetDiskFormatAttributeType, val ImageGetDiskFormatRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ImageGetDiskFormatArgType = string
|
||||
type ImageGetDiskFormatRetType = string
|
||||
|
||||
/*
|
||||
types and functions for id
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ImageGetIdAttributeType = *string
|
||||
|
||||
func getImageGetIdAttributeTypeOk(arg ImageGetIdAttributeType) (ret ImageGetIdRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetIdAttributeType(arg *ImageGetIdAttributeType, val ImageGetIdRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ImageGetIdArgType = string
|
||||
type ImageGetIdRetType = string
|
||||
|
||||
/*
|
||||
types and functions for importProgress
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ImageGetImportProgressAttributeType = *int64
|
||||
type ImageGetImportProgressArgType = int64
|
||||
type ImageGetImportProgressRetType = int64
|
||||
|
||||
func getImageGetImportProgressAttributeTypeOk(arg ImageGetImportProgressAttributeType) (ret ImageGetImportProgressRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetImportProgressAttributeType(arg *ImageGetImportProgressAttributeType, val ImageGetImportProgressRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type ImageGetLabelsAttributeType = *map[string]interface{}
|
||||
type ImageGetLabelsArgType = map[string]interface{}
|
||||
type ImageGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getImageGetLabelsAttributeTypeOk(arg ImageGetLabelsAttributeType) (ret ImageGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetLabelsAttributeType(arg *ImageGetLabelsAttributeType, val ImageGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for minDiskSize
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ImageGetMinDiskSizeAttributeType = *int64
|
||||
type ImageGetMinDiskSizeArgType = int64
|
||||
type ImageGetMinDiskSizeRetType = int64
|
||||
|
||||
func getImageGetMinDiskSizeAttributeTypeOk(arg ImageGetMinDiskSizeAttributeType) (ret ImageGetMinDiskSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetMinDiskSizeAttributeType(arg *ImageGetMinDiskSizeAttributeType, val ImageGetMinDiskSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for minRam
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ImageGetMinRamAttributeType = *int64
|
||||
type ImageGetMinRamArgType = int64
|
||||
type ImageGetMinRamRetType = int64
|
||||
|
||||
func getImageGetMinRamAttributeTypeOk(arg ImageGetMinRamAttributeType) (ret ImageGetMinRamRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetMinRamAttributeType(arg *ImageGetMinRamAttributeType, val ImageGetMinRamRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ImageGetNameAttributeType = *string
|
||||
|
||||
func getImageGetNameAttributeTypeOk(arg ImageGetNameAttributeType) (ret ImageGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetNameAttributeType(arg *ImageGetNameAttributeType, val ImageGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ImageGetNameArgType = string
|
||||
type ImageGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for owner
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ImageGetOwnerAttributeType = *string
|
||||
|
||||
func getImageGetOwnerAttributeTypeOk(arg ImageGetOwnerAttributeType) (ret ImageGetOwnerRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetOwnerAttributeType(arg *ImageGetOwnerAttributeType, val ImageGetOwnerRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ImageGetOwnerArgType = string
|
||||
type ImageGetOwnerRetType = string
|
||||
|
||||
/*
|
||||
types and functions for protected
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type ImagegetProtectedAttributeType = *bool
|
||||
type ImagegetProtectedArgType = bool
|
||||
type ImagegetProtectedRetType = bool
|
||||
|
||||
func getImagegetProtectedAttributeTypeOk(arg ImagegetProtectedAttributeType) (ret ImagegetProtectedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImagegetProtectedAttributeType(arg *ImagegetProtectedAttributeType, val ImagegetProtectedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for scope
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ImageGetScopeAttributeType = *string
|
||||
|
||||
func getImageGetScopeAttributeTypeOk(arg ImageGetScopeAttributeType) (ret ImageGetScopeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetScopeAttributeType(arg *ImageGetScopeAttributeType, val ImageGetScopeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ImageGetScopeArgType = string
|
||||
type ImageGetScopeRetType = string
|
||||
|
||||
/*
|
||||
types and functions for size
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ImageGetSizeAttributeType = *int64
|
||||
type ImageGetSizeArgType = int64
|
||||
type ImageGetSizeRetType = int64
|
||||
|
||||
func getImageGetSizeAttributeTypeOk(arg ImageGetSizeAttributeType) (ret ImageGetSizeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetSizeAttributeType(arg *ImageGetSizeAttributeType, val ImageGetSizeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for status
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ImageGetStatusAttributeType = *string
|
||||
|
||||
func getImageGetStatusAttributeTypeOk(arg ImageGetStatusAttributeType) (ret ImageGetStatusRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetStatusAttributeType(arg *ImageGetStatusAttributeType, val ImageGetStatusRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ImageGetStatusArgType = string
|
||||
type ImageGetStatusRetType = string
|
||||
|
||||
/*
|
||||
types and functions for updatedAt
|
||||
*/
|
||||
|
||||
// isDateTime
|
||||
type ImageGetUpdatedAtAttributeType = *time.Time
|
||||
type ImageGetUpdatedAtArgType = time.Time
|
||||
type ImageGetUpdatedAtRetType = time.Time
|
||||
|
||||
func getImageGetUpdatedAtAttributeTypeOk(arg ImageGetUpdatedAtAttributeType) (ret ImageGetUpdatedAtRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageGetUpdatedAtAttributeType(arg *ImageGetUpdatedAtAttributeType, val ImageGetUpdatedAtRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// Image Object that represents an Image and its parameters. Used for Creating and returning (get/list).
|
||||
type Image struct {
|
||||
Agent ImageGetAgentAttributeType `json:"agent,omitempty"`
|
||||
Checksum ImageGetChecksumAttributeType `json:"checksum,omitempty"`
|
||||
Config ImageGetConfigAttributeType `json:"config,omitempty"`
|
||||
// Date-time when resource was created.
|
||||
CreatedAt ImageGetCreatedAtAttributeType `json:"createdAt,omitempty"`
|
||||
// Object that represents a disk format. Possible values: `raw`, `qcow2`, `iso`.
|
||||
// REQUIRED
|
||||
DiskFormat ImageGetDiskFormatAttributeType `json:"diskFormat" required:"true"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Id ImageGetIdAttributeType `json:"id,omitempty"`
|
||||
// Indicates Image Import Progress in percent.
|
||||
ImportProgress ImageGetImportProgressAttributeType `json:"importProgress,omitempty"`
|
||||
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
|
||||
Labels ImageGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// Size in Gigabyte.
|
||||
MinDiskSize ImageGetMinDiskSizeAttributeType `json:"minDiskSize,omitempty"`
|
||||
// Size in Megabyte.
|
||||
MinRam ImageGetMinRamAttributeType `json:"minRam,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name ImageGetNameAttributeType `json:"name" required:"true"`
|
||||
// Universally Unique Identifier (UUID).
|
||||
Owner ImageGetOwnerAttributeType `json:"owner,omitempty"`
|
||||
// When true the image is prevented from being deleted.
|
||||
Protected ImagegetProtectedAttributeType `json:"protected,omitempty"`
|
||||
// Scope of an Image. Possible values: `public`, `local`, `projects`, `organization`.
|
||||
Scope ImageGetScopeAttributeType `json:"scope,omitempty"`
|
||||
// Size in bytes.
|
||||
Size ImageGetSizeAttributeType `json:"size,omitempty"`
|
||||
// The status of an image object. Possible values: `AVAILABLE`, `CREATING`, `DEACTIVATED`, `DELETED`, `DELETING`, `ERROR`.
|
||||
Status ImageGetStatusAttributeType `json:"status,omitempty"`
|
||||
// Date-time when resource was last updated.
|
||||
UpdatedAt ImageGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
type _Image Image
|
||||
|
||||
// NewImage instantiates a new Image 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 NewImage(diskFormat ImageGetDiskFormatArgType, name ImageGetNameArgType) *Image {
|
||||
this := Image{}
|
||||
setImageGetDiskFormatAttributeType(&this.DiskFormat, diskFormat)
|
||||
setImageGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewImageWithDefaults instantiates a new Image 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 NewImageWithDefaults() *Image {
|
||||
this := Image{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetAgent returns the Agent field value if set, zero value otherwise.
|
||||
func (o *Image) GetAgent() (res ImageGetAgentRetType) {
|
||||
res, _ = o.GetAgentOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetAgentOk() (ret ImageGetAgentRetType, ok bool) {
|
||||
return getImageGetAgentAttributeTypeOk(o.Agent)
|
||||
}
|
||||
|
||||
// HasAgent returns a boolean if a field has been set.
|
||||
func (o *Image) HasAgent() bool {
|
||||
_, ok := o.GetAgentOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetAgent gets a reference to the given ImageAgent and assigns it to the Agent field.
|
||||
func (o *Image) SetAgent(v ImageGetAgentRetType) {
|
||||
setImageGetAgentAttributeType(&o.Agent, v)
|
||||
}
|
||||
|
||||
// GetChecksum returns the Checksum field value if set, zero value otherwise.
|
||||
func (o *Image) GetChecksum() (res ImageGetChecksumRetType) {
|
||||
res, _ = o.GetChecksumOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetChecksumOk returns a tuple with the Checksum field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetChecksumOk() (ret ImageGetChecksumRetType, ok bool) {
|
||||
return getImageGetChecksumAttributeTypeOk(o.Checksum)
|
||||
}
|
||||
|
||||
// HasChecksum returns a boolean if a field has been set.
|
||||
func (o *Image) HasChecksum() bool {
|
||||
_, ok := o.GetChecksumOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetChecksum gets a reference to the given ImageChecksum and assigns it to the Checksum field.
|
||||
func (o *Image) SetChecksum(v ImageGetChecksumRetType) {
|
||||
setImageGetChecksumAttributeType(&o.Checksum, v)
|
||||
}
|
||||
|
||||
// GetConfig returns the Config field value if set, zero value otherwise.
|
||||
func (o *Image) GetConfig() (res ImageGetConfigRetType) {
|
||||
res, _ = o.GetConfigOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetConfigOk() (ret ImageGetConfigRetType, ok bool) {
|
||||
return getImageGetConfigAttributeTypeOk(o.Config)
|
||||
}
|
||||
|
||||
// HasConfig returns a boolean if a field has been set.
|
||||
func (o *Image) HasConfig() bool {
|
||||
_, ok := o.GetConfigOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetConfig gets a reference to the given ImageConfig and assigns it to the Config field.
|
||||
func (o *Image) SetConfig(v ImageGetConfigRetType) {
|
||||
setImageGetConfigAttributeType(&o.Config, v)
|
||||
}
|
||||
|
||||
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
||||
func (o *Image) GetCreatedAt() (res ImageGetCreatedAtRetType) {
|
||||
res, _ = o.GetCreatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetCreatedAtOk() (ret ImageGetCreatedAtRetType, ok bool) {
|
||||
return getImageGetCreatedAtAttributeTypeOk(o.CreatedAt)
|
||||
}
|
||||
|
||||
// HasCreatedAt returns a boolean if a field has been set.
|
||||
func (o *Image) HasCreatedAt() bool {
|
||||
_, ok := o.GetCreatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
|
||||
func (o *Image) SetCreatedAt(v ImageGetCreatedAtRetType) {
|
||||
setImageGetCreatedAtAttributeType(&o.CreatedAt, v)
|
||||
}
|
||||
|
||||
// GetDiskFormat returns the DiskFormat field value
|
||||
func (o *Image) GetDiskFormat() (ret ImageGetDiskFormatRetType) {
|
||||
ret, _ = o.GetDiskFormatOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetDiskFormatOk returns a tuple with the DiskFormat field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetDiskFormatOk() (ret ImageGetDiskFormatRetType, ok bool) {
|
||||
return getImageGetDiskFormatAttributeTypeOk(o.DiskFormat)
|
||||
}
|
||||
|
||||
// SetDiskFormat sets field value
|
||||
func (o *Image) SetDiskFormat(v ImageGetDiskFormatRetType) {
|
||||
setImageGetDiskFormatAttributeType(&o.DiskFormat, v)
|
||||
}
|
||||
|
||||
// GetId returns the Id field value if set, zero value otherwise.
|
||||
func (o *Image) GetId() (res ImageGetIdRetType) {
|
||||
res, _ = o.GetIdOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetIdOk() (ret ImageGetIdRetType, ok bool) {
|
||||
return getImageGetIdAttributeTypeOk(o.Id)
|
||||
}
|
||||
|
||||
// HasId returns a boolean if a field has been set.
|
||||
func (o *Image) HasId() bool {
|
||||
_, ok := o.GetIdOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetId gets a reference to the given string and assigns it to the Id field.
|
||||
func (o *Image) SetId(v ImageGetIdRetType) {
|
||||
setImageGetIdAttributeType(&o.Id, v)
|
||||
}
|
||||
|
||||
// GetImportProgress returns the ImportProgress field value if set, zero value otherwise.
|
||||
func (o *Image) GetImportProgress() (res ImageGetImportProgressRetType) {
|
||||
res, _ = o.GetImportProgressOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetImportProgressOk returns a tuple with the ImportProgress field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetImportProgressOk() (ret ImageGetImportProgressRetType, ok bool) {
|
||||
return getImageGetImportProgressAttributeTypeOk(o.ImportProgress)
|
||||
}
|
||||
|
||||
// HasImportProgress returns a boolean if a field has been set.
|
||||
func (o *Image) HasImportProgress() bool {
|
||||
_, ok := o.GetImportProgressOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetImportProgress gets a reference to the given int64 and assigns it to the ImportProgress field.
|
||||
func (o *Image) SetImportProgress(v ImageGetImportProgressRetType) {
|
||||
setImageGetImportProgressAttributeType(&o.ImportProgress, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *Image) GetLabels() (res ImageGetLabelsRetType) {
|
||||
res, _ = o.GetLabelsOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetLabelsOk() (ret ImageGetLabelsRetType, ok bool) {
|
||||
return getImageGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *Image) HasLabels() bool {
|
||||
_, ok := o.GetLabelsOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
|
||||
func (o *Image) SetLabels(v ImageGetLabelsRetType) {
|
||||
setImageGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetMinDiskSize returns the MinDiskSize field value if set, zero value otherwise.
|
||||
func (o *Image) GetMinDiskSize() (res ImageGetMinDiskSizeRetType) {
|
||||
res, _ = o.GetMinDiskSizeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMinDiskSizeOk returns a tuple with the MinDiskSize field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetMinDiskSizeOk() (ret ImageGetMinDiskSizeRetType, ok bool) {
|
||||
return getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize)
|
||||
}
|
||||
|
||||
// HasMinDiskSize returns a boolean if a field has been set.
|
||||
func (o *Image) HasMinDiskSize() bool {
|
||||
_, ok := o.GetMinDiskSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMinDiskSize gets a reference to the given int64 and assigns it to the MinDiskSize field.
|
||||
func (o *Image) SetMinDiskSize(v ImageGetMinDiskSizeRetType) {
|
||||
setImageGetMinDiskSizeAttributeType(&o.MinDiskSize, v)
|
||||
}
|
||||
|
||||
// GetMinRam returns the MinRam field value if set, zero value otherwise.
|
||||
func (o *Image) GetMinRam() (res ImageGetMinRamRetType) {
|
||||
res, _ = o.GetMinRamOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetMinRamOk returns a tuple with the MinRam field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetMinRamOk() (ret ImageGetMinRamRetType, ok bool) {
|
||||
return getImageGetMinRamAttributeTypeOk(o.MinRam)
|
||||
}
|
||||
|
||||
// HasMinRam returns a boolean if a field has been set.
|
||||
func (o *Image) HasMinRam() bool {
|
||||
_, ok := o.GetMinRamOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMinRam gets a reference to the given int64 and assigns it to the MinRam field.
|
||||
func (o *Image) SetMinRam(v ImageGetMinRamRetType) {
|
||||
setImageGetMinRamAttributeType(&o.MinRam, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *Image) GetName() (ret ImageGetNameRetType) {
|
||||
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 *Image) GetNameOk() (ret ImageGetNameRetType, ok bool) {
|
||||
return getImageGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *Image) SetName(v ImageGetNameRetType) {
|
||||
setImageGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetOwner returns the Owner field value if set, zero value otherwise.
|
||||
func (o *Image) GetOwner() (res ImageGetOwnerRetType) {
|
||||
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 *Image) GetOwnerOk() (ret ImageGetOwnerRetType, ok bool) {
|
||||
return getImageGetOwnerAttributeTypeOk(o.Owner)
|
||||
}
|
||||
|
||||
// HasOwner returns a boolean if a field has been set.
|
||||
func (o *Image) HasOwner() bool {
|
||||
_, ok := o.GetOwnerOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
||||
func (o *Image) SetOwner(v ImageGetOwnerRetType) {
|
||||
setImageGetOwnerAttributeType(&o.Owner, v)
|
||||
}
|
||||
|
||||
// GetProtected returns the Protected field value if set, zero value otherwise.
|
||||
func (o *Image) GetProtected() (res ImagegetProtectedRetType) {
|
||||
res, _ = o.GetProtectedOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProtectedOk returns a tuple with the Protected field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetProtectedOk() (ret ImagegetProtectedRetType, ok bool) {
|
||||
return getImagegetProtectedAttributeTypeOk(o.Protected)
|
||||
}
|
||||
|
||||
// HasProtected returns a boolean if a field has been set.
|
||||
func (o *Image) HasProtected() bool {
|
||||
_, ok := o.GetProtectedOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProtected gets a reference to the given bool and assigns it to the Protected field.
|
||||
func (o *Image) SetProtected(v ImagegetProtectedRetType) {
|
||||
setImagegetProtectedAttributeType(&o.Protected, v)
|
||||
}
|
||||
|
||||
// GetScope returns the Scope field value if set, zero value otherwise.
|
||||
func (o *Image) GetScope() (res ImageGetScopeRetType) {
|
||||
res, _ = o.GetScopeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetScopeOk() (ret ImageGetScopeRetType, ok bool) {
|
||||
return getImageGetScopeAttributeTypeOk(o.Scope)
|
||||
}
|
||||
|
||||
// HasScope returns a boolean if a field has been set.
|
||||
func (o *Image) HasScope() bool {
|
||||
_, ok := o.GetScopeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetScope gets a reference to the given string and assigns it to the Scope field.
|
||||
func (o *Image) SetScope(v ImageGetScopeRetType) {
|
||||
setImageGetScopeAttributeType(&o.Scope, v)
|
||||
}
|
||||
|
||||
// GetSize returns the Size field value if set, zero value otherwise.
|
||||
func (o *Image) GetSize() (res ImageGetSizeRetType) {
|
||||
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 *Image) GetSizeOk() (ret ImageGetSizeRetType, ok bool) {
|
||||
return getImageGetSizeAttributeTypeOk(o.Size)
|
||||
}
|
||||
|
||||
// HasSize returns a boolean if a field has been set.
|
||||
func (o *Image) HasSize() bool {
|
||||
_, ok := o.GetSizeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
||||
func (o *Image) SetSize(v ImageGetSizeRetType) {
|
||||
setImageGetSizeAttributeType(&o.Size, v)
|
||||
}
|
||||
|
||||
// GetStatus returns the Status field value if set, zero value otherwise.
|
||||
func (o *Image) GetStatus() (res ImageGetStatusRetType) {
|
||||
res, _ = o.GetStatusOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetStatusOk() (ret ImageGetStatusRetType, ok bool) {
|
||||
return getImageGetStatusAttributeTypeOk(o.Status)
|
||||
}
|
||||
|
||||
// HasStatus returns a boolean if a field has been set.
|
||||
func (o *Image) HasStatus() bool {
|
||||
_, ok := o.GetStatusOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
||||
func (o *Image) SetStatus(v ImageGetStatusRetType) {
|
||||
setImageGetStatusAttributeType(&o.Status, v)
|
||||
}
|
||||
|
||||
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
||||
func (o *Image) GetUpdatedAt() (res ImageGetUpdatedAtRetType) {
|
||||
res, _ = o.GetUpdatedAtOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Image) GetUpdatedAtOk() (ret ImageGetUpdatedAtRetType, ok bool) {
|
||||
return getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
|
||||
}
|
||||
|
||||
// HasUpdatedAt returns a boolean if a field has been set.
|
||||
func (o *Image) HasUpdatedAt() bool {
|
||||
_, ok := o.GetUpdatedAtOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
|
||||
func (o *Image) SetUpdatedAt(v ImageGetUpdatedAtRetType) {
|
||||
setImageGetUpdatedAtAttributeType(&o.UpdatedAt, v)
|
||||
}
|
||||
|
||||
func (o Image) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getImageGetAgentAttributeTypeOk(o.Agent); ok {
|
||||
toSerialize["Agent"] = val
|
||||
}
|
||||
if val, ok := getImageGetChecksumAttributeTypeOk(o.Checksum); ok {
|
||||
toSerialize["Checksum"] = val
|
||||
}
|
||||
if val, ok := getImageGetConfigAttributeTypeOk(o.Config); ok {
|
||||
toSerialize["Config"] = val
|
||||
}
|
||||
if val, ok := getImageGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
|
||||
toSerialize["CreatedAt"] = val
|
||||
}
|
||||
if val, ok := getImageGetDiskFormatAttributeTypeOk(o.DiskFormat); ok {
|
||||
toSerialize["DiskFormat"] = val
|
||||
}
|
||||
if val, ok := getImageGetIdAttributeTypeOk(o.Id); ok {
|
||||
toSerialize["Id"] = val
|
||||
}
|
||||
if val, ok := getImageGetImportProgressAttributeTypeOk(o.ImportProgress); ok {
|
||||
toSerialize["ImportProgress"] = val
|
||||
}
|
||||
if val, ok := getImageGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getImageGetMinDiskSizeAttributeTypeOk(o.MinDiskSize); ok {
|
||||
toSerialize["MinDiskSize"] = val
|
||||
}
|
||||
if val, ok := getImageGetMinRamAttributeTypeOk(o.MinRam); ok {
|
||||
toSerialize["MinRam"] = val
|
||||
}
|
||||
if val, ok := getImageGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getImageGetOwnerAttributeTypeOk(o.Owner); ok {
|
||||
toSerialize["Owner"] = val
|
||||
}
|
||||
if val, ok := getImagegetProtectedAttributeTypeOk(o.Protected); ok {
|
||||
toSerialize["Protected"] = val
|
||||
}
|
||||
if val, ok := getImageGetScopeAttributeTypeOk(o.Scope); ok {
|
||||
toSerialize["Scope"] = val
|
||||
}
|
||||
if val, ok := getImageGetSizeAttributeTypeOk(o.Size); ok {
|
||||
toSerialize["Size"] = val
|
||||
}
|
||||
if val, ok := getImageGetStatusAttributeTypeOk(o.Status); ok {
|
||||
toSerialize["Status"] = val
|
||||
}
|
||||
if val, ok := getImageGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
|
||||
toSerialize["UpdatedAt"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableImage struct {
|
||||
value *Image
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableImage) Get() *Image {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableImage) Set(val *Image) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableImage) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableImage) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableImage(val *Image) *NullableImage {
|
||||
return &NullableImage{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableImage) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableImage) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
176
pkg/iaasbeta/model_image_agent.go
Normal file
176
pkg/iaasbeta/model_image_agent.go
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the ImageAgent type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &ImageAgent{}
|
||||
|
||||
/*
|
||||
types and functions for provisionByDefault
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type ImageAgentgetProvisionByDefaultAttributeType = *bool
|
||||
type ImageAgentgetProvisionByDefaultArgType = bool
|
||||
type ImageAgentgetProvisionByDefaultRetType = bool
|
||||
|
||||
func getImageAgentgetProvisionByDefaultAttributeTypeOk(arg ImageAgentgetProvisionByDefaultAttributeType) (ret ImageAgentgetProvisionByDefaultRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageAgentgetProvisionByDefaultAttributeType(arg *ImageAgentgetProvisionByDefaultAttributeType, val ImageAgentgetProvisionByDefaultRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for supported
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type ImageAgentgetSupportedAttributeType = *bool
|
||||
type ImageAgentgetSupportedArgType = bool
|
||||
type ImageAgentgetSupportedRetType = bool
|
||||
|
||||
func getImageAgentgetSupportedAttributeTypeOk(arg ImageAgentgetSupportedAttributeType) (ret ImageAgentgetSupportedRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setImageAgentgetSupportedAttributeType(arg *ImageAgentgetSupportedAttributeType, val ImageAgentgetSupportedRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// ImageAgent Support status and default provioning setting for the STACKIT server agent.
|
||||
type ImageAgent struct {
|
||||
// Default provioning of the STACKIT server agent for new servers. The default for new images is false. Can only be enabled when supported is also true.
|
||||
ProvisionByDefault ImageAgentgetProvisionByDefaultAttributeType `json:"provisionByDefault,omitempty"`
|
||||
// Indicates the STACKIT server agent for the image. The default for new images is false.
|
||||
Supported ImageAgentgetSupportedAttributeType `json:"supported,omitempty"`
|
||||
}
|
||||
|
||||
// NewImageAgent instantiates a new ImageAgent 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 NewImageAgent() *ImageAgent {
|
||||
this := ImageAgent{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewImageAgentWithDefaults instantiates a new ImageAgent 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 NewImageAgentWithDefaults() *ImageAgent {
|
||||
this := ImageAgent{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetProvisionByDefault returns the ProvisionByDefault field value if set, zero value otherwise.
|
||||
func (o *ImageAgent) GetProvisionByDefault() (res ImageAgentgetProvisionByDefaultRetType) {
|
||||
res, _ = o.GetProvisionByDefaultOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetProvisionByDefaultOk returns a tuple with the ProvisionByDefault field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ImageAgent) GetProvisionByDefaultOk() (ret ImageAgentgetProvisionByDefaultRetType, ok bool) {
|
||||
return getImageAgentgetProvisionByDefaultAttributeTypeOk(o.ProvisionByDefault)
|
||||
}
|
||||
|
||||
// HasProvisionByDefault returns a boolean if a field has been set.
|
||||
func (o *ImageAgent) HasProvisionByDefault() bool {
|
||||
_, ok := o.GetProvisionByDefaultOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetProvisionByDefault gets a reference to the given bool and assigns it to the ProvisionByDefault field.
|
||||
func (o *ImageAgent) SetProvisionByDefault(v ImageAgentgetProvisionByDefaultRetType) {
|
||||
setImageAgentgetProvisionByDefaultAttributeType(&o.ProvisionByDefault, v)
|
||||
}
|
||||
|
||||
// GetSupported returns the Supported field value if set, zero value otherwise.
|
||||
func (o *ImageAgent) GetSupported() (res ImageAgentgetSupportedRetType) {
|
||||
res, _ = o.GetSupportedOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetSupportedOk returns a tuple with the Supported field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *ImageAgent) GetSupportedOk() (ret ImageAgentgetSupportedRetType, ok bool) {
|
||||
return getImageAgentgetSupportedAttributeTypeOk(o.Supported)
|
||||
}
|
||||
|
||||
// HasSupported returns a boolean if a field has been set.
|
||||
func (o *ImageAgent) HasSupported() bool {
|
||||
_, ok := o.GetSupportedOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetSupported gets a reference to the given bool and assigns it to the Supported field.
|
||||
func (o *ImageAgent) SetSupported(v ImageAgentgetSupportedRetType) {
|
||||
setImageAgentgetSupportedAttributeType(&o.Supported, v)
|
||||
}
|
||||
|
||||
func (o ImageAgent) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getImageAgentgetProvisionByDefaultAttributeTypeOk(o.ProvisionByDefault); ok {
|
||||
toSerialize["ProvisionByDefault"] = val
|
||||
}
|
||||
if val, ok := getImageAgentgetSupportedAttributeTypeOk(o.Supported); ok {
|
||||
toSerialize["Supported"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableImageAgent struct {
|
||||
value *ImageAgent
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableImageAgent) Get() *ImageAgent {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableImageAgent) Set(val *ImageAgent) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableImageAgent) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableImageAgent) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableImageAgent(val *ImageAgent) *NullableImageAgent {
|
||||
return &NullableImageAgent{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableImageAgent) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableImageAgent) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
11
pkg/iaasbeta/model_image_agent_test.go
Normal file
11
pkg/iaasbeta/model_image_agent_test.go
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
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