feat: auto generated files and new structure (#4)
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s

## 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:
Marcel S. Henselin 2026-01-29 14:10:25 +00:00 committed by Marcel_Henselin
parent 979220be66
commit 9f41c4da7f
Signed by: tf-provider.git.onstackit.cloud
GPG key ID: 6D7E8A1ED8955A9C
1283 changed files with 273211 additions and 4614 deletions

View file

@ -0,0 +1 @@
6.6.0

4055
pkg/sfsbeta/api_default.go Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

628
pkg/sfsbeta/client.go Normal file
View file

@ -0,0 +1,628 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
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 File Storage (SFS) API v1beta.0.0
// 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)
}

View file

@ -0,0 +1,38 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
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/sfsbeta",
Debug: false,
Servers: config.ServerConfigurations{
{
URL: "https://sfs.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
}

View file

@ -0,0 +1,469 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateResourcePoolPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateResourcePoolPayload{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type CreateResourcePoolPayloadGetAvailabilityZoneAttributeType = *string
func getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(arg CreateResourcePoolPayloadGetAvailabilityZoneAttributeType) (ret CreateResourcePoolPayloadGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetAvailabilityZoneAttributeType(arg *CreateResourcePoolPayloadGetAvailabilityZoneAttributeType, val CreateResourcePoolPayloadGetAvailabilityZoneRetType) {
*arg = &val
}
type CreateResourcePoolPayloadGetAvailabilityZoneArgType = string
type CreateResourcePoolPayloadGetAvailabilityZoneRetType = string
/*
types and functions for ipAcl
*/
// isArray
type CreateResourcePoolPayloadGetIpAclAttributeType = *[]string
type CreateResourcePoolPayloadGetIpAclArgType = []string
type CreateResourcePoolPayloadGetIpAclRetType = []string
func getCreateResourcePoolPayloadGetIpAclAttributeTypeOk(arg CreateResourcePoolPayloadGetIpAclAttributeType) (ret CreateResourcePoolPayloadGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetIpAclAttributeType(arg *CreateResourcePoolPayloadGetIpAclAttributeType, val CreateResourcePoolPayloadGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type CreateResourcePoolPayloadGetLabelsAttributeType = *map[string]string
type CreateResourcePoolPayloadGetLabelsArgType = map[string]string
type CreateResourcePoolPayloadGetLabelsRetType = map[string]string
func getCreateResourcePoolPayloadGetLabelsAttributeTypeOk(arg CreateResourcePoolPayloadGetLabelsAttributeType) (ret CreateResourcePoolPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetLabelsAttributeType(arg *CreateResourcePoolPayloadGetLabelsAttributeType, val CreateResourcePoolPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateResourcePoolPayloadGetNameAttributeType = *string
func getCreateResourcePoolPayloadGetNameAttributeTypeOk(arg CreateResourcePoolPayloadGetNameAttributeType) (ret CreateResourcePoolPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetNameAttributeType(arg *CreateResourcePoolPayloadGetNameAttributeType, val CreateResourcePoolPayloadGetNameRetType) {
*arg = &val
}
type CreateResourcePoolPayloadGetNameArgType = string
type CreateResourcePoolPayloadGetNameRetType = string
/*
types and functions for performanceClass
*/
// isNotNullableString
type CreateResourcePoolPayloadGetPerformanceClassAttributeType = *string
func getCreateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg CreateResourcePoolPayloadGetPerformanceClassAttributeType) (ret CreateResourcePoolPayloadGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetPerformanceClassAttributeType(arg *CreateResourcePoolPayloadGetPerformanceClassAttributeType, val CreateResourcePoolPayloadGetPerformanceClassRetType) {
*arg = &val
}
type CreateResourcePoolPayloadGetPerformanceClassArgType = string
type CreateResourcePoolPayloadGetPerformanceClassRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type CreateResourcePoolPayloadGetSizeGigabytesAttributeType = *int64
type CreateResourcePoolPayloadGetSizeGigabytesArgType = int64
type CreateResourcePoolPayloadGetSizeGigabytesRetType = int64
func getCreateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg CreateResourcePoolPayloadGetSizeGigabytesAttributeType) (ret CreateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *CreateResourcePoolPayloadGetSizeGigabytesAttributeType, val CreateResourcePoolPayloadGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for snapshotScheduleName
*/
// isNotNullableString
type CreateResourcePoolPayloadGetSnapshotScheduleNameAttributeType = *string
func getCreateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(arg CreateResourcePoolPayloadGetSnapshotScheduleNameAttributeType) (ret CreateResourcePoolPayloadGetSnapshotScheduleNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadGetSnapshotScheduleNameAttributeType(arg *CreateResourcePoolPayloadGetSnapshotScheduleNameAttributeType, val CreateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
*arg = &val
}
type CreateResourcePoolPayloadGetSnapshotScheduleNameArgType = string
type CreateResourcePoolPayloadGetSnapshotScheduleNameRetType = string
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType = *bool
type CreateResourcePoolPayloadgetSnapshotsAreVisibleArgType = bool
type CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType = bool
func getCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType) (ret CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(arg *CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType, val CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
*arg = &val
}
// CreateResourcePoolPayload struct for CreateResourcePoolPayload
type CreateResourcePoolPayload struct {
// Availability zone
AvailabilityZone CreateResourcePoolPayloadGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
// List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl CreateResourcePoolPayloadGetIpAclAttributeType `json:"ipAcl,omitempty"`
// An optional object that represents the labels associated with the resource pool keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels CreateResourcePoolPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Resource Pool
Name CreateResourcePoolPayloadGetNameAttributeType `json:"name,omitempty"`
// Name of the performance class
PerformanceClass CreateResourcePoolPayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Size of the Resource Pool (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SizeGigabytes CreateResourcePoolPayloadGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// (optional) Name of the Snapshot Schedule to use
SnapshotScheduleName CreateResourcePoolPayloadGetSnapshotScheduleNameAttributeType `json:"snapshotScheduleName,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
}
// NewCreateResourcePoolPayload instantiates a new CreateResourcePoolPayload 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 NewCreateResourcePoolPayload() *CreateResourcePoolPayload {
this := CreateResourcePoolPayload{}
return &this
}
// NewCreateResourcePoolPayloadWithDefaults instantiates a new CreateResourcePoolPayload 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 NewCreateResourcePoolPayloadWithDefaults() *CreateResourcePoolPayload {
this := CreateResourcePoolPayload{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetAvailabilityZone() (res CreateResourcePoolPayloadGetAvailabilityZoneRetType) {
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 *CreateResourcePoolPayload) GetAvailabilityZoneOk() (ret CreateResourcePoolPayloadGetAvailabilityZoneRetType, ok bool) {
return getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// HasAvailabilityZone returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasAvailabilityZone() bool {
_, ok := o.GetAvailabilityZoneOk()
return ok
}
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
func (o *CreateResourcePoolPayload) SetAvailabilityZone(v CreateResourcePoolPayloadGetAvailabilityZoneRetType) {
setCreateResourcePoolPayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetIpAcl() (res CreateResourcePoolPayloadGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolPayload) GetIpAclOk() (ret CreateResourcePoolPayloadGetIpAclRetType, ok bool) {
return getCreateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *CreateResourcePoolPayload) SetIpAcl(v CreateResourcePoolPayloadGetIpAclRetType) {
setCreateResourcePoolPayloadGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetLabels() (res CreateResourcePoolPayloadGetLabelsRetType) {
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 *CreateResourcePoolPayload) GetLabelsOk() (ret CreateResourcePoolPayloadGetLabelsRetType, ok bool) {
return getCreateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *CreateResourcePoolPayload) SetLabels(v CreateResourcePoolPayloadGetLabelsRetType) {
setCreateResourcePoolPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetName() (res CreateResourcePoolPayloadGetNameRetType) {
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 *CreateResourcePoolPayload) GetNameOk() (ret CreateResourcePoolPayloadGetNameRetType, ok bool) {
return getCreateResourcePoolPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateResourcePoolPayload) SetName(v CreateResourcePoolPayloadGetNameRetType) {
setCreateResourcePoolPayloadGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetPerformanceClass() (res CreateResourcePoolPayloadGetPerformanceClassRetType) {
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 *CreateResourcePoolPayload) GetPerformanceClassOk() (ret CreateResourcePoolPayloadGetPerformanceClassRetType, ok bool) {
return getCreateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
func (o *CreateResourcePoolPayload) SetPerformanceClass(v CreateResourcePoolPayloadGetPerformanceClassRetType) {
setCreateResourcePoolPayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetSizeGigabytes() (res CreateResourcePoolPayloadGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolPayload) GetSizeGigabytesOk() (ret CreateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) {
return getCreateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *CreateResourcePoolPayload) SetSizeGigabytes(v CreateResourcePoolPayloadGetSizeGigabytesRetType) {
setCreateResourcePoolPayloadGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetSnapshotScheduleName returns the SnapshotScheduleName field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetSnapshotScheduleName() (res CreateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
res, _ = o.GetSnapshotScheduleNameOk()
return
}
// GetSnapshotScheduleNameOk returns a tuple with the SnapshotScheduleName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolPayload) GetSnapshotScheduleNameOk() (ret CreateResourcePoolPayloadGetSnapshotScheduleNameRetType, ok bool) {
return getCreateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(o.SnapshotScheduleName)
}
// HasSnapshotScheduleName returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasSnapshotScheduleName() bool {
_, ok := o.GetSnapshotScheduleNameOk()
return ok
}
// SetSnapshotScheduleName gets a reference to the given string and assigns it to the SnapshotScheduleName field.
func (o *CreateResourcePoolPayload) SetSnapshotScheduleName(v CreateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
setCreateResourcePoolPayloadGetSnapshotScheduleNameAttributeType(&o.SnapshotScheduleName, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *CreateResourcePoolPayload) GetSnapshotsAreVisible() (res CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolPayload) GetSnapshotsAreVisibleOk() (ret CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) {
return getCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *CreateResourcePoolPayload) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *CreateResourcePoolPayload) SetSnapshotsAreVisible(v CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
setCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
func (o CreateResourcePoolPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getCreateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getCreateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateResourcePoolPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getCreateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getCreateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(o.SnapshotScheduleName); ok {
toSerialize["SnapshotScheduleName"] = val
}
if val, ok := getCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
return toSerialize, nil
}
type NullableCreateResourcePoolPayload struct {
value *CreateResourcePoolPayload
isSet bool
}
func (v NullableCreateResourcePoolPayload) Get() *CreateResourcePoolPayload {
return v.value
}
func (v *NullableCreateResourcePoolPayload) Set(val *CreateResourcePoolPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateResourcePoolPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateResourcePoolPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateResourcePoolPayload(val *CreateResourcePoolPayload) *NullableCreateResourcePoolPayload {
return &NullableCreateResourcePoolPayload{value: val, isSet: true}
}
func (v NullableCreateResourcePoolPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateResourcePoolPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateResourcePoolResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateResourcePoolResponse{}
/*
types and functions for resourcePool
*/
// isModel
type CreateResourcePoolResponseGetResourcePoolAttributeType = *CreateResourcePoolResponseResourcePool
type CreateResourcePoolResponseGetResourcePoolArgType = CreateResourcePoolResponseResourcePool
type CreateResourcePoolResponseGetResourcePoolRetType = CreateResourcePoolResponseResourcePool
func getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(arg CreateResourcePoolResponseGetResourcePoolAttributeType) (ret CreateResourcePoolResponseGetResourcePoolRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseGetResourcePoolAttributeType(arg *CreateResourcePoolResponseGetResourcePoolAttributeType, val CreateResourcePoolResponseGetResourcePoolRetType) {
*arg = &val
}
// CreateResourcePoolResponse struct for CreateResourcePoolResponse
type CreateResourcePoolResponse struct {
ResourcePool CreateResourcePoolResponseGetResourcePoolAttributeType `json:"resourcePool,omitempty"`
}
// NewCreateResourcePoolResponse instantiates a new CreateResourcePoolResponse 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 NewCreateResourcePoolResponse() *CreateResourcePoolResponse {
this := CreateResourcePoolResponse{}
return &this
}
// NewCreateResourcePoolResponseWithDefaults instantiates a new CreateResourcePoolResponse 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 NewCreateResourcePoolResponseWithDefaults() *CreateResourcePoolResponse {
this := CreateResourcePoolResponse{}
return &this
}
// GetResourcePool returns the ResourcePool field value if set, zero value otherwise.
func (o *CreateResourcePoolResponse) GetResourcePool() (res CreateResourcePoolResponseGetResourcePoolRetType) {
res, _ = o.GetResourcePoolOk()
return
}
// GetResourcePoolOk returns a tuple with the ResourcePool field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponse) GetResourcePoolOk() (ret CreateResourcePoolResponseGetResourcePoolRetType, ok bool) {
return getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool)
}
// HasResourcePool returns a boolean if a field has been set.
func (o *CreateResourcePoolResponse) HasResourcePool() bool {
_, ok := o.GetResourcePoolOk()
return ok
}
// SetResourcePool gets a reference to the given CreateResourcePoolResponseResourcePool and assigns it to the ResourcePool field.
func (o *CreateResourcePoolResponse) SetResourcePool(v CreateResourcePoolResponseGetResourcePoolRetType) {
setCreateResourcePoolResponseGetResourcePoolAttributeType(&o.ResourcePool, v)
}
func (o CreateResourcePoolResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool); ok {
toSerialize["ResourcePool"] = val
}
return toSerialize, nil
}
type NullableCreateResourcePoolResponse struct {
value *CreateResourcePoolResponse
isSet bool
}
func (v NullableCreateResourcePoolResponse) Get() *CreateResourcePoolResponse {
return v.value
}
func (v *NullableCreateResourcePoolResponse) Set(val *CreateResourcePoolResponse) {
v.value = val
v.isSet = true
}
func (v NullableCreateResourcePoolResponse) IsSet() bool {
return v.isSet
}
func (v *NullableCreateResourcePoolResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateResourcePoolResponse(val *CreateResourcePoolResponse) *NullableCreateResourcePoolResponse {
return &NullableCreateResourcePoolResponse{value: val, isSet: true}
}
func (v NullableCreateResourcePoolResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateResourcePoolResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,802 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the CreateResourcePoolResponseResourcePool type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateResourcePoolResponseResourcePool{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType = *string
func getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType) (ret CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(arg *CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType, val CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
*arg = &val
}
type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneArgType = string
type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string
/*
types and functions for countShares
*/
// isInteger
type CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType = *int64
type CreateResourcePoolResponseResourcePoolGetCountSharesArgType = int64
type CreateResourcePoolResponseResourcePoolGetCountSharesRetType = int64
func getCreateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType) (ret CreateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType, val CreateResourcePoolResponseResourcePoolGetCountSharesRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType = *time.Time
type CreateResourcePoolResponseResourcePoolGetCreatedAtArgType = time.Time
type CreateResourcePoolResponseResourcePoolGetCreatedAtRetType = time.Time
func getCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType) (ret CreateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType, val CreateResourcePoolResponseResourcePoolGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type CreateResourcePoolResponseResourcePoolGetIdAttributeType = *string
func getCreateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetIdAttributeType) (ret CreateResourcePoolResponseResourcePoolGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetIdAttributeType(arg *CreateResourcePoolResponseResourcePoolGetIdAttributeType, val CreateResourcePoolResponseResourcePoolGetIdRetType) {
*arg = &val
}
type CreateResourcePoolResponseResourcePoolGetIdArgType = string
type CreateResourcePoolResponseResourcePoolGetIdRetType = string
/*
types and functions for ipAcl
*/
// isArray
type CreateResourcePoolResponseResourcePoolGetIpAclAttributeType = *[]string
type CreateResourcePoolResponseResourcePoolGetIpAclArgType = []string
type CreateResourcePoolResponseResourcePoolGetIpAclRetType = []string
func getCreateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetIpAclAttributeType) (ret CreateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *CreateResourcePoolResponseResourcePoolGetIpAclAttributeType, val CreateResourcePoolResponseResourcePoolGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type CreateResourcePoolResponseResourcePoolGetLabelsAttributeType = *map[string]string
type CreateResourcePoolResponseResourcePoolGetLabelsArgType = map[string]string
type CreateResourcePoolResponseResourcePoolGetLabelsRetType = map[string]string
func getCreateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetLabelsAttributeType) (ret CreateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *CreateResourcePoolResponseResourcePoolGetLabelsAttributeType, val CreateResourcePoolResponseResourcePoolGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type CreateResourcePoolResponseResourcePoolGetMountPathAttributeType = *string
func getCreateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetMountPathAttributeType) (ret CreateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetMountPathAttributeType(arg *CreateResourcePoolResponseResourcePoolGetMountPathAttributeType, val CreateResourcePoolResponseResourcePoolGetMountPathRetType) {
*arg = &val
}
type CreateResourcePoolResponseResourcePoolGetMountPathArgType = string
type CreateResourcePoolResponseResourcePoolGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type CreateResourcePoolResponseResourcePoolGetNameAttributeType = *string
func getCreateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetNameAttributeType) (ret CreateResourcePoolResponseResourcePoolGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetNameAttributeType(arg *CreateResourcePoolResponseResourcePoolGetNameAttributeType, val CreateResourcePoolResponseResourcePoolGetNameRetType) {
*arg = &val
}
type CreateResourcePoolResponseResourcePoolGetNameArgType = string
type CreateResourcePoolResponseResourcePoolGetNameRetType = string
/*
types and functions for performanceClass
*/
// isModel
type CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass
type CreateResourcePoolResponseResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass
type CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass
func getCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType) (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg *CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType, val CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
*arg = &val
}
/*
types and functions for performanceClassDowngradableAt
*/
// isDateTime
type CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time
type CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time
type CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time
func getCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType, val CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
*arg = &val
}
/*
types and functions for sizeReducibleAt
*/
// isDateTime
type CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType = *time.Time
type CreateResourcePoolResponseResourcePoolGetSizeReducibleAtArgType = time.Time
type CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType = time.Time
func getCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType) (ret CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg *CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType, val CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
*arg = &val
}
/*
types and functions for snapshotSchedule
*/
// isModel
type CreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType = *SnapshotSchedule
type CreateResourcePoolResponseResourcePoolGetSnapshotScheduleArgType = SnapshotSchedule
type CreateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType = SnapshotSchedule
func getCreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType) (ret CreateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType(arg *CreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType, val CreateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
*arg = &val
}
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType = *bool
type CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleArgType = bool
type CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType = bool
func getCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType) (ret CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(arg *CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType, val CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
*arg = &val
}
/*
types and functions for space
*/
// isModel
type CreateResourcePoolResponseResourcePoolGetSpaceAttributeType = *ResourcePoolSpace
type CreateResourcePoolResponseResourcePoolGetSpaceArgType = ResourcePoolSpace
type CreateResourcePoolResponseResourcePoolGetSpaceRetType = ResourcePoolSpace
func getCreateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetSpaceAttributeType) (ret CreateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *CreateResourcePoolResponseResourcePoolGetSpaceAttributeType, val CreateResourcePoolResponseResourcePoolGetSpaceRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type CreateResourcePoolResponseResourcePoolGetStateAttributeType = *string
func getCreateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetStateAttributeType) (ret CreateResourcePoolResponseResourcePoolGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolResponseResourcePoolGetStateAttributeType(arg *CreateResourcePoolResponseResourcePoolGetStateAttributeType, val CreateResourcePoolResponseResourcePoolGetStateRetType) {
*arg = &val
}
type CreateResourcePoolResponseResourcePoolGetStateArgType = string
type CreateResourcePoolResponseResourcePoolGetStateRetType = string
// CreateResourcePoolResponseResourcePool Created Resource Pool
type CreateResourcePoolResponseResourcePool struct {
// Name of the respective availability zone
AvailabilityZone CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
// Number of Shares in the Resource Pool
// Can be cast to int32 without loss of precision.
CountShares CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType `json:"countShares,omitempty"`
CreatedAt CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Resource Pool
Id CreateResourcePoolResponseResourcePoolGetIdAttributeType `json:"id,omitempty"`
// List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl CreateResourcePoolResponseResourcePoolGetIpAclAttributeType `json:"ipAcl,omitempty"`
Labels CreateResourcePoolResponseResourcePoolGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Resource Pool, used to mount the Resource Pool Note that a Resource Pool can only be mounted in read-only
MountPath CreateResourcePoolResponseResourcePoolGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Resource Pool
Name CreateResourcePoolResponseResourcePoolGetNameAttributeType `json:"name,omitempty"`
PerformanceClass CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Time when the performance class can be downgraded again.
PerformanceClassDowngradableAt CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType `json:"performanceClassDowngradableAt,omitempty"`
// Time when the size can be reduced again.
SizeReducibleAt CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType `json:"sizeReducibleAt,omitempty"`
SnapshotSchedule CreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType `json:"snapshotSchedule,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
Space CreateResourcePoolResponseResourcePoolGetSpaceAttributeType `json:"space,omitempty"`
// State of the Resource Pool (possible values: [\"pending\", \"creating\", \"created\", \"updating\", \"error\", \"deleting\"])
State CreateResourcePoolResponseResourcePoolGetStateAttributeType `json:"state,omitempty"`
}
// NewCreateResourcePoolResponseResourcePool instantiates a new CreateResourcePoolResponseResourcePool 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 NewCreateResourcePoolResponseResourcePool() *CreateResourcePoolResponseResourcePool {
this := CreateResourcePoolResponseResourcePool{}
return &this
}
// NewCreateResourcePoolResponseResourcePoolWithDefaults instantiates a new CreateResourcePoolResponseResourcePool 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 NewCreateResourcePoolResponseResourcePoolWithDefaults() *CreateResourcePoolResponseResourcePool {
this := CreateResourcePoolResponseResourcePool{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetAvailabilityZone() (res CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
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 *CreateResourcePoolResponseResourcePool) GetAvailabilityZoneOk() (ret CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// HasAvailabilityZone returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasAvailabilityZone() bool {
_, ok := o.GetAvailabilityZoneOk()
return ok
}
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
func (o *CreateResourcePoolResponseResourcePool) SetAvailabilityZone(v CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
setCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetCountShares returns the CountShares field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetCountShares() (res CreateResourcePoolResponseResourcePoolGetCountSharesRetType) {
res, _ = o.GetCountSharesOk()
return
}
// GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetCountSharesOk() (ret CreateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares)
}
// HasCountShares returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasCountShares() bool {
_, ok := o.GetCountSharesOk()
return ok
}
// SetCountShares gets a reference to the given int64 and assigns it to the CountShares field.
func (o *CreateResourcePoolResponseResourcePool) SetCountShares(v CreateResourcePoolResponseResourcePoolGetCountSharesRetType) {
setCreateResourcePoolResponseResourcePoolGetCountSharesAttributeType(&o.CountShares, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetCreatedAt() (res CreateResourcePoolResponseResourcePoolGetCreatedAtRetType) {
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 *CreateResourcePoolResponseResourcePool) GetCreatedAtOk() (ret CreateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) 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 *CreateResourcePoolResponseResourcePool) SetCreatedAt(v CreateResourcePoolResponseResourcePoolGetCreatedAtRetType) {
setCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetId() (res CreateResourcePoolResponseResourcePoolGetIdRetType) {
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 *CreateResourcePoolResponseResourcePool) GetIdOk() (ret CreateResourcePoolResponseResourcePoolGetIdRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateResourcePoolResponseResourcePool) SetId(v CreateResourcePoolResponseResourcePoolGetIdRetType) {
setCreateResourcePoolResponseResourcePoolGetIdAttributeType(&o.Id, v)
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetIpAcl() (res CreateResourcePoolResponseResourcePoolGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetIpAclOk() (ret CreateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *CreateResourcePoolResponseResourcePool) SetIpAcl(v CreateResourcePoolResponseResourcePoolGetIpAclRetType) {
setCreateResourcePoolResponseResourcePoolGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetLabels() (res CreateResourcePoolResponseResourcePoolGetLabelsRetType) {
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 *CreateResourcePoolResponseResourcePool) GetLabelsOk() (ret CreateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *CreateResourcePoolResponseResourcePool) SetLabels(v CreateResourcePoolResponseResourcePoolGetLabelsRetType) {
setCreateResourcePoolResponseResourcePoolGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetMountPath() (res CreateResourcePoolResponseResourcePoolGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetMountPathOk() (ret CreateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *CreateResourcePoolResponseResourcePool) SetMountPath(v CreateResourcePoolResponseResourcePoolGetMountPathRetType) {
setCreateResourcePoolResponseResourcePoolGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetName() (res CreateResourcePoolResponseResourcePoolGetNameRetType) {
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 *CreateResourcePoolResponseResourcePool) GetNameOk() (ret CreateResourcePoolResponseResourcePoolGetNameRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateResourcePoolResponseResourcePool) SetName(v CreateResourcePoolResponseResourcePoolGetNameRetType) {
setCreateResourcePoolResponseResourcePoolGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClass() (res CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
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 *CreateResourcePoolResponseResourcePool) GetPerformanceClassOk() (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given ResourcePoolPerformanceClass and assigns it to the PerformanceClass field.
func (o *CreateResourcePoolResponseResourcePool) SetPerformanceClass(v CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
setCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt() (res CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
res, _ = o.GetPerformanceClassDowngradableAtOk()
return
}
// GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAtOk() (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt)
}
// HasPerformanceClassDowngradableAt returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasPerformanceClassDowngradableAt() bool {
_, ok := o.GetPerformanceClassDowngradableAtOk()
return ok
}
// SetPerformanceClassDowngradableAt gets a reference to the given time.Time and assigns it to the PerformanceClassDowngradableAt field.
func (o *CreateResourcePoolResponseResourcePool) SetPerformanceClassDowngradableAt(v CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
setCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v)
}
// GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetSizeReducibleAt() (res CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
res, _ = o.GetSizeReducibleAtOk()
return
}
// GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetSizeReducibleAtOk() (ret CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt)
}
// HasSizeReducibleAt returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasSizeReducibleAt() bool {
_, ok := o.GetSizeReducibleAtOk()
return ok
}
// SetSizeReducibleAt gets a reference to the given time.Time and assigns it to the SizeReducibleAt field.
func (o *CreateResourcePoolResponseResourcePool) SetSizeReducibleAt(v CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
setCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v)
}
// GetSnapshotSchedule returns the SnapshotSchedule field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetSnapshotSchedule() (res CreateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
res, _ = o.GetSnapshotScheduleOk()
return
}
// GetSnapshotScheduleOk returns a tuple with the SnapshotSchedule field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetSnapshotScheduleOk() (ret CreateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule)
}
// HasSnapshotSchedule returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasSnapshotSchedule() bool {
_, ok := o.GetSnapshotScheduleOk()
return ok
}
// SetSnapshotSchedule gets a reference to the given SnapshotSchedule and assigns it to the SnapshotSchedule field.
func (o *CreateResourcePoolResponseResourcePool) SetSnapshotSchedule(v CreateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
setCreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType(&o.SnapshotSchedule, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetSnapshotsAreVisibleOk() (ret CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *CreateResourcePoolResponseResourcePool) SetSnapshotsAreVisible(v CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
setCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetSpace() (res CreateResourcePoolResponseResourcePoolGetSpaceRetType) {
res, _ = o.GetSpaceOk()
return
}
// GetSpaceOk returns a tuple with the Space field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetSpaceOk() (ret CreateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space)
}
// HasSpace returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasSpace() bool {
_, ok := o.GetSpaceOk()
return ok
}
// SetSpace gets a reference to the given ResourcePoolSpace and assigns it to the Space field.
func (o *CreateResourcePoolResponseResourcePool) SetSpace(v CreateResourcePoolResponseResourcePoolGetSpaceRetType) {
setCreateResourcePoolResponseResourcePoolGetSpaceAttributeType(&o.Space, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *CreateResourcePoolResponseResourcePool) GetState() (res CreateResourcePoolResponseResourcePoolGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolResponseResourcePool) GetStateOk() (ret CreateResourcePoolResponseResourcePoolGetStateRetType, ok bool) {
return getCreateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *CreateResourcePoolResponseResourcePool) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *CreateResourcePoolResponseResourcePool) SetState(v CreateResourcePoolResponseResourcePoolGetStateRetType) {
setCreateResourcePoolResponseResourcePoolGetStateAttributeType(&o.State, v)
}
func (o CreateResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares); ok {
toSerialize["CountShares"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt); ok {
toSerialize["PerformanceClassDowngradableAt"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt); ok {
toSerialize["SizeReducibleAt"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule); ok {
toSerialize["SnapshotSchedule"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space); ok {
toSerialize["Space"] = val
}
if val, ok := getCreateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableCreateResourcePoolResponseResourcePool struct {
value *CreateResourcePoolResponseResourcePool
isSet bool
}
func (v NullableCreateResourcePoolResponseResourcePool) Get() *CreateResourcePoolResponseResourcePool {
return v.value
}
func (v *NullableCreateResourcePoolResponseResourcePool) Set(val *CreateResourcePoolResponseResourcePool) {
v.value = val
v.isSet = true
}
func (v NullableCreateResourcePoolResponseResourcePool) IsSet() bool {
return v.isSet
}
func (v *NullableCreateResourcePoolResponseResourcePool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateResourcePoolResponseResourcePool(val *CreateResourcePoolResponseResourcePool) *NullableCreateResourcePoolResponseResourcePool {
return &NullableCreateResourcePoolResponseResourcePool{value: val, isSet: true}
}
func (v NullableCreateResourcePoolResponseResourcePool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateResourcePoolResponseResourcePool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,193 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateResourcePoolSnapshotPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateResourcePoolSnapshotPayload{}
/*
types and functions for comment
*/
// isNullableString
type CreateResourcePoolSnapshotPayloadGetCommentAttributeType = *NullableString
func getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(arg CreateResourcePoolSnapshotPayloadGetCommentAttributeType) (ret CreateResourcePoolSnapshotPayloadGetCommentRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setCreateResourcePoolSnapshotPayloadGetCommentAttributeType(arg *CreateResourcePoolSnapshotPayloadGetCommentAttributeType, val CreateResourcePoolSnapshotPayloadGetCommentRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type CreateResourcePoolSnapshotPayloadGetCommentArgType = *string
type CreateResourcePoolSnapshotPayloadGetCommentRetType = *string
/*
types and functions for name
*/
// isNotNullableString
type CreateResourcePoolSnapshotPayloadGetNameAttributeType = *string
func getCreateResourcePoolSnapshotPayloadGetNameAttributeTypeOk(arg CreateResourcePoolSnapshotPayloadGetNameAttributeType) (ret CreateResourcePoolSnapshotPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotPayloadGetNameAttributeType(arg *CreateResourcePoolSnapshotPayloadGetNameAttributeType, val CreateResourcePoolSnapshotPayloadGetNameRetType) {
*arg = &val
}
type CreateResourcePoolSnapshotPayloadGetNameArgType = string
type CreateResourcePoolSnapshotPayloadGetNameRetType = string
// CreateResourcePoolSnapshotPayload struct for CreateResourcePoolSnapshotPayload
type CreateResourcePoolSnapshotPayload struct {
// (optional) A comment to add more information about a snapshot
Comment CreateResourcePoolSnapshotPayloadGetCommentAttributeType `json:"comment,omitempty"`
// Name of the Resource Pool Snapshot
Name CreateResourcePoolSnapshotPayloadGetNameAttributeType `json:"name,omitempty"`
}
// NewCreateResourcePoolSnapshotPayload instantiates a new CreateResourcePoolSnapshotPayload 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 NewCreateResourcePoolSnapshotPayload() *CreateResourcePoolSnapshotPayload {
this := CreateResourcePoolSnapshotPayload{}
return &this
}
// NewCreateResourcePoolSnapshotPayloadWithDefaults instantiates a new CreateResourcePoolSnapshotPayload 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 NewCreateResourcePoolSnapshotPayloadWithDefaults() *CreateResourcePoolSnapshotPayload {
this := CreateResourcePoolSnapshotPayload{}
return &this
}
// GetComment returns the Comment field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateResourcePoolSnapshotPayload) GetComment() (res CreateResourcePoolSnapshotPayloadGetCommentRetType) {
res, _ = o.GetCommentOk()
return
}
// GetCommentOk returns a tuple with the Comment 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 *CreateResourcePoolSnapshotPayload) GetCommentOk() (ret CreateResourcePoolSnapshotPayloadGetCommentRetType, ok bool) {
return getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(o.Comment)
}
// HasComment returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotPayload) HasComment() bool {
_, ok := o.GetCommentOk()
return ok
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *CreateResourcePoolSnapshotPayload) SetComment(v CreateResourcePoolSnapshotPayloadGetCommentRetType) {
setCreateResourcePoolSnapshotPayloadGetCommentAttributeType(&o.Comment, v)
}
// SetCommentNil sets the value for Comment to be an explicit nil
func (o *CreateResourcePoolSnapshotPayload) SetCommentNil() {
o.Comment = nil
}
// UnsetComment ensures that no value is present for Comment, not even an explicit nil
func (o *CreateResourcePoolSnapshotPayload) UnsetComment() {
o.Comment = nil
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotPayload) GetName() (res CreateResourcePoolSnapshotPayloadGetNameRetType) {
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 *CreateResourcePoolSnapshotPayload) GetNameOk() (ret CreateResourcePoolSnapshotPayloadGetNameRetType, ok bool) {
return getCreateResourcePoolSnapshotPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateResourcePoolSnapshotPayload) SetName(v CreateResourcePoolSnapshotPayloadGetNameRetType) {
setCreateResourcePoolSnapshotPayloadGetNameAttributeType(&o.Name, v)
}
func (o CreateResourcePoolSnapshotPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(o.Comment); ok {
toSerialize["Comment"] = val
}
if val, ok := getCreateResourcePoolSnapshotPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
return toSerialize, nil
}
type NullableCreateResourcePoolSnapshotPayload struct {
value *CreateResourcePoolSnapshotPayload
isSet bool
}
func (v NullableCreateResourcePoolSnapshotPayload) Get() *CreateResourcePoolSnapshotPayload {
return v.value
}
func (v *NullableCreateResourcePoolSnapshotPayload) Set(val *CreateResourcePoolSnapshotPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateResourcePoolSnapshotPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateResourcePoolSnapshotPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateResourcePoolSnapshotPayload(val *CreateResourcePoolSnapshotPayload) *NullableCreateResourcePoolSnapshotPayload {
return &NullableCreateResourcePoolSnapshotPayload{value: val, isSet: true}
}
func (v NullableCreateResourcePoolSnapshotPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateResourcePoolSnapshotPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateResourcePoolSnapshotResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateResourcePoolSnapshotResponse{}
/*
types and functions for resourcePoolSnapshot
*/
// isModel
type CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType = *CreateResourcePoolSnapshotResponseResourcePoolSnapshot
type CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotArgType = CreateResourcePoolSnapshotResponseResourcePoolSnapshot
type CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType = CreateResourcePoolSnapshotResponseResourcePoolSnapshot
func getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(arg CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType) (ret CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(arg *CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType, val CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) {
*arg = &val
}
// CreateResourcePoolSnapshotResponse struct for CreateResourcePoolSnapshotResponse
type CreateResourcePoolSnapshotResponse struct {
ResourcePoolSnapshot CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType `json:"resourcePoolSnapshot,omitempty"`
}
// NewCreateResourcePoolSnapshotResponse instantiates a new CreateResourcePoolSnapshotResponse 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 NewCreateResourcePoolSnapshotResponse() *CreateResourcePoolSnapshotResponse {
this := CreateResourcePoolSnapshotResponse{}
return &this
}
// NewCreateResourcePoolSnapshotResponseWithDefaults instantiates a new CreateResourcePoolSnapshotResponse 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 NewCreateResourcePoolSnapshotResponseWithDefaults() *CreateResourcePoolSnapshotResponse {
this := CreateResourcePoolSnapshotResponse{}
return &this
}
// GetResourcePoolSnapshot returns the ResourcePoolSnapshot field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotResponse) GetResourcePoolSnapshot() (res CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) {
res, _ = o.GetResourcePoolSnapshotOk()
return
}
// GetResourcePoolSnapshotOk returns a tuple with the ResourcePoolSnapshot field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolSnapshotResponse) GetResourcePoolSnapshotOk() (ret CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot)
}
// HasResourcePoolSnapshot returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponse) HasResourcePoolSnapshot() bool {
_, ok := o.GetResourcePoolSnapshotOk()
return ok
}
// SetResourcePoolSnapshot gets a reference to the given CreateResourcePoolSnapshotResponseResourcePoolSnapshot and assigns it to the ResourcePoolSnapshot field.
func (o *CreateResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) {
setCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(&o.ResourcePoolSnapshot, v)
}
func (o CreateResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot); ok {
toSerialize["ResourcePoolSnapshot"] = val
}
return toSerialize, nil
}
type NullableCreateResourcePoolSnapshotResponse struct {
value *CreateResourcePoolSnapshotResponse
isSet bool
}
func (v NullableCreateResourcePoolSnapshotResponse) Get() *CreateResourcePoolSnapshotResponse {
return v.value
}
func (v *NullableCreateResourcePoolSnapshotResponse) Set(val *CreateResourcePoolSnapshotResponse) {
v.value = val
v.isSet = true
}
func (v NullableCreateResourcePoolSnapshotResponse) IsSet() bool {
return v.isSet
}
func (v *NullableCreateResourcePoolSnapshotResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateResourcePoolSnapshotResponse(val *CreateResourcePoolSnapshotResponse) *NullableCreateResourcePoolSnapshotResponse {
return &NullableCreateResourcePoolSnapshotResponse{value: val, isSet: true}
}
func (v NullableCreateResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateResourcePoolSnapshotResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,388 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the CreateResourcePoolSnapshotResponseResourcePoolSnapshot type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateResourcePoolSnapshotResponseResourcePoolSnapshot{}
/*
types and functions for comment
*/
// isNullableString
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType = *NullableString
func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentArgType = *string
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType = *string
/*
types and functions for createdAt
*/
// isDateTime
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtArgType = time.Time
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType = time.Time
func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for logicalSizeGigabytes
*/
// isInteger
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64
func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for resourcePoolId
*/
// isNotNullableString
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType = *string
func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) {
*arg = &val
}
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdArgType = string
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesArgType = int64
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType = int64
func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for snapshotName
*/
// isNotNullableString
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType = *string
func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) {
*arg = &val
}
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameArgType = string
type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType = string
// CreateResourcePoolSnapshotResponseResourcePoolSnapshot Created Resource Pool Snapshot
type CreateResourcePoolSnapshotResponseResourcePoolSnapshot struct {
// (optional) A comment to add more information about a snapshot
Comment CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"`
CreatedAt CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. whats in the snapshot)
// Can be cast to int32 without loss of precision.
LogicalSizeGigabytes CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType `json:"logicalSizeGigabytes,omitempty"`
// ID of the Resource Pool of the Snapshot
ResourcePoolId CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType `json:"resourcePoolId,omitempty"`
// Reflects the actual storage footprint in the backend at snapshot time in Gibibytes (e.g. how much storage from the Resource Pool does it use).
// Can be cast to int32 without loss of precision.
SizeGigabytes CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// Name of the Resource Pool Snapshot
SnapshotName CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType `json:"snapshotName,omitempty"`
}
// NewCreateResourcePoolSnapshotResponseResourcePoolSnapshot instantiates a new CreateResourcePoolSnapshotResponseResourcePoolSnapshot 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 NewCreateResourcePoolSnapshotResponseResourcePoolSnapshot() *CreateResourcePoolSnapshotResponseResourcePoolSnapshot {
this := CreateResourcePoolSnapshotResponseResourcePoolSnapshot{}
return &this
}
// NewCreateResourcePoolSnapshotResponseResourcePoolSnapshotWithDefaults instantiates a new CreateResourcePoolSnapshotResponseResourcePoolSnapshot 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 NewCreateResourcePoolSnapshotResponseResourcePoolSnapshotWithDefaults() *CreateResourcePoolSnapshotResponseResourcePoolSnapshot {
this := CreateResourcePoolSnapshotResponseResourcePoolSnapshot{}
return &this
}
// GetComment returns the Comment field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetComment() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) {
res, _ = o.GetCommentOk()
return
}
// GetCommentOk returns a tuple with the Comment 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 *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCommentOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment)
}
// HasComment returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) HasComment() bool {
_, ok := o.GetCommentOk()
return ok
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetComment(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) {
setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v)
}
// SetCommentNil sets the value for Comment to be an explicit nil
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetCommentNil() {
o.Comment = nil
}
// UnsetComment ensures that no value is present for Comment, not even an explicit nil
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) UnsetComment() {
o.Comment = nil
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAt() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) {
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 *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAtOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) 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 *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetCreatedAt(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) {
setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytes() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
res, _ = o.GetLogicalSizeGigabytesOk()
return
}
// GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes)
}
// HasLogicalSizeGigabytes returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) HasLogicalSizeGigabytes() bool {
_, ok := o.GetLogicalSizeGigabytesOk()
return ok
}
// SetLogicalSizeGigabytes gets a reference to the given int64 and assigns it to the LogicalSizeGigabytes field.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetLogicalSizeGigabytes(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v)
}
// GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolId() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) {
res, _ = o.GetResourcePoolIdOk()
return
}
// GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolIdOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId)
}
// HasResourcePoolId returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) HasResourcePoolId() bool {
_, ok := o.GetResourcePoolIdOk()
return ok
}
// SetResourcePoolId gets a reference to the given string and assigns it to the ResourcePoolId field.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetResourcePoolId(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) {
setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytes() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytesOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetSizeGigabytes(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) {
setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetSnapshotName returns the SnapshotName field value if set, zero value otherwise.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotName() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) {
res, _ = o.GetSnapshotNameOk()
return
}
// GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotNameOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName)
}
// HasSnapshotName returns a boolean if a field has been set.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) HasSnapshotName() bool {
_, ok := o.GetSnapshotNameOk()
return ok
}
// SetSnapshotName gets a reference to the given string and assigns it to the SnapshotName field.
func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetSnapshotName(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) {
setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v)
}
func (o CreateResourcePoolSnapshotResponseResourcePoolSnapshot) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok {
toSerialize["Comment"] = val
}
if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes); ok {
toSerialize["LogicalSizeGigabytes"] = val
}
if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId); ok {
toSerialize["ResourcePoolId"] = val
}
if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName); ok {
toSerialize["SnapshotName"] = val
}
return toSerialize, nil
}
type NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot struct {
value *CreateResourcePoolSnapshotResponseResourcePoolSnapshot
isSet bool
}
func (v NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) Get() *CreateResourcePoolSnapshotResponseResourcePoolSnapshot {
return v.value
}
func (v *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) Set(val *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) {
v.value = val
v.isSet = true
}
func (v NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) IsSet() bool {
return v.isSet
}
func (v *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot(val *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot {
return &NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot{value: val, isSet: true}
}
func (v NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,225 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateShareExportPolicyPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareExportPolicyPayload{}
/*
types and functions for labels
*/
// isContainer
type CreateShareExportPolicyPayloadGetLabelsAttributeType = *map[string]string
type CreateShareExportPolicyPayloadGetLabelsArgType = map[string]string
type CreateShareExportPolicyPayloadGetLabelsRetType = map[string]string
func getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(arg CreateShareExportPolicyPayloadGetLabelsAttributeType) (ret CreateShareExportPolicyPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyPayloadGetLabelsAttributeType(arg *CreateShareExportPolicyPayloadGetLabelsAttributeType, val CreateShareExportPolicyPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateShareExportPolicyPayloadGetNameAttributeType = *string
func getCreateShareExportPolicyPayloadGetNameAttributeTypeOk(arg CreateShareExportPolicyPayloadGetNameAttributeType) (ret CreateShareExportPolicyPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyPayloadGetNameAttributeType(arg *CreateShareExportPolicyPayloadGetNameAttributeType, val CreateShareExportPolicyPayloadGetNameRetType) {
*arg = &val
}
type CreateShareExportPolicyPayloadGetNameArgType = string
type CreateShareExportPolicyPayloadGetNameRetType = string
/*
types and functions for rules
*/
// isArray
type CreateShareExportPolicyPayloadGetRulesAttributeType = *[]CreateShareExportPolicyRequestRule
type CreateShareExportPolicyPayloadGetRulesArgType = []CreateShareExportPolicyRequestRule
type CreateShareExportPolicyPayloadGetRulesRetType = []CreateShareExportPolicyRequestRule
func getCreateShareExportPolicyPayloadGetRulesAttributeTypeOk(arg CreateShareExportPolicyPayloadGetRulesAttributeType) (ret CreateShareExportPolicyPayloadGetRulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyPayloadGetRulesAttributeType(arg *CreateShareExportPolicyPayloadGetRulesAttributeType, val CreateShareExportPolicyPayloadGetRulesRetType) {
*arg = &val
}
// CreateShareExportPolicyPayload struct for CreateShareExportPolicyPayload
type CreateShareExportPolicyPayload struct {
// An optional object that represents the labels associated with the share export policy keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels CreateShareExportPolicyPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Share Export Policy
Name CreateShareExportPolicyPayloadGetNameAttributeType `json:"name,omitempty"`
// List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field \"order\" within each rule
Rules CreateShareExportPolicyPayloadGetRulesAttributeType `json:"rules,omitempty"`
}
// NewCreateShareExportPolicyPayload instantiates a new CreateShareExportPolicyPayload 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 NewCreateShareExportPolicyPayload() *CreateShareExportPolicyPayload {
this := CreateShareExportPolicyPayload{}
return &this
}
// NewCreateShareExportPolicyPayloadWithDefaults instantiates a new CreateShareExportPolicyPayload 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 NewCreateShareExportPolicyPayloadWithDefaults() *CreateShareExportPolicyPayload {
this := CreateShareExportPolicyPayload{}
return &this
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateShareExportPolicyPayload) GetLabels() (res CreateShareExportPolicyPayloadGetLabelsRetType) {
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 *CreateShareExportPolicyPayload) GetLabelsOk() (ret CreateShareExportPolicyPayloadGetLabelsRetType, ok bool) {
return getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateShareExportPolicyPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *CreateShareExportPolicyPayload) SetLabels(v CreateShareExportPolicyPayloadGetLabelsRetType) {
setCreateShareExportPolicyPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateShareExportPolicyPayload) GetName() (res CreateShareExportPolicyPayloadGetNameRetType) {
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 *CreateShareExportPolicyPayload) GetNameOk() (ret CreateShareExportPolicyPayloadGetNameRetType, ok bool) {
return getCreateShareExportPolicyPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateShareExportPolicyPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateShareExportPolicyPayload) SetName(v CreateShareExportPolicyPayloadGetNameRetType) {
setCreateShareExportPolicyPayloadGetNameAttributeType(&o.Name, v)
}
// GetRules returns the Rules field value if set, zero value otherwise.
func (o *CreateShareExportPolicyPayload) GetRules() (res CreateShareExportPolicyPayloadGetRulesRetType) {
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 *CreateShareExportPolicyPayload) GetRulesOk() (ret CreateShareExportPolicyPayloadGetRulesRetType, ok bool) {
return getCreateShareExportPolicyPayloadGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *CreateShareExportPolicyPayload) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given []CreateShareExportPolicyRequestRule and assigns it to the Rules field.
func (o *CreateShareExportPolicyPayload) SetRules(v CreateShareExportPolicyPayloadGetRulesRetType) {
setCreateShareExportPolicyPayloadGetRulesAttributeType(&o.Rules, v)
}
func (o CreateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateShareExportPolicyPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateShareExportPolicyPayloadGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
return toSerialize, nil
}
type NullableCreateShareExportPolicyPayload struct {
value *CreateShareExportPolicyPayload
isSet bool
}
func (v NullableCreateShareExportPolicyPayload) Get() *CreateShareExportPolicyPayload {
return v.value
}
func (v *NullableCreateShareExportPolicyPayload) Set(val *CreateShareExportPolicyPayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareExportPolicyPayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareExportPolicyPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareExportPolicyPayload(val *CreateShareExportPolicyPayload) *NullableCreateShareExportPolicyPayload {
return &NullableCreateShareExportPolicyPayload{value: val, isSet: true}
}
func (v NullableCreateShareExportPolicyPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareExportPolicyPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,391 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateShareExportPolicyRequestRule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareExportPolicyRequestRule{}
/*
types and functions for description
*/
// isNullableString
type CreateShareExportPolicyRequestRuleGetDescriptionAttributeType = *NullableString
func getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(arg CreateShareExportPolicyRequestRuleGetDescriptionAttributeType) (ret CreateShareExportPolicyRequestRuleGetDescriptionRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setCreateShareExportPolicyRequestRuleGetDescriptionAttributeType(arg *CreateShareExportPolicyRequestRuleGetDescriptionAttributeType, val CreateShareExportPolicyRequestRuleGetDescriptionRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type CreateShareExportPolicyRequestRuleGetDescriptionArgType = *string
type CreateShareExportPolicyRequestRuleGetDescriptionRetType = *string
/*
types and functions for ipAcl
*/
// isArray
type CreateShareExportPolicyRequestRuleGetIpAclAttributeType = *[]string
type CreateShareExportPolicyRequestRuleGetIpAclArgType = []string
type CreateShareExportPolicyRequestRuleGetIpAclRetType = []string
func getCreateShareExportPolicyRequestRuleGetIpAclAttributeTypeOk(arg CreateShareExportPolicyRequestRuleGetIpAclAttributeType) (ret CreateShareExportPolicyRequestRuleGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyRequestRuleGetIpAclAttributeType(arg *CreateShareExportPolicyRequestRuleGetIpAclAttributeType, val CreateShareExportPolicyRequestRuleGetIpAclRetType) {
*arg = &val
}
/*
types and functions for order
*/
// isInteger
type CreateShareExportPolicyRequestRuleGetOrderAttributeType = *int64
type CreateShareExportPolicyRequestRuleGetOrderArgType = int64
type CreateShareExportPolicyRequestRuleGetOrderRetType = int64
func getCreateShareExportPolicyRequestRuleGetOrderAttributeTypeOk(arg CreateShareExportPolicyRequestRuleGetOrderAttributeType) (ret CreateShareExportPolicyRequestRuleGetOrderRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyRequestRuleGetOrderAttributeType(arg *CreateShareExportPolicyRequestRuleGetOrderAttributeType, val CreateShareExportPolicyRequestRuleGetOrderRetType) {
*arg = &val
}
/*
types and functions for readOnly
*/
// isBoolean
type CreateShareExportPolicyRequestRulegetReadOnlyAttributeType = *bool
type CreateShareExportPolicyRequestRulegetReadOnlyArgType = bool
type CreateShareExportPolicyRequestRulegetReadOnlyRetType = bool
func getCreateShareExportPolicyRequestRulegetReadOnlyAttributeTypeOk(arg CreateShareExportPolicyRequestRulegetReadOnlyAttributeType) (ret CreateShareExportPolicyRequestRulegetReadOnlyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyRequestRulegetReadOnlyAttributeType(arg *CreateShareExportPolicyRequestRulegetReadOnlyAttributeType, val CreateShareExportPolicyRequestRulegetReadOnlyRetType) {
*arg = &val
}
/*
types and functions for setUuid
*/
// isBoolean
type CreateShareExportPolicyRequestRulegetSetUuidAttributeType = *bool
type CreateShareExportPolicyRequestRulegetSetUuidArgType = bool
type CreateShareExportPolicyRequestRulegetSetUuidRetType = bool
func getCreateShareExportPolicyRequestRulegetSetUuidAttributeTypeOk(arg CreateShareExportPolicyRequestRulegetSetUuidAttributeType) (ret CreateShareExportPolicyRequestRulegetSetUuidRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyRequestRulegetSetUuidAttributeType(arg *CreateShareExportPolicyRequestRulegetSetUuidAttributeType, val CreateShareExportPolicyRequestRulegetSetUuidRetType) {
*arg = &val
}
/*
types and functions for superUser
*/
// isBoolean
type CreateShareExportPolicyRequestRulegetSuperUserAttributeType = *bool
type CreateShareExportPolicyRequestRulegetSuperUserArgType = bool
type CreateShareExportPolicyRequestRulegetSuperUserRetType = bool
func getCreateShareExportPolicyRequestRulegetSuperUserAttributeTypeOk(arg CreateShareExportPolicyRequestRulegetSuperUserAttributeType) (ret CreateShareExportPolicyRequestRulegetSuperUserRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyRequestRulegetSuperUserAttributeType(arg *CreateShareExportPolicyRequestRulegetSuperUserAttributeType, val CreateShareExportPolicyRequestRulegetSuperUserRetType) {
*arg = &val
}
// CreateShareExportPolicyRequestRule struct for CreateShareExportPolicyRequestRule
type CreateShareExportPolicyRequestRule struct {
// Description of the Rule (optional)
Description CreateShareExportPolicyRequestRuleGetDescriptionAttributeType `json:"description,omitempty"`
// IP access control list, where IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP) This array cannot be empty
IpAcl CreateShareExportPolicyRequestRuleGetIpAclAttributeType `json:"ipAcl,omitempty"`
// Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied This field must be set
// Can be cast to int32 without loss of precision.
Order CreateShareExportPolicyRequestRuleGetOrderAttributeType `json:"order,omitempty"`
// Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false
ReadOnly CreateShareExportPolicyRequestRulegetReadOnlyAttributeType `json:"readOnly,omitempty"`
// Flag to honor set UUID Default: false
SetUuid CreateShareExportPolicyRequestRulegetSetUuidAttributeType `json:"setUuid,omitempty"`
// Flag to indicate if client IPs matching this rule have root access on the Share Default: true
SuperUser CreateShareExportPolicyRequestRulegetSuperUserAttributeType `json:"superUser,omitempty"`
}
// NewCreateShareExportPolicyRequestRule instantiates a new CreateShareExportPolicyRequestRule 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 NewCreateShareExportPolicyRequestRule() *CreateShareExportPolicyRequestRule {
this := CreateShareExportPolicyRequestRule{}
return &this
}
// NewCreateShareExportPolicyRequestRuleWithDefaults instantiates a new CreateShareExportPolicyRequestRule 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 NewCreateShareExportPolicyRequestRuleWithDefaults() *CreateShareExportPolicyRequestRule {
this := CreateShareExportPolicyRequestRule{}
var readOnly bool = false
this.ReadOnly = &readOnly
var setUuid bool = false
this.SetUuid = &setUuid
var superUser bool = true
this.SuperUser = &superUser
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateShareExportPolicyRequestRule) GetDescription() (res CreateShareExportPolicyRequestRuleGetDescriptionRetType) {
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *CreateShareExportPolicyRequestRule) GetDescriptionOk() (ret CreateShareExportPolicyRequestRuleGetDescriptionRetType, ok bool) {
return getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *CreateShareExportPolicyRequestRule) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *CreateShareExportPolicyRequestRule) SetDescription(v CreateShareExportPolicyRequestRuleGetDescriptionRetType) {
setCreateShareExportPolicyRequestRuleGetDescriptionAttributeType(&o.Description, v)
}
// SetDescriptionNil sets the value for Description to be an explicit nil
func (o *CreateShareExportPolicyRequestRule) SetDescriptionNil() {
o.Description = nil
}
// UnsetDescription ensures that no value is present for Description, not even an explicit nil
func (o *CreateShareExportPolicyRequestRule) UnsetDescription() {
o.Description = nil
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *CreateShareExportPolicyRequestRule) GetIpAcl() (res CreateShareExportPolicyRequestRuleGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyRequestRule) GetIpAclOk() (ret CreateShareExportPolicyRequestRuleGetIpAclRetType, ok bool) {
return getCreateShareExportPolicyRequestRuleGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *CreateShareExportPolicyRequestRule) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *CreateShareExportPolicyRequestRule) SetIpAcl(v CreateShareExportPolicyRequestRuleGetIpAclRetType) {
setCreateShareExportPolicyRequestRuleGetIpAclAttributeType(&o.IpAcl, v)
}
// GetOrder returns the Order field value if set, zero value otherwise.
func (o *CreateShareExportPolicyRequestRule) GetOrder() (res CreateShareExportPolicyRequestRuleGetOrderRetType) {
res, _ = o.GetOrderOk()
return
}
// GetOrderOk returns a tuple with the Order field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyRequestRule) GetOrderOk() (ret CreateShareExportPolicyRequestRuleGetOrderRetType, ok bool) {
return getCreateShareExportPolicyRequestRuleGetOrderAttributeTypeOk(o.Order)
}
// HasOrder returns a boolean if a field has been set.
func (o *CreateShareExportPolicyRequestRule) HasOrder() bool {
_, ok := o.GetOrderOk()
return ok
}
// SetOrder gets a reference to the given int64 and assigns it to the Order field.
func (o *CreateShareExportPolicyRequestRule) SetOrder(v CreateShareExportPolicyRequestRuleGetOrderRetType) {
setCreateShareExportPolicyRequestRuleGetOrderAttributeType(&o.Order, v)
}
// GetReadOnly returns the ReadOnly field value if set, zero value otherwise.
func (o *CreateShareExportPolicyRequestRule) GetReadOnly() (res CreateShareExportPolicyRequestRulegetReadOnlyRetType) {
res, _ = o.GetReadOnlyOk()
return
}
// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyRequestRule) GetReadOnlyOk() (ret CreateShareExportPolicyRequestRulegetReadOnlyRetType, ok bool) {
return getCreateShareExportPolicyRequestRulegetReadOnlyAttributeTypeOk(o.ReadOnly)
}
// HasReadOnly returns a boolean if a field has been set.
func (o *CreateShareExportPolicyRequestRule) HasReadOnly() bool {
_, ok := o.GetReadOnlyOk()
return ok
}
// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field.
func (o *CreateShareExportPolicyRequestRule) SetReadOnly(v CreateShareExportPolicyRequestRulegetReadOnlyRetType) {
setCreateShareExportPolicyRequestRulegetReadOnlyAttributeType(&o.ReadOnly, v)
}
// GetSetUuid returns the SetUuid field value if set, zero value otherwise.
func (o *CreateShareExportPolicyRequestRule) GetSetUuid() (res CreateShareExportPolicyRequestRulegetSetUuidRetType) {
res, _ = o.GetSetUuidOk()
return
}
// GetSetUuidOk returns a tuple with the SetUuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyRequestRule) GetSetUuidOk() (ret CreateShareExportPolicyRequestRulegetSetUuidRetType, ok bool) {
return getCreateShareExportPolicyRequestRulegetSetUuidAttributeTypeOk(o.SetUuid)
}
// HasSetUuid returns a boolean if a field has been set.
func (o *CreateShareExportPolicyRequestRule) HasSetUuid() bool {
_, ok := o.GetSetUuidOk()
return ok
}
// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field.
func (o *CreateShareExportPolicyRequestRule) SetSetUuid(v CreateShareExportPolicyRequestRulegetSetUuidRetType) {
setCreateShareExportPolicyRequestRulegetSetUuidAttributeType(&o.SetUuid, v)
}
// GetSuperUser returns the SuperUser field value if set, zero value otherwise.
func (o *CreateShareExportPolicyRequestRule) GetSuperUser() (res CreateShareExportPolicyRequestRulegetSuperUserRetType) {
res, _ = o.GetSuperUserOk()
return
}
// GetSuperUserOk returns a tuple with the SuperUser field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyRequestRule) GetSuperUserOk() (ret CreateShareExportPolicyRequestRulegetSuperUserRetType, ok bool) {
return getCreateShareExportPolicyRequestRulegetSuperUserAttributeTypeOk(o.SuperUser)
}
// HasSuperUser returns a boolean if a field has been set.
func (o *CreateShareExportPolicyRequestRule) HasSuperUser() bool {
_, ok := o.GetSuperUserOk()
return ok
}
// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field.
func (o *CreateShareExportPolicyRequestRule) SetSuperUser(v CreateShareExportPolicyRequestRulegetSuperUserRetType) {
setCreateShareExportPolicyRequestRulegetSuperUserAttributeType(&o.SuperUser, v)
}
func (o CreateShareExportPolicyRequestRule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getCreateShareExportPolicyRequestRuleGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getCreateShareExportPolicyRequestRuleGetOrderAttributeTypeOk(o.Order); ok {
toSerialize["Order"] = val
}
if val, ok := getCreateShareExportPolicyRequestRulegetReadOnlyAttributeTypeOk(o.ReadOnly); ok {
toSerialize["ReadOnly"] = val
}
if val, ok := getCreateShareExportPolicyRequestRulegetSetUuidAttributeTypeOk(o.SetUuid); ok {
toSerialize["SetUuid"] = val
}
if val, ok := getCreateShareExportPolicyRequestRulegetSuperUserAttributeTypeOk(o.SuperUser); ok {
toSerialize["SuperUser"] = val
}
return toSerialize, nil
}
type NullableCreateShareExportPolicyRequestRule struct {
value *CreateShareExportPolicyRequestRule
isSet bool
}
func (v NullableCreateShareExportPolicyRequestRule) Get() *CreateShareExportPolicyRequestRule {
return v.value
}
func (v *NullableCreateShareExportPolicyRequestRule) Set(val *CreateShareExportPolicyRequestRule) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareExportPolicyRequestRule) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareExportPolicyRequestRule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareExportPolicyRequestRule(val *CreateShareExportPolicyRequestRule) *NullableCreateShareExportPolicyRequestRule {
return &NullableCreateShareExportPolicyRequestRule{value: val, isSet: true}
}
func (v NullableCreateShareExportPolicyRequestRule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareExportPolicyRequestRule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateShareExportPolicyResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareExportPolicyResponse{}
/*
types and functions for shareExportPolicy
*/
// isModel
type CreateShareExportPolicyResponseGetShareExportPolicyAttributeType = *CreateShareExportPolicyResponseShareExportPolicy
type CreateShareExportPolicyResponseGetShareExportPolicyArgType = CreateShareExportPolicyResponseShareExportPolicy
type CreateShareExportPolicyResponseGetShareExportPolicyRetType = CreateShareExportPolicyResponseShareExportPolicy
func getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg CreateShareExportPolicyResponseGetShareExportPolicyAttributeType) (ret CreateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseGetShareExportPolicyAttributeType(arg *CreateShareExportPolicyResponseGetShareExportPolicyAttributeType, val CreateShareExportPolicyResponseGetShareExportPolicyRetType) {
*arg = &val
}
// CreateShareExportPolicyResponse struct for CreateShareExportPolicyResponse
type CreateShareExportPolicyResponse struct {
ShareExportPolicy CreateShareExportPolicyResponseGetShareExportPolicyAttributeType `json:"shareExportPolicy,omitempty"`
}
// NewCreateShareExportPolicyResponse instantiates a new CreateShareExportPolicyResponse 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 NewCreateShareExportPolicyResponse() *CreateShareExportPolicyResponse {
this := CreateShareExportPolicyResponse{}
return &this
}
// NewCreateShareExportPolicyResponseWithDefaults instantiates a new CreateShareExportPolicyResponse 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 NewCreateShareExportPolicyResponseWithDefaults() *CreateShareExportPolicyResponse {
this := CreateShareExportPolicyResponse{}
return &this
}
// GetShareExportPolicy returns the ShareExportPolicy field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponse) GetShareExportPolicy() (res CreateShareExportPolicyResponseGetShareExportPolicyRetType) {
res, _ = o.GetShareExportPolicyOk()
return
}
// GetShareExportPolicyOk returns a tuple with the ShareExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyResponse) GetShareExportPolicyOk() (ret CreateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) {
return getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy)
}
// HasShareExportPolicy returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponse) HasShareExportPolicy() bool {
_, ok := o.GetShareExportPolicyOk()
return ok
}
// SetShareExportPolicy gets a reference to the given CreateShareExportPolicyResponseShareExportPolicy and assigns it to the ShareExportPolicy field.
func (o *CreateShareExportPolicyResponse) SetShareExportPolicy(v CreateShareExportPolicyResponseGetShareExportPolicyRetType) {
setCreateShareExportPolicyResponseGetShareExportPolicyAttributeType(&o.ShareExportPolicy, v)
}
func (o CreateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy); ok {
toSerialize["ShareExportPolicy"] = val
}
return toSerialize, nil
}
type NullableCreateShareExportPolicyResponse struct {
value *CreateShareExportPolicyResponse
isSet bool
}
func (v NullableCreateShareExportPolicyResponse) Get() *CreateShareExportPolicyResponse {
return v.value
}
func (v *NullableCreateShareExportPolicyResponse) Set(val *CreateShareExportPolicyResponse) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareExportPolicyResponse) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareExportPolicyResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareExportPolicyResponse(val *CreateShareExportPolicyResponse) *NullableCreateShareExportPolicyResponse {
return &NullableCreateShareExportPolicyResponse{value: val, isSet: true}
}
func (v NullableCreateShareExportPolicyResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareExportPolicyResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,371 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the CreateShareExportPolicyResponseShareExportPolicy type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareExportPolicyResponseShareExportPolicy{}
/*
types and functions for createdAt
*/
// isDateTime
type CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType = *time.Time
type CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtArgType = time.Time
type CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType = time.Time
func getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType = *string
func getCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetIdRetType) {
*arg = &val
}
type CreateShareExportPolicyResponseShareExportPolicyGetIdArgType = string
type CreateShareExportPolicyResponseShareExportPolicyGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType = *map[string]string
type CreateShareExportPolicyResponseShareExportPolicyGetLabelsArgType = map[string]string
type CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType = map[string]string
func getCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType = *string
func getCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetNameRetType) {
*arg = &val
}
type CreateShareExportPolicyResponseShareExportPolicyGetNameArgType = string
type CreateShareExportPolicyResponseShareExportPolicyGetNameRetType = string
/*
types and functions for rules
*/
// isArray
type CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule
type CreateShareExportPolicyResponseShareExportPolicyGetRulesArgType = []ShareExportPolicyRule
type CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType = []ShareExportPolicyRule
func getCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType) {
*arg = &val
}
/*
types and functions for sharesUsingExportPolicy
*/
// isInteger
type CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64
type CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyArgType = int64
type CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType = int64
func getCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) {
*arg = &val
}
// CreateShareExportPolicyResponseShareExportPolicy Created Share Export Policy
type CreateShareExportPolicyResponseShareExportPolicy struct {
CreatedAt CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Share Export Policy
Id CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share export policy keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Share Export Policy
Name CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType `json:"name,omitempty"`
// List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field \"order\" within each rule
Rules CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType `json:"rules,omitempty"`
// Number of Shares using this Share Export Policy
// Can be cast to int32 without loss of precision.
SharesUsingExportPolicy CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType `json:"sharesUsingExportPolicy,omitempty"`
}
// NewCreateShareExportPolicyResponseShareExportPolicy instantiates a new CreateShareExportPolicyResponseShareExportPolicy 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 NewCreateShareExportPolicyResponseShareExportPolicy() *CreateShareExportPolicyResponseShareExportPolicy {
this := CreateShareExportPolicyResponseShareExportPolicy{}
return &this
}
// NewCreateShareExportPolicyResponseShareExportPolicyWithDefaults instantiates a new CreateShareExportPolicyResponseShareExportPolicy 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 NewCreateShareExportPolicyResponseShareExportPolicyWithDefaults() *CreateShareExportPolicyResponseShareExportPolicy {
this := CreateShareExportPolicyResponseShareExportPolicy{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetCreatedAt() (res CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) {
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 *CreateShareExportPolicyResponseShareExportPolicy) GetCreatedAtOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) {
return getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) 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 *CreateShareExportPolicyResponseShareExportPolicy) SetCreatedAt(v CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) {
setCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetId() (res CreateShareExportPolicyResponseShareExportPolicyGetIdRetType) {
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 *CreateShareExportPolicyResponseShareExportPolicy) GetIdOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) {
return getCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateShareExportPolicyResponseShareExportPolicy) SetId(v CreateShareExportPolicyResponseShareExportPolicyGetIdRetType) {
setCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetLabels() (res CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType) {
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 *CreateShareExportPolicyResponseShareExportPolicy) GetLabelsOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) {
return getCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *CreateShareExportPolicyResponseShareExportPolicy) SetLabels(v CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType) {
setCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetName() (res CreateShareExportPolicyResponseShareExportPolicyGetNameRetType) {
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 *CreateShareExportPolicyResponseShareExportPolicy) GetNameOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) {
return getCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateShareExportPolicyResponseShareExportPolicy) SetName(v CreateShareExportPolicyResponseShareExportPolicyGetNameRetType) {
setCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType(&o.Name, v)
}
// GetRules returns the Rules field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetRules() (res CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType) {
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 *CreateShareExportPolicyResponseShareExportPolicy) GetRulesOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) {
return getCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given []ShareExportPolicyRule and assigns it to the Rules field.
func (o *CreateShareExportPolicyResponseShareExportPolicy) SetRules(v CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType) {
setCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(&o.Rules, v)
}
// GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicy() (res CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) {
res, _ = o.GetSharesUsingExportPolicyOk()
return
}
// GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicyOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
return getCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy)
}
// HasSharesUsingExportPolicy returns a boolean if a field has been set.
func (o *CreateShareExportPolicyResponseShareExportPolicy) HasSharesUsingExportPolicy() bool {
_, ok := o.GetSharesUsingExportPolicyOk()
return ok
}
// SetSharesUsingExportPolicy gets a reference to the given int64 and assigns it to the SharesUsingExportPolicy field.
func (o *CreateShareExportPolicyResponseShareExportPolicy) SetSharesUsingExportPolicy(v CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) {
setCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v)
}
func (o CreateShareExportPolicyResponseShareExportPolicy) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy); ok {
toSerialize["SharesUsingExportPolicy"] = val
}
return toSerialize, nil
}
type NullableCreateShareExportPolicyResponseShareExportPolicy struct {
value *CreateShareExportPolicyResponseShareExportPolicy
isSet bool
}
func (v NullableCreateShareExportPolicyResponseShareExportPolicy) Get() *CreateShareExportPolicyResponseShareExportPolicy {
return v.value
}
func (v *NullableCreateShareExportPolicyResponseShareExportPolicy) Set(val *CreateShareExportPolicyResponseShareExportPolicy) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareExportPolicyResponseShareExportPolicy) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareExportPolicyResponseShareExportPolicy) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareExportPolicyResponseShareExportPolicy(val *CreateShareExportPolicyResponseShareExportPolicy) *NullableCreateShareExportPolicyResponseShareExportPolicy {
return &NullableCreateShareExportPolicyResponseShareExportPolicy{value: val, isSet: true}
}
func (v NullableCreateShareExportPolicyResponseShareExportPolicy) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareExportPolicyResponseShareExportPolicy) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,290 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateSharePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateSharePayload{}
/*
types and functions for exportPolicyName
*/
// isNullableString
type CreateSharePayloadGetExportPolicyNameAttributeType = *NullableString
func getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(arg CreateSharePayloadGetExportPolicyNameAttributeType) (ret CreateSharePayloadGetExportPolicyNameRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setCreateSharePayloadGetExportPolicyNameAttributeType(arg *CreateSharePayloadGetExportPolicyNameAttributeType, val CreateSharePayloadGetExportPolicyNameRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type CreateSharePayloadGetExportPolicyNameArgType = *string
type CreateSharePayloadGetExportPolicyNameRetType = *string
/*
types and functions for labels
*/
// isContainer
type CreateSharePayloadGetLabelsAttributeType = *map[string]string
type CreateSharePayloadGetLabelsArgType = map[string]string
type CreateSharePayloadGetLabelsRetType = map[string]string
func getCreateSharePayloadGetLabelsAttributeTypeOk(arg CreateSharePayloadGetLabelsAttributeType) (ret CreateSharePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateSharePayloadGetLabelsAttributeType(arg *CreateSharePayloadGetLabelsAttributeType, val CreateSharePayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type CreateSharePayloadGetNameAttributeType = *string
func getCreateSharePayloadGetNameAttributeTypeOk(arg CreateSharePayloadGetNameAttributeType) (ret CreateSharePayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateSharePayloadGetNameAttributeType(arg *CreateSharePayloadGetNameAttributeType, val CreateSharePayloadGetNameRetType) {
*arg = &val
}
type CreateSharePayloadGetNameArgType = string
type CreateSharePayloadGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType = *int64
type CreateSharePayloadGetSpaceHardLimitGigabytesArgType = int64
type CreateSharePayloadGetSpaceHardLimitGigabytesRetType = int64
func getCreateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(arg CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType) (ret CreateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateSharePayloadGetSpaceHardLimitGigabytesAttributeType(arg *CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType, val CreateSharePayloadGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
// CreateSharePayload struct for CreateSharePayload
type CreateSharePayload struct {
// Name of the Share Export Policy to use in the Share. Note that if this is not set, the Share can only be mounted in read only by clients with IPs matching the IP ACL of the Resource Pool hosting this Share. You can also assign a Share Export Policy after creating the Share
ExportPolicyName CreateSharePayloadGetExportPolicyNameAttributeType `json:"exportPolicyName,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels CreateSharePayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Share
Name CreateSharePayloadGetNameAttributeType `json:"name,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
}
// NewCreateSharePayload instantiates a new CreateSharePayload 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 NewCreateSharePayload() *CreateSharePayload {
this := CreateSharePayload{}
return &this
}
// NewCreateSharePayloadWithDefaults instantiates a new CreateSharePayload 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 NewCreateSharePayloadWithDefaults() *CreateSharePayload {
this := CreateSharePayload{}
return &this
}
// GetExportPolicyName returns the ExportPolicyName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateSharePayload) GetExportPolicyName() (res CreateSharePayloadGetExportPolicyNameRetType) {
res, _ = o.GetExportPolicyNameOk()
return
}
// GetExportPolicyNameOk returns a tuple with the ExportPolicyName 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 *CreateSharePayload) GetExportPolicyNameOk() (ret CreateSharePayloadGetExportPolicyNameRetType, ok bool) {
return getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName)
}
// HasExportPolicyName returns a boolean if a field has been set.
func (o *CreateSharePayload) HasExportPolicyName() bool {
_, ok := o.GetExportPolicyNameOk()
return ok
}
// SetExportPolicyName gets a reference to the given string and assigns it to the ExportPolicyName field.
func (o *CreateSharePayload) SetExportPolicyName(v CreateSharePayloadGetExportPolicyNameRetType) {
setCreateSharePayloadGetExportPolicyNameAttributeType(&o.ExportPolicyName, v)
}
// SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil
func (o *CreateSharePayload) SetExportPolicyNameNil() {
o.ExportPolicyName = nil
}
// UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil
func (o *CreateSharePayload) UnsetExportPolicyName() {
o.ExportPolicyName = nil
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateSharePayload) GetLabels() (res CreateSharePayloadGetLabelsRetType) {
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 *CreateSharePayload) GetLabelsOk() (ret CreateSharePayloadGetLabelsRetType, ok bool) {
return getCreateSharePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateSharePayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *CreateSharePayload) SetLabels(v CreateSharePayloadGetLabelsRetType) {
setCreateSharePayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateSharePayload) GetName() (res CreateSharePayloadGetNameRetType) {
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 *CreateSharePayload) GetNameOk() (ret CreateSharePayloadGetNameRetType, ok bool) {
return getCreateSharePayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateSharePayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateSharePayload) SetName(v CreateSharePayloadGetNameRetType) {
setCreateSharePayloadGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *CreateSharePayload) GetSpaceHardLimitGigabytes() (res CreateSharePayloadGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateSharePayload) GetSpaceHardLimitGigabytesOk() (ret CreateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) {
return getCreateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *CreateSharePayload) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *CreateSharePayload) SetSpaceHardLimitGigabytes(v CreateSharePayloadGetSpaceHardLimitGigabytesRetType) {
setCreateSharePayloadGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
func (o CreateSharePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName); ok {
toSerialize["ExportPolicyName"] = val
}
if val, ok := getCreateSharePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateSharePayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
return toSerialize, nil
}
type NullableCreateSharePayload struct {
value *CreateSharePayload
isSet bool
}
func (v NullableCreateSharePayload) Get() *CreateSharePayload {
return v.value
}
func (v *NullableCreateSharePayload) Set(val *CreateSharePayload) {
v.value = val
v.isSet = true
}
func (v NullableCreateSharePayload) IsSet() bool {
return v.isSet
}
func (v *NullableCreateSharePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateSharePayload(val *CreateSharePayload) *NullableCreateSharePayload {
return &NullableCreateSharePayload{value: val, isSet: true}
}
func (v NullableCreateSharePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateSharePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the CreateShareResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareResponse{}
/*
types and functions for share
*/
// isModel
type CreateShareResponseGetShareAttributeType = *CreateShareResponseShare
type CreateShareResponseGetShareArgType = CreateShareResponseShare
type CreateShareResponseGetShareRetType = CreateShareResponseShare
func getCreateShareResponseGetShareAttributeTypeOk(arg CreateShareResponseGetShareAttributeType) (ret CreateShareResponseGetShareRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseGetShareAttributeType(arg *CreateShareResponseGetShareAttributeType, val CreateShareResponseGetShareRetType) {
*arg = &val
}
// CreateShareResponse struct for CreateShareResponse
type CreateShareResponse struct {
Share CreateShareResponseGetShareAttributeType `json:"share,omitempty"`
}
// NewCreateShareResponse instantiates a new CreateShareResponse 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 NewCreateShareResponse() *CreateShareResponse {
this := CreateShareResponse{}
return &this
}
// NewCreateShareResponseWithDefaults instantiates a new CreateShareResponse 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 NewCreateShareResponseWithDefaults() *CreateShareResponse {
this := CreateShareResponse{}
return &this
}
// GetShare returns the Share field value if set, zero value otherwise.
func (o *CreateShareResponse) GetShare() (res CreateShareResponseGetShareRetType) {
res, _ = o.GetShareOk()
return
}
// GetShareOk returns a tuple with the Share field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareResponse) GetShareOk() (ret CreateShareResponseGetShareRetType, ok bool) {
return getCreateShareResponseGetShareAttributeTypeOk(o.Share)
}
// HasShare returns a boolean if a field has been set.
func (o *CreateShareResponse) HasShare() bool {
_, ok := o.GetShareOk()
return ok
}
// SetShare gets a reference to the given CreateShareResponseShare and assigns it to the Share field.
func (o *CreateShareResponse) SetShare(v CreateShareResponseGetShareRetType) {
setCreateShareResponseGetShareAttributeType(&o.Share, v)
}
func (o CreateShareResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareResponseGetShareAttributeTypeOk(o.Share); ok {
toSerialize["Share"] = val
}
return toSerialize, nil
}
type NullableCreateShareResponse struct {
value *CreateShareResponse
isSet bool
}
func (v NullableCreateShareResponse) Get() *CreateShareResponse {
return v.value
}
func (v *NullableCreateShareResponse) Set(val *CreateShareResponse) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareResponse) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareResponse(val *CreateShareResponse) *NullableCreateShareResponse {
return &NullableCreateShareResponse{value: val, isSet: true}
}
func (v NullableCreateShareResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,479 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the CreateShareResponseShare type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateShareResponseShare{}
/*
types and functions for createdAt
*/
// isDateTime
type CreateShareResponseShareGetCreatedAtAttributeType = *time.Time
type CreateShareResponseShareGetCreatedAtArgType = time.Time
type CreateShareResponseShareGetCreatedAtRetType = time.Time
func getCreateShareResponseShareGetCreatedAtAttributeTypeOk(arg CreateShareResponseShareGetCreatedAtAttributeType) (ret CreateShareResponseShareGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetCreatedAtAttributeType(arg *CreateShareResponseShareGetCreatedAtAttributeType, val CreateShareResponseShareGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for exportPolicy
*/
// isModel
type CreateShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy
type CreateShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy
type CreateShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy
func getCreateShareResponseShareGetExportPolicyAttributeTypeOk(arg CreateShareResponseShareGetExportPolicyAttributeType) (ret CreateShareResponseShareGetExportPolicyRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setCreateShareResponseShareGetExportPolicyAttributeType(arg *CreateShareResponseShareGetExportPolicyAttributeType, val CreateShareResponseShareGetExportPolicyRetType) {
*arg = val
}
/*
types and functions for id
*/
// isNotNullableString
type CreateShareResponseShareGetIdAttributeType = *string
func getCreateShareResponseShareGetIdAttributeTypeOk(arg CreateShareResponseShareGetIdAttributeType) (ret CreateShareResponseShareGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetIdAttributeType(arg *CreateShareResponseShareGetIdAttributeType, val CreateShareResponseShareGetIdRetType) {
*arg = &val
}
type CreateShareResponseShareGetIdArgType = string
type CreateShareResponseShareGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type CreateShareResponseShareGetLabelsAttributeType = *map[string]string
type CreateShareResponseShareGetLabelsArgType = map[string]string
type CreateShareResponseShareGetLabelsRetType = map[string]string
func getCreateShareResponseShareGetLabelsAttributeTypeOk(arg CreateShareResponseShareGetLabelsAttributeType) (ret CreateShareResponseShareGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetLabelsAttributeType(arg *CreateShareResponseShareGetLabelsAttributeType, val CreateShareResponseShareGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type CreateShareResponseShareGetMountPathAttributeType = *string
func getCreateShareResponseShareGetMountPathAttributeTypeOk(arg CreateShareResponseShareGetMountPathAttributeType) (ret CreateShareResponseShareGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetMountPathAttributeType(arg *CreateShareResponseShareGetMountPathAttributeType, val CreateShareResponseShareGetMountPathRetType) {
*arg = &val
}
type CreateShareResponseShareGetMountPathArgType = string
type CreateShareResponseShareGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type CreateShareResponseShareGetNameAttributeType = *string
func getCreateShareResponseShareGetNameAttributeTypeOk(arg CreateShareResponseShareGetNameAttributeType) (ret CreateShareResponseShareGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetNameAttributeType(arg *CreateShareResponseShareGetNameAttributeType, val CreateShareResponseShareGetNameRetType) {
*arg = &val
}
type CreateShareResponseShareGetNameArgType = string
type CreateShareResponseShareGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64
type CreateShareResponseShareGetSpaceHardLimitGigabytesArgType = int64
type CreateShareResponseShareGetSpaceHardLimitGigabytesRetType = int64
func getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret CreateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type CreateShareResponseShareGetStateAttributeType = *string
func getCreateShareResponseShareGetStateAttributeTypeOk(arg CreateShareResponseShareGetStateAttributeType) (ret CreateShareResponseShareGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setCreateShareResponseShareGetStateAttributeType(arg *CreateShareResponseShareGetStateAttributeType, val CreateShareResponseShareGetStateRetType) {
*arg = &val
}
type CreateShareResponseShareGetStateArgType = string
type CreateShareResponseShareGetStateRetType = string
// CreateShareResponseShare Created Share
type CreateShareResponseShare struct {
CreatedAt CreateShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
ExportPolicy CreateShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
// ID of the Share
Id CreateShareResponseShareGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels CreateShareResponseShareGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Share, used to mount the Share
MountPath CreateShareResponseShareGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Share
Name CreateShareResponseShareGetNameAttributeType `json:"name,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
State CreateShareResponseShareGetStateAttributeType `json:"state,omitempty"`
}
// NewCreateShareResponseShare instantiates a new CreateShareResponseShare 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 NewCreateShareResponseShare() *CreateShareResponseShare {
this := CreateShareResponseShare{}
return &this
}
// NewCreateShareResponseShareWithDefaults instantiates a new CreateShareResponseShare 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 NewCreateShareResponseShareWithDefaults() *CreateShareResponseShare {
this := CreateShareResponseShare{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetCreatedAt() (res CreateShareResponseShareGetCreatedAtRetType) {
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 *CreateShareResponseShare) GetCreatedAtOk() (ret CreateShareResponseShareGetCreatedAtRetType, ok bool) {
return getCreateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *CreateShareResponseShare) 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 *CreateShareResponseShare) SetCreatedAt(v CreateShareResponseShareGetCreatedAtRetType) {
setCreateShareResponseShareGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetExportPolicy returns the ExportPolicy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *CreateShareResponseShare) GetExportPolicy() (res CreateShareResponseShareGetExportPolicyRetType) {
res, _ = o.GetExportPolicyOk()
return
}
// GetExportPolicyOk returns a tuple with the ExportPolicy 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 *CreateShareResponseShare) GetExportPolicyOk() (ret CreateShareResponseShareGetExportPolicyRetType, ok bool) {
return getCreateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
}
// HasExportPolicy returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasExportPolicy() bool {
_, ok := o.GetExportPolicyOk()
return ok
}
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
func (o *CreateShareResponseShare) SetExportPolicy(v CreateShareResponseShareGetExportPolicyRetType) {
setCreateShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
}
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
func (o *CreateShareResponseShare) SetExportPolicyNil() {
o.ExportPolicy = nil
}
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
func (o *CreateShareResponseShare) UnsetExportPolicy() {
o.ExportPolicy = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetId() (res CreateShareResponseShareGetIdRetType) {
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 *CreateShareResponseShare) GetIdOk() (ret CreateShareResponseShareGetIdRetType, ok bool) {
return getCreateShareResponseShareGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *CreateShareResponseShare) SetId(v CreateShareResponseShareGetIdRetType) {
setCreateShareResponseShareGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetLabels() (res CreateShareResponseShareGetLabelsRetType) {
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 *CreateShareResponseShare) GetLabelsOk() (ret CreateShareResponseShareGetLabelsRetType, ok bool) {
return getCreateShareResponseShareGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *CreateShareResponseShare) SetLabels(v CreateShareResponseShareGetLabelsRetType) {
setCreateShareResponseShareGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetMountPath() (res CreateShareResponseShareGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareResponseShare) GetMountPathOk() (ret CreateShareResponseShareGetMountPathRetType, ok bool) {
return getCreateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *CreateShareResponseShare) SetMountPath(v CreateShareResponseShareGetMountPathRetType) {
setCreateShareResponseShareGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetName() (res CreateShareResponseShareGetNameRetType) {
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 *CreateShareResponseShare) GetNameOk() (ret CreateShareResponseShareGetNameRetType, ok bool) {
return getCreateShareResponseShareGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateShareResponseShare) SetName(v CreateShareResponseShareGetNameRetType) {
setCreateShareResponseShareGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetSpaceHardLimitGigabytes() (res CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret CreateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
return getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *CreateShareResponseShare) SetSpaceHardLimitGigabytes(v CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *CreateShareResponseShare) GetState() (res CreateShareResponseShareGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateShareResponseShare) GetStateOk() (ret CreateShareResponseShareGetStateRetType, ok bool) {
return getCreateShareResponseShareGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *CreateShareResponseShare) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *CreateShareResponseShare) SetState(v CreateShareResponseShareGetStateRetType) {
setCreateShareResponseShareGetStateAttributeType(&o.State, v)
}
func (o CreateShareResponseShare) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getCreateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getCreateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
toSerialize["ExportPolicy"] = val
}
if val, ok := getCreateShareResponseShareGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getCreateShareResponseShareGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getCreateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getCreateShareResponseShareGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
if val, ok := getCreateShareResponseShareGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableCreateShareResponseShare struct {
value *CreateShareResponseShare
isSet bool
}
func (v NullableCreateShareResponseShare) Get() *CreateShareResponseShare {
return v.value
}
func (v *NullableCreateShareResponseShare) Set(val *CreateShareResponseShare) {
v.value = val
v.isSet = true
}
func (v NullableCreateShareResponseShare) IsSet() bool {
return v.isSet
}
func (v *NullableCreateShareResponseShare) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateShareResponseShare(val *CreateShareResponseShare) *NullableCreateShareResponseShare {
return &NullableCreateShareResponseShare{value: val, isSet: true}
}
func (v NullableCreateShareResponseShare) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateShareResponseShare) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

224
pkg/sfsbeta/model_error.go Normal file
View file

@ -0,0 +1,224 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the Error type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Error{}
/*
types and functions for error_description
*/
// isAny
type ErrorGetErrorDescriptionAttributeType = any
type ErrorGetErrorDescriptionArgType = any
type ErrorGetErrorDescriptionRetType = any
func getErrorGetErrorDescriptionAttributeTypeOk(arg ErrorGetErrorDescriptionAttributeType) (ret ErrorGetErrorDescriptionRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setErrorGetErrorDescriptionAttributeType(arg *ErrorGetErrorDescriptionAttributeType, val ErrorGetErrorDescriptionRetType) {
*arg = val
}
/*
types and functions for title
*/
// isNotNullableString
type ErrorGetTitleAttributeType = *string
func getErrorGetTitleAttributeTypeOk(arg ErrorGetTitleAttributeType) (ret ErrorGetTitleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setErrorGetTitleAttributeType(arg *ErrorGetTitleAttributeType, val ErrorGetTitleRetType) {
*arg = &val
}
type ErrorGetTitleArgType = string
type ErrorGetTitleRetType = string
/*
types and functions for type
*/
// isNotNullableString
type ErrorGetTypeAttributeType = *string
func getErrorGetTypeAttributeTypeOk(arg ErrorGetTypeAttributeType) (ret ErrorGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setErrorGetTypeAttributeType(arg *ErrorGetTypeAttributeType, val ErrorGetTypeRetType) {
*arg = &val
}
type ErrorGetTypeArgType = string
type ErrorGetTypeRetType = string
// Error struct for Error
type Error struct {
// Deprecated: Human-readable string of the error that occured
ErrorDescription ErrorGetErrorDescriptionAttributeType `json:"error_description,omitempty"`
// Human-readable description of the error that occurred.
// REQUIRED
Title ErrorGetTitleAttributeType `json:"title" required:"true"`
// URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/<error-type> e.g. storage.stackit.cloud/validation-error
// REQUIRED
Type ErrorGetTypeAttributeType `json:"type" required:"true"`
}
type _Error Error
// NewError instantiates a new Error object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewError(title ErrorGetTitleArgType, types ErrorGetTypeArgType) *Error {
this := Error{}
setErrorGetTitleAttributeType(&this.Title, title)
setErrorGetTypeAttributeType(&this.Type, types)
return &this
}
// NewErrorWithDefaults instantiates a new Error object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewErrorWithDefaults() *Error {
this := Error{}
return &this
}
// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise (both if not set or set to explicit null).
// Deprecated
func (o *Error) GetErrorDescription() (res ErrorGetErrorDescriptionRetType) {
res, _ = o.GetErrorDescriptionOk()
return
}
// GetErrorDescriptionOk returns a tuple with the ErrorDescription 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
// Deprecated
func (o *Error) GetErrorDescriptionOk() (ret ErrorGetErrorDescriptionRetType, ok bool) {
return getErrorGetErrorDescriptionAttributeTypeOk(o.ErrorDescription)
}
// HasErrorDescription returns a boolean if a field has been set.
func (o *Error) HasErrorDescription() bool {
_, ok := o.GetErrorDescriptionOk()
return ok
}
// SetErrorDescription gets a reference to the given interface{} and assigns it to the ErrorDescription field.
// Deprecated
func (o *Error) SetErrorDescription(v ErrorGetErrorDescriptionRetType) {
setErrorGetErrorDescriptionAttributeType(&o.ErrorDescription, v)
}
// GetTitle returns the Title field value
func (o *Error) GetTitle() (ret ErrorGetTitleRetType) {
ret, _ = o.GetTitleOk()
return ret
}
// GetTitleOk returns a tuple with the Title field value
// and a boolean to check if the value has been set.
func (o *Error) GetTitleOk() (ret ErrorGetTitleRetType, ok bool) {
return getErrorGetTitleAttributeTypeOk(o.Title)
}
// SetTitle sets field value
func (o *Error) SetTitle(v ErrorGetTitleRetType) {
setErrorGetTitleAttributeType(&o.Title, v)
}
// GetType returns the Type field value
func (o *Error) GetType() (ret ErrorGetTypeRetType) {
ret, _ = o.GetTypeOk()
return ret
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *Error) GetTypeOk() (ret ErrorGetTypeRetType, ok bool) {
return getErrorGetTypeAttributeTypeOk(o.Type)
}
// SetType sets field value
func (o *Error) SetType(v ErrorGetTypeRetType) {
setErrorGetTypeAttributeType(&o.Type, v)
}
func (o Error) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getErrorGetErrorDescriptionAttributeTypeOk(o.ErrorDescription); ok {
toSerialize["ErrorDescription"] = val
}
if val, ok := getErrorGetTitleAttributeTypeOk(o.Title); ok {
toSerialize["Title"] = val
}
if val, ok := getErrorGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableError struct {
value *Error
isSet bool
}
func (v NullableError) Get() *Error {
return v.value
}
func (v *NullableError) Set(val *Error) {
v.value = val
v.isSet = true
}
func (v NullableError) IsSet() bool {
return v.isSet
}
func (v *NullableError) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableError(val *Error) *NullableError {
return &NullableError{value: val, isSet: true}
}
func (v NullableError) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableError) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the GetResourcePoolResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetResourcePoolResponse{}
/*
types and functions for resourcePool
*/
// isModel
type GetResourcePoolResponseGetResourcePoolAttributeType = *GetResourcePoolResponseResourcePool
type GetResourcePoolResponseGetResourcePoolArgType = GetResourcePoolResponseResourcePool
type GetResourcePoolResponseGetResourcePoolRetType = GetResourcePoolResponseResourcePool
func getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(arg GetResourcePoolResponseGetResourcePoolAttributeType) (ret GetResourcePoolResponseGetResourcePoolRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseGetResourcePoolAttributeType(arg *GetResourcePoolResponseGetResourcePoolAttributeType, val GetResourcePoolResponseGetResourcePoolRetType) {
*arg = &val
}
// GetResourcePoolResponse struct for GetResourcePoolResponse
type GetResourcePoolResponse struct {
ResourcePool GetResourcePoolResponseGetResourcePoolAttributeType `json:"resourcePool,omitempty"`
}
// NewGetResourcePoolResponse instantiates a new GetResourcePoolResponse 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 NewGetResourcePoolResponse() *GetResourcePoolResponse {
this := GetResourcePoolResponse{}
return &this
}
// NewGetResourcePoolResponseWithDefaults instantiates a new GetResourcePoolResponse 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 NewGetResourcePoolResponseWithDefaults() *GetResourcePoolResponse {
this := GetResourcePoolResponse{}
return &this
}
// GetResourcePool returns the ResourcePool field value if set, zero value otherwise.
func (o *GetResourcePoolResponse) GetResourcePool() (res GetResourcePoolResponseGetResourcePoolRetType) {
res, _ = o.GetResourcePoolOk()
return
}
// GetResourcePoolOk returns a tuple with the ResourcePool field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponse) GetResourcePoolOk() (ret GetResourcePoolResponseGetResourcePoolRetType, ok bool) {
return getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool)
}
// HasResourcePool returns a boolean if a field has been set.
func (o *GetResourcePoolResponse) HasResourcePool() bool {
_, ok := o.GetResourcePoolOk()
return ok
}
// SetResourcePool gets a reference to the given GetResourcePoolResponseResourcePool and assigns it to the ResourcePool field.
func (o *GetResourcePoolResponse) SetResourcePool(v GetResourcePoolResponseGetResourcePoolRetType) {
setGetResourcePoolResponseGetResourcePoolAttributeType(&o.ResourcePool, v)
}
func (o GetResourcePoolResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool); ok {
toSerialize["ResourcePool"] = val
}
return toSerialize, nil
}
type NullableGetResourcePoolResponse struct {
value *GetResourcePoolResponse
isSet bool
}
func (v NullableGetResourcePoolResponse) Get() *GetResourcePoolResponse {
return v.value
}
func (v *NullableGetResourcePoolResponse) Set(val *GetResourcePoolResponse) {
v.value = val
v.isSet = true
}
func (v NullableGetResourcePoolResponse) IsSet() bool {
return v.isSet
}
func (v *NullableGetResourcePoolResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetResourcePoolResponse(val *GetResourcePoolResponse) *NullableGetResourcePoolResponse {
return &NullableGetResourcePoolResponse{value: val, isSet: true}
}
func (v NullableGetResourcePoolResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetResourcePoolResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,802 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the GetResourcePoolResponseResourcePool type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetResourcePoolResponseResourcePool{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType = *string
func getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType) (ret GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(arg *GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType, val GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
*arg = &val
}
type GetResourcePoolResponseResourcePoolGetAvailabilityZoneArgType = string
type GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string
/*
types and functions for countShares
*/
// isInteger
type GetResourcePoolResponseResourcePoolGetCountSharesAttributeType = *int64
type GetResourcePoolResponseResourcePoolGetCountSharesArgType = int64
type GetResourcePoolResponseResourcePoolGetCountSharesRetType = int64
func getGetResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetCountSharesAttributeType) (ret GetResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *GetResourcePoolResponseResourcePoolGetCountSharesAttributeType, val GetResourcePoolResponseResourcePoolGetCountSharesRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType = *time.Time
type GetResourcePoolResponseResourcePoolGetCreatedAtArgType = time.Time
type GetResourcePoolResponseResourcePoolGetCreatedAtRetType = time.Time
func getGetResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType) (ret GetResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType, val GetResourcePoolResponseResourcePoolGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type GetResourcePoolResponseResourcePoolGetIdAttributeType = *string
func getGetResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetIdAttributeType) (ret GetResourcePoolResponseResourcePoolGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetIdAttributeType(arg *GetResourcePoolResponseResourcePoolGetIdAttributeType, val GetResourcePoolResponseResourcePoolGetIdRetType) {
*arg = &val
}
type GetResourcePoolResponseResourcePoolGetIdArgType = string
type GetResourcePoolResponseResourcePoolGetIdRetType = string
/*
types and functions for ipAcl
*/
// isArray
type GetResourcePoolResponseResourcePoolGetIpAclAttributeType = *[]string
type GetResourcePoolResponseResourcePoolGetIpAclArgType = []string
type GetResourcePoolResponseResourcePoolGetIpAclRetType = []string
func getGetResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetIpAclAttributeType) (ret GetResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *GetResourcePoolResponseResourcePoolGetIpAclAttributeType, val GetResourcePoolResponseResourcePoolGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type GetResourcePoolResponseResourcePoolGetLabelsAttributeType = *map[string]string
type GetResourcePoolResponseResourcePoolGetLabelsArgType = map[string]string
type GetResourcePoolResponseResourcePoolGetLabelsRetType = map[string]string
func getGetResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetLabelsAttributeType) (ret GetResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *GetResourcePoolResponseResourcePoolGetLabelsAttributeType, val GetResourcePoolResponseResourcePoolGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type GetResourcePoolResponseResourcePoolGetMountPathAttributeType = *string
func getGetResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetMountPathAttributeType) (ret GetResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetMountPathAttributeType(arg *GetResourcePoolResponseResourcePoolGetMountPathAttributeType, val GetResourcePoolResponseResourcePoolGetMountPathRetType) {
*arg = &val
}
type GetResourcePoolResponseResourcePoolGetMountPathArgType = string
type GetResourcePoolResponseResourcePoolGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type GetResourcePoolResponseResourcePoolGetNameAttributeType = *string
func getGetResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetNameAttributeType) (ret GetResourcePoolResponseResourcePoolGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetNameAttributeType(arg *GetResourcePoolResponseResourcePoolGetNameAttributeType, val GetResourcePoolResponseResourcePoolGetNameRetType) {
*arg = &val
}
type GetResourcePoolResponseResourcePoolGetNameArgType = string
type GetResourcePoolResponseResourcePoolGetNameRetType = string
/*
types and functions for performanceClass
*/
// isModel
type GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass
type GetResourcePoolResponseResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass
type GetResourcePoolResponseResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass
func getGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType) (ret GetResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg *GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType, val GetResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
*arg = &val
}
/*
types and functions for performanceClassDowngradableAt
*/
// isDateTime
type GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time
type GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time
type GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time
func getGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType, val GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
*arg = &val
}
/*
types and functions for sizeReducibleAt
*/
// isDateTime
type GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType = *time.Time
type GetResourcePoolResponseResourcePoolGetSizeReducibleAtArgType = time.Time
type GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType = time.Time
func getGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType) (ret GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg *GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType, val GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
*arg = &val
}
/*
types and functions for snapshotSchedule
*/
// isModel
type GetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType = *SnapshotSchedule
type GetResourcePoolResponseResourcePoolGetSnapshotScheduleArgType = SnapshotSchedule
type GetResourcePoolResponseResourcePoolGetSnapshotScheduleRetType = SnapshotSchedule
func getGetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType) (ret GetResourcePoolResponseResourcePoolGetSnapshotScheduleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType(arg *GetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType, val GetResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
*arg = &val
}
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType = *bool
type GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleArgType = bool
type GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType = bool
func getGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType) (ret GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(arg *GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType, val GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
*arg = &val
}
/*
types and functions for space
*/
// isModel
type GetResourcePoolResponseResourcePoolGetSpaceAttributeType = *ResourcePoolSpace
type GetResourcePoolResponseResourcePoolGetSpaceArgType = ResourcePoolSpace
type GetResourcePoolResponseResourcePoolGetSpaceRetType = ResourcePoolSpace
func getGetResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetSpaceAttributeType) (ret GetResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *GetResourcePoolResponseResourcePoolGetSpaceAttributeType, val GetResourcePoolResponseResourcePoolGetSpaceRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type GetResourcePoolResponseResourcePoolGetStateAttributeType = *string
func getGetResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetStateAttributeType) (ret GetResourcePoolResponseResourcePoolGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolResponseResourcePoolGetStateAttributeType(arg *GetResourcePoolResponseResourcePoolGetStateAttributeType, val GetResourcePoolResponseResourcePoolGetStateRetType) {
*arg = &val
}
type GetResourcePoolResponseResourcePoolGetStateArgType = string
type GetResourcePoolResponseResourcePoolGetStateRetType = string
// GetResourcePoolResponseResourcePool Resource Pool
type GetResourcePoolResponseResourcePool struct {
// Name of the respective availability zone
AvailabilityZone GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
// Number of Shares in the Resource Pool
// Can be cast to int32 without loss of precision.
CountShares GetResourcePoolResponseResourcePoolGetCountSharesAttributeType `json:"countShares,omitempty"`
CreatedAt GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Resource Pool
Id GetResourcePoolResponseResourcePoolGetIdAttributeType `json:"id,omitempty"`
// List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl GetResourcePoolResponseResourcePoolGetIpAclAttributeType `json:"ipAcl,omitempty"`
Labels GetResourcePoolResponseResourcePoolGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Resource Pool, used to mount the Resource Pool Note that a Resource Pool can only be mounted in read-only
MountPath GetResourcePoolResponseResourcePoolGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Resource Pool
Name GetResourcePoolResponseResourcePoolGetNameAttributeType `json:"name,omitempty"`
PerformanceClass GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Time when the performance class can be downgraded again.
PerformanceClassDowngradableAt GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType `json:"performanceClassDowngradableAt,omitempty"`
// Time when the size can be reduced again.
SizeReducibleAt GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType `json:"sizeReducibleAt,omitempty"`
SnapshotSchedule GetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType `json:"snapshotSchedule,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
Space GetResourcePoolResponseResourcePoolGetSpaceAttributeType `json:"space,omitempty"`
// State of the Resource Pool (possible values: [\"pending\", \"creating\", \"created\", \"updating\", \"error\", \"deleting\"])
State GetResourcePoolResponseResourcePoolGetStateAttributeType `json:"state,omitempty"`
}
// NewGetResourcePoolResponseResourcePool instantiates a new GetResourcePoolResponseResourcePool 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 NewGetResourcePoolResponseResourcePool() *GetResourcePoolResponseResourcePool {
this := GetResourcePoolResponseResourcePool{}
return &this
}
// NewGetResourcePoolResponseResourcePoolWithDefaults instantiates a new GetResourcePoolResponseResourcePool 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 NewGetResourcePoolResponseResourcePoolWithDefaults() *GetResourcePoolResponseResourcePool {
this := GetResourcePoolResponseResourcePool{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetAvailabilityZone() (res GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
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 *GetResourcePoolResponseResourcePool) GetAvailabilityZoneOk() (ret GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// HasAvailabilityZone returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasAvailabilityZone() bool {
_, ok := o.GetAvailabilityZoneOk()
return ok
}
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
func (o *GetResourcePoolResponseResourcePool) SetAvailabilityZone(v GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
setGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetCountShares returns the CountShares field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetCountShares() (res GetResourcePoolResponseResourcePoolGetCountSharesRetType) {
res, _ = o.GetCountSharesOk()
return
}
// GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetCountSharesOk() (ret GetResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares)
}
// HasCountShares returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasCountShares() bool {
_, ok := o.GetCountSharesOk()
return ok
}
// SetCountShares gets a reference to the given int64 and assigns it to the CountShares field.
func (o *GetResourcePoolResponseResourcePool) SetCountShares(v GetResourcePoolResponseResourcePoolGetCountSharesRetType) {
setGetResourcePoolResponseResourcePoolGetCountSharesAttributeType(&o.CountShares, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetCreatedAt() (res GetResourcePoolResponseResourcePoolGetCreatedAtRetType) {
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 *GetResourcePoolResponseResourcePool) GetCreatedAtOk() (ret GetResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) 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 *GetResourcePoolResponseResourcePool) SetCreatedAt(v GetResourcePoolResponseResourcePoolGetCreatedAtRetType) {
setGetResourcePoolResponseResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetId() (res GetResourcePoolResponseResourcePoolGetIdRetType) {
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 *GetResourcePoolResponseResourcePool) GetIdOk() (ret GetResourcePoolResponseResourcePoolGetIdRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *GetResourcePoolResponseResourcePool) SetId(v GetResourcePoolResponseResourcePoolGetIdRetType) {
setGetResourcePoolResponseResourcePoolGetIdAttributeType(&o.Id, v)
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetIpAcl() (res GetResourcePoolResponseResourcePoolGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetIpAclOk() (ret GetResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *GetResourcePoolResponseResourcePool) SetIpAcl(v GetResourcePoolResponseResourcePoolGetIpAclRetType) {
setGetResourcePoolResponseResourcePoolGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetLabels() (res GetResourcePoolResponseResourcePoolGetLabelsRetType) {
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 *GetResourcePoolResponseResourcePool) GetLabelsOk() (ret GetResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *GetResourcePoolResponseResourcePool) SetLabels(v GetResourcePoolResponseResourcePoolGetLabelsRetType) {
setGetResourcePoolResponseResourcePoolGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetMountPath() (res GetResourcePoolResponseResourcePoolGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetMountPathOk() (ret GetResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *GetResourcePoolResponseResourcePool) SetMountPath(v GetResourcePoolResponseResourcePoolGetMountPathRetType) {
setGetResourcePoolResponseResourcePoolGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetName() (res GetResourcePoolResponseResourcePoolGetNameRetType) {
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 *GetResourcePoolResponseResourcePool) GetNameOk() (ret GetResourcePoolResponseResourcePoolGetNameRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *GetResourcePoolResponseResourcePool) SetName(v GetResourcePoolResponseResourcePoolGetNameRetType) {
setGetResourcePoolResponseResourcePoolGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetPerformanceClass() (res GetResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
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 *GetResourcePoolResponseResourcePool) GetPerformanceClassOk() (ret GetResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given ResourcePoolPerformanceClass and assigns it to the PerformanceClass field.
func (o *GetResourcePoolResponseResourcePool) SetPerformanceClass(v GetResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
setGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt() (res GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
res, _ = o.GetPerformanceClassDowngradableAtOk()
return
}
// GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAtOk() (ret GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt)
}
// HasPerformanceClassDowngradableAt returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasPerformanceClassDowngradableAt() bool {
_, ok := o.GetPerformanceClassDowngradableAtOk()
return ok
}
// SetPerformanceClassDowngradableAt gets a reference to the given time.Time and assigns it to the PerformanceClassDowngradableAt field.
func (o *GetResourcePoolResponseResourcePool) SetPerformanceClassDowngradableAt(v GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
setGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v)
}
// GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetSizeReducibleAt() (res GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
res, _ = o.GetSizeReducibleAtOk()
return
}
// GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetSizeReducibleAtOk() (ret GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt)
}
// HasSizeReducibleAt returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasSizeReducibleAt() bool {
_, ok := o.GetSizeReducibleAtOk()
return ok
}
// SetSizeReducibleAt gets a reference to the given time.Time and assigns it to the SizeReducibleAt field.
func (o *GetResourcePoolResponseResourcePool) SetSizeReducibleAt(v GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
setGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v)
}
// GetSnapshotSchedule returns the SnapshotSchedule field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetSnapshotSchedule() (res GetResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
res, _ = o.GetSnapshotScheduleOk()
return
}
// GetSnapshotScheduleOk returns a tuple with the SnapshotSchedule field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetSnapshotScheduleOk() (ret GetResourcePoolResponseResourcePoolGetSnapshotScheduleRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule)
}
// HasSnapshotSchedule returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasSnapshotSchedule() bool {
_, ok := o.GetSnapshotScheduleOk()
return ok
}
// SetSnapshotSchedule gets a reference to the given SnapshotSchedule and assigns it to the SnapshotSchedule field.
func (o *GetResourcePoolResponseResourcePool) SetSnapshotSchedule(v GetResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
setGetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType(&o.SnapshotSchedule, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetSnapshotsAreVisibleOk() (ret GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *GetResourcePoolResponseResourcePool) SetSnapshotsAreVisible(v GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
setGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetSpace() (res GetResourcePoolResponseResourcePoolGetSpaceRetType) {
res, _ = o.GetSpaceOk()
return
}
// GetSpaceOk returns a tuple with the Space field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetSpaceOk() (ret GetResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space)
}
// HasSpace returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasSpace() bool {
_, ok := o.GetSpaceOk()
return ok
}
// SetSpace gets a reference to the given ResourcePoolSpace and assigns it to the Space field.
func (o *GetResourcePoolResponseResourcePool) SetSpace(v GetResourcePoolResponseResourcePoolGetSpaceRetType) {
setGetResourcePoolResponseResourcePoolGetSpaceAttributeType(&o.Space, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *GetResourcePoolResponseResourcePool) GetState() (res GetResourcePoolResponseResourcePoolGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolResponseResourcePool) GetStateOk() (ret GetResourcePoolResponseResourcePoolGetStateRetType, ok bool) {
return getGetResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *GetResourcePoolResponseResourcePool) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *GetResourcePoolResponseResourcePool) SetState(v GetResourcePoolResponseResourcePoolGetStateRetType) {
setGetResourcePoolResponseResourcePoolGetStateAttributeType(&o.State, v)
}
func (o GetResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares); ok {
toSerialize["CountShares"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt); ok {
toSerialize["PerformanceClassDowngradableAt"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt); ok {
toSerialize["SizeReducibleAt"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule); ok {
toSerialize["SnapshotSchedule"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space); ok {
toSerialize["Space"] = val
}
if val, ok := getGetResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableGetResourcePoolResponseResourcePool struct {
value *GetResourcePoolResponseResourcePool
isSet bool
}
func (v NullableGetResourcePoolResponseResourcePool) Get() *GetResourcePoolResponseResourcePool {
return v.value
}
func (v *NullableGetResourcePoolResponseResourcePool) Set(val *GetResourcePoolResponseResourcePool) {
v.value = val
v.isSet = true
}
func (v NullableGetResourcePoolResponseResourcePool) IsSet() bool {
return v.isSet
}
func (v *NullableGetResourcePoolResponseResourcePool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetResourcePoolResponseResourcePool(val *GetResourcePoolResponseResourcePool) *NullableGetResourcePoolResponseResourcePool {
return &NullableGetResourcePoolResponseResourcePool{value: val, isSet: true}
}
func (v NullableGetResourcePoolResponseResourcePool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetResourcePoolResponseResourcePool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the GetResourcePoolSnapshotResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetResourcePoolSnapshotResponse{}
/*
types and functions for resourcePoolSnapshot
*/
// isModel
type GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType = *GetResourcePoolSnapshotResponseResourcePoolSnapshot
type GetResourcePoolSnapshotResponseGetResourcePoolSnapshotArgType = GetResourcePoolSnapshotResponseResourcePoolSnapshot
type GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType = GetResourcePoolSnapshotResponseResourcePoolSnapshot
func getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(arg GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType) (ret GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(arg *GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType, val GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) {
*arg = &val
}
// GetResourcePoolSnapshotResponse struct for GetResourcePoolSnapshotResponse
type GetResourcePoolSnapshotResponse struct {
ResourcePoolSnapshot GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType `json:"resourcePoolSnapshot,omitempty"`
}
// NewGetResourcePoolSnapshotResponse instantiates a new GetResourcePoolSnapshotResponse 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 NewGetResourcePoolSnapshotResponse() *GetResourcePoolSnapshotResponse {
this := GetResourcePoolSnapshotResponse{}
return &this
}
// NewGetResourcePoolSnapshotResponseWithDefaults instantiates a new GetResourcePoolSnapshotResponse 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 NewGetResourcePoolSnapshotResponseWithDefaults() *GetResourcePoolSnapshotResponse {
this := GetResourcePoolSnapshotResponse{}
return &this
}
// GetResourcePoolSnapshot returns the ResourcePoolSnapshot field value if set, zero value otherwise.
func (o *GetResourcePoolSnapshotResponse) GetResourcePoolSnapshot() (res GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) {
res, _ = o.GetResourcePoolSnapshotOk()
return
}
// GetResourcePoolSnapshotOk returns a tuple with the ResourcePoolSnapshot field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolSnapshotResponse) GetResourcePoolSnapshotOk() (ret GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) {
return getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot)
}
// HasResourcePoolSnapshot returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponse) HasResourcePoolSnapshot() bool {
_, ok := o.GetResourcePoolSnapshotOk()
return ok
}
// SetResourcePoolSnapshot gets a reference to the given GetResourcePoolSnapshotResponseResourcePoolSnapshot and assigns it to the ResourcePoolSnapshot field.
func (o *GetResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) {
setGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(&o.ResourcePoolSnapshot, v)
}
func (o GetResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot); ok {
toSerialize["ResourcePoolSnapshot"] = val
}
return toSerialize, nil
}
type NullableGetResourcePoolSnapshotResponse struct {
value *GetResourcePoolSnapshotResponse
isSet bool
}
func (v NullableGetResourcePoolSnapshotResponse) Get() *GetResourcePoolSnapshotResponse {
return v.value
}
func (v *NullableGetResourcePoolSnapshotResponse) Set(val *GetResourcePoolSnapshotResponse) {
v.value = val
v.isSet = true
}
func (v NullableGetResourcePoolSnapshotResponse) IsSet() bool {
return v.isSet
}
func (v *NullableGetResourcePoolSnapshotResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetResourcePoolSnapshotResponse(val *GetResourcePoolSnapshotResponse) *NullableGetResourcePoolSnapshotResponse {
return &NullableGetResourcePoolSnapshotResponse{value: val, isSet: true}
}
func (v NullableGetResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetResourcePoolSnapshotResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,388 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the GetResourcePoolSnapshotResponseResourcePoolSnapshot type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetResourcePoolSnapshotResponseResourcePoolSnapshot{}
/*
types and functions for comment
*/
// isNullableString
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType = *NullableString
func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentArgType = *string
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType = *string
/*
types and functions for createdAt
*/
// isDateTime
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtArgType = time.Time
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType = time.Time
func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for logicalSizeGigabytes
*/
// isInteger
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64
func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for resourcePoolId
*/
// isNotNullableString
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType = *string
func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) {
*arg = &val
}
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdArgType = string
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesArgType = int64
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType = int64
func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for snapshotName
*/
// isNotNullableString
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType = *string
func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) {
*arg = &val
}
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameArgType = string
type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType = string
// GetResourcePoolSnapshotResponseResourcePoolSnapshot Resource Pool Snapshot
type GetResourcePoolSnapshotResponseResourcePoolSnapshot struct {
// (optional) A comment to add more information about a snapshot
Comment GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"`
CreatedAt GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. whats in the snapshot)
// Can be cast to int32 without loss of precision.
LogicalSizeGigabytes GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType `json:"logicalSizeGigabytes,omitempty"`
// ID of the Resource Pool of the Snapshot
ResourcePoolId GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType `json:"resourcePoolId,omitempty"`
// Reflects the actual storage footprint in the backend at snapshot time in Gibibytes (e.g. how much storage from the Resource Pool does it use).
// Can be cast to int32 without loss of precision.
SizeGigabytes GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// Name of the Resource Pool Snapshot
SnapshotName GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType `json:"snapshotName,omitempty"`
}
// NewGetResourcePoolSnapshotResponseResourcePoolSnapshot instantiates a new GetResourcePoolSnapshotResponseResourcePoolSnapshot 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 NewGetResourcePoolSnapshotResponseResourcePoolSnapshot() *GetResourcePoolSnapshotResponseResourcePoolSnapshot {
this := GetResourcePoolSnapshotResponseResourcePoolSnapshot{}
return &this
}
// NewGetResourcePoolSnapshotResponseResourcePoolSnapshotWithDefaults instantiates a new GetResourcePoolSnapshotResponseResourcePoolSnapshot 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 NewGetResourcePoolSnapshotResponseResourcePoolSnapshotWithDefaults() *GetResourcePoolSnapshotResponseResourcePoolSnapshot {
this := GetResourcePoolSnapshotResponseResourcePoolSnapshot{}
return &this
}
// GetComment returns the Comment field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetComment() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) {
res, _ = o.GetCommentOk()
return
}
// GetCommentOk returns a tuple with the Comment 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 *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCommentOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) {
return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment)
}
// HasComment returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) HasComment() bool {
_, ok := o.GetCommentOk()
return ok
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetComment(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) {
setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v)
}
// SetCommentNil sets the value for Comment to be an explicit nil
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetCommentNil() {
o.Comment = nil
}
// UnsetComment ensures that no value is present for Comment, not even an explicit nil
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) UnsetComment() {
o.Comment = nil
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAt() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) {
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 *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAtOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) 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 *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetCreatedAt(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) {
setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytes() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
res, _ = o.GetLogicalSizeGigabytesOk()
return
}
// GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes)
}
// HasLogicalSizeGigabytes returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) HasLogicalSizeGigabytes() bool {
_, ok := o.GetLogicalSizeGigabytesOk()
return ok
}
// SetLogicalSizeGigabytes gets a reference to the given int64 and assigns it to the LogicalSizeGigabytes field.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetLogicalSizeGigabytes(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v)
}
// GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolId() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) {
res, _ = o.GetResourcePoolIdOk()
return
}
// GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolIdOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId)
}
// HasResourcePoolId returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) HasResourcePoolId() bool {
_, ok := o.GetResourcePoolIdOk()
return ok
}
// SetResourcePoolId gets a reference to the given string and assigns it to the ResourcePoolId field.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetResourcePoolId(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) {
setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytes() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytesOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetSizeGigabytes(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) {
setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetSnapshotName returns the SnapshotName field value if set, zero value otherwise.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotName() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) {
res, _ = o.GetSnapshotNameOk()
return
}
// GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotNameOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName)
}
// HasSnapshotName returns a boolean if a field has been set.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) HasSnapshotName() bool {
_, ok := o.GetSnapshotNameOk()
return ok
}
// SetSnapshotName gets a reference to the given string and assigns it to the SnapshotName field.
func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetSnapshotName(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) {
setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v)
}
func (o GetResourcePoolSnapshotResponseResourcePoolSnapshot) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok {
toSerialize["Comment"] = val
}
if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes); ok {
toSerialize["LogicalSizeGigabytes"] = val
}
if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId); ok {
toSerialize["ResourcePoolId"] = val
}
if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName); ok {
toSerialize["SnapshotName"] = val
}
return toSerialize, nil
}
type NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot struct {
value *GetResourcePoolSnapshotResponseResourcePoolSnapshot
isSet bool
}
func (v NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) Get() *GetResourcePoolSnapshotResponseResourcePoolSnapshot {
return v.value
}
func (v *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) Set(val *GetResourcePoolSnapshotResponseResourcePoolSnapshot) {
v.value = val
v.isSet = true
}
func (v NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) IsSet() bool {
return v.isSet
}
func (v *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetResourcePoolSnapshotResponseResourcePoolSnapshot(val *GetResourcePoolSnapshotResponseResourcePoolSnapshot) *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot {
return &NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot{value: val, isSet: true}
}
func (v NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the GetShareExportPolicyResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetShareExportPolicyResponse{}
/*
types and functions for shareExportPolicy
*/
// isModel
type GetShareExportPolicyResponseGetShareExportPolicyAttributeType = *GetShareExportPolicyResponseShareExportPolicy
type GetShareExportPolicyResponseGetShareExportPolicyArgType = GetShareExportPolicyResponseShareExportPolicy
type GetShareExportPolicyResponseGetShareExportPolicyRetType = GetShareExportPolicyResponseShareExportPolicy
func getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg GetShareExportPolicyResponseGetShareExportPolicyAttributeType) (ret GetShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseGetShareExportPolicyAttributeType(arg *GetShareExportPolicyResponseGetShareExportPolicyAttributeType, val GetShareExportPolicyResponseGetShareExportPolicyRetType) {
*arg = &val
}
// GetShareExportPolicyResponse struct for GetShareExportPolicyResponse
type GetShareExportPolicyResponse struct {
ShareExportPolicy GetShareExportPolicyResponseGetShareExportPolicyAttributeType `json:"shareExportPolicy,omitempty"`
}
// NewGetShareExportPolicyResponse instantiates a new GetShareExportPolicyResponse 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 NewGetShareExportPolicyResponse() *GetShareExportPolicyResponse {
this := GetShareExportPolicyResponse{}
return &this
}
// NewGetShareExportPolicyResponseWithDefaults instantiates a new GetShareExportPolicyResponse 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 NewGetShareExportPolicyResponseWithDefaults() *GetShareExportPolicyResponse {
this := GetShareExportPolicyResponse{}
return &this
}
// GetShareExportPolicy returns the ShareExportPolicy field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponse) GetShareExportPolicy() (res GetShareExportPolicyResponseGetShareExportPolicyRetType) {
res, _ = o.GetShareExportPolicyOk()
return
}
// GetShareExportPolicyOk returns a tuple with the ShareExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetShareExportPolicyResponse) GetShareExportPolicyOk() (ret GetShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) {
return getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy)
}
// HasShareExportPolicy returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponse) HasShareExportPolicy() bool {
_, ok := o.GetShareExportPolicyOk()
return ok
}
// SetShareExportPolicy gets a reference to the given GetShareExportPolicyResponseShareExportPolicy and assigns it to the ShareExportPolicy field.
func (o *GetShareExportPolicyResponse) SetShareExportPolicy(v GetShareExportPolicyResponseGetShareExportPolicyRetType) {
setGetShareExportPolicyResponseGetShareExportPolicyAttributeType(&o.ShareExportPolicy, v)
}
func (o GetShareExportPolicyResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy); ok {
toSerialize["ShareExportPolicy"] = val
}
return toSerialize, nil
}
type NullableGetShareExportPolicyResponse struct {
value *GetShareExportPolicyResponse
isSet bool
}
func (v NullableGetShareExportPolicyResponse) Get() *GetShareExportPolicyResponse {
return v.value
}
func (v *NullableGetShareExportPolicyResponse) Set(val *GetShareExportPolicyResponse) {
v.value = val
v.isSet = true
}
func (v NullableGetShareExportPolicyResponse) IsSet() bool {
return v.isSet
}
func (v *NullableGetShareExportPolicyResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetShareExportPolicyResponse(val *GetShareExportPolicyResponse) *NullableGetShareExportPolicyResponse {
return &NullableGetShareExportPolicyResponse{value: val, isSet: true}
}
func (v NullableGetShareExportPolicyResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetShareExportPolicyResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,371 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the GetShareExportPolicyResponseShareExportPolicy type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetShareExportPolicyResponseShareExportPolicy{}
/*
types and functions for createdAt
*/
// isDateTime
type GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType = *time.Time
type GetShareExportPolicyResponseShareExportPolicyGetCreatedAtArgType = time.Time
type GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType = time.Time
func getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType = *string
func getGetShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseShareExportPolicyGetIdAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetIdRetType) {
*arg = &val
}
type GetShareExportPolicyResponseShareExportPolicyGetIdArgType = string
type GetShareExportPolicyResponseShareExportPolicyGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType = *map[string]string
type GetShareExportPolicyResponseShareExportPolicyGetLabelsArgType = map[string]string
type GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType = map[string]string
func getGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType = *string
func getGetShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseShareExportPolicyGetNameAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetNameRetType) {
*arg = &val
}
type GetShareExportPolicyResponseShareExportPolicyGetNameArgType = string
type GetShareExportPolicyResponseShareExportPolicyGetNameRetType = string
/*
types and functions for rules
*/
// isArray
type GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule
type GetShareExportPolicyResponseShareExportPolicyGetRulesArgType = []ShareExportPolicyRule
type GetShareExportPolicyResponseShareExportPolicyGetRulesRetType = []ShareExportPolicyRule
func getGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetRulesRetType) {
*arg = &val
}
/*
types and functions for sharesUsingExportPolicy
*/
// isInteger
type GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64
type GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyArgType = int64
type GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType = int64
func getGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) {
*arg = &val
}
// GetShareExportPolicyResponseShareExportPolicy Share Export Policies
type GetShareExportPolicyResponseShareExportPolicy struct {
CreatedAt GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Share Export Policy
Id GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share export policy keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Share Export Policy
Name GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType `json:"name,omitempty"`
// List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field \"order\" within each rule
Rules GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType `json:"rules,omitempty"`
// Number of Shares using this Share Export Policy
// Can be cast to int32 without loss of precision.
SharesUsingExportPolicy GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType `json:"sharesUsingExportPolicy,omitempty"`
}
// NewGetShareExportPolicyResponseShareExportPolicy instantiates a new GetShareExportPolicyResponseShareExportPolicy 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 NewGetShareExportPolicyResponseShareExportPolicy() *GetShareExportPolicyResponseShareExportPolicy {
this := GetShareExportPolicyResponseShareExportPolicy{}
return &this
}
// NewGetShareExportPolicyResponseShareExportPolicyWithDefaults instantiates a new GetShareExportPolicyResponseShareExportPolicy 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 NewGetShareExportPolicyResponseShareExportPolicyWithDefaults() *GetShareExportPolicyResponseShareExportPolicy {
this := GetShareExportPolicyResponseShareExportPolicy{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetCreatedAt() (res GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) {
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 *GetShareExportPolicyResponseShareExportPolicy) GetCreatedAtOk() (ret GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) {
return getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) 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 *GetShareExportPolicyResponseShareExportPolicy) SetCreatedAt(v GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) {
setGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetId() (res GetShareExportPolicyResponseShareExportPolicyGetIdRetType) {
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 *GetShareExportPolicyResponseShareExportPolicy) GetIdOk() (ret GetShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) {
return getGetShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *GetShareExportPolicyResponseShareExportPolicy) SetId(v GetShareExportPolicyResponseShareExportPolicyGetIdRetType) {
setGetShareExportPolicyResponseShareExportPolicyGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetLabels() (res GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType) {
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 *GetShareExportPolicyResponseShareExportPolicy) GetLabelsOk() (ret GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) {
return getGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *GetShareExportPolicyResponseShareExportPolicy) SetLabels(v GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType) {
setGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetName() (res GetShareExportPolicyResponseShareExportPolicyGetNameRetType) {
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 *GetShareExportPolicyResponseShareExportPolicy) GetNameOk() (ret GetShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) {
return getGetShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *GetShareExportPolicyResponseShareExportPolicy) SetName(v GetShareExportPolicyResponseShareExportPolicyGetNameRetType) {
setGetShareExportPolicyResponseShareExportPolicyGetNameAttributeType(&o.Name, v)
}
// GetRules returns the Rules field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetRules() (res GetShareExportPolicyResponseShareExportPolicyGetRulesRetType) {
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 *GetShareExportPolicyResponseShareExportPolicy) GetRulesOk() (ret GetShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) {
return getGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given []ShareExportPolicyRule and assigns it to the Rules field.
func (o *GetShareExportPolicyResponseShareExportPolicy) SetRules(v GetShareExportPolicyResponseShareExportPolicyGetRulesRetType) {
setGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(&o.Rules, v)
}
// GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicy() (res GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) {
res, _ = o.GetSharesUsingExportPolicyOk()
return
}
// GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicyOk() (ret GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
return getGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy)
}
// HasSharesUsingExportPolicy returns a boolean if a field has been set.
func (o *GetShareExportPolicyResponseShareExportPolicy) HasSharesUsingExportPolicy() bool {
_, ok := o.GetSharesUsingExportPolicyOk()
return ok
}
// SetSharesUsingExportPolicy gets a reference to the given int64 and assigns it to the SharesUsingExportPolicy field.
func (o *GetShareExportPolicyResponseShareExportPolicy) SetSharesUsingExportPolicy(v GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) {
setGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v)
}
func (o GetShareExportPolicyResponseShareExportPolicy) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy); ok {
toSerialize["SharesUsingExportPolicy"] = val
}
return toSerialize, nil
}
type NullableGetShareExportPolicyResponseShareExportPolicy struct {
value *GetShareExportPolicyResponseShareExportPolicy
isSet bool
}
func (v NullableGetShareExportPolicyResponseShareExportPolicy) Get() *GetShareExportPolicyResponseShareExportPolicy {
return v.value
}
func (v *NullableGetShareExportPolicyResponseShareExportPolicy) Set(val *GetShareExportPolicyResponseShareExportPolicy) {
v.value = val
v.isSet = true
}
func (v NullableGetShareExportPolicyResponseShareExportPolicy) IsSet() bool {
return v.isSet
}
func (v *NullableGetShareExportPolicyResponseShareExportPolicy) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetShareExportPolicyResponseShareExportPolicy(val *GetShareExportPolicyResponseShareExportPolicy) *NullableGetShareExportPolicyResponseShareExportPolicy {
return &NullableGetShareExportPolicyResponseShareExportPolicy{value: val, isSet: true}
}
func (v NullableGetShareExportPolicyResponseShareExportPolicy) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetShareExportPolicyResponseShareExportPolicy) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the GetShareResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetShareResponse{}
/*
types and functions for share
*/
// isModel
type GetShareResponseGetShareAttributeType = *GetShareResponseShare
type GetShareResponseGetShareArgType = GetShareResponseShare
type GetShareResponseGetShareRetType = GetShareResponseShare
func getGetShareResponseGetShareAttributeTypeOk(arg GetShareResponseGetShareAttributeType) (ret GetShareResponseGetShareRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseGetShareAttributeType(arg *GetShareResponseGetShareAttributeType, val GetShareResponseGetShareRetType) {
*arg = &val
}
// GetShareResponse struct for GetShareResponse
type GetShareResponse struct {
Share GetShareResponseGetShareAttributeType `json:"share,omitempty"`
}
// NewGetShareResponse instantiates a new GetShareResponse 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 NewGetShareResponse() *GetShareResponse {
this := GetShareResponse{}
return &this
}
// NewGetShareResponseWithDefaults instantiates a new GetShareResponse 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 NewGetShareResponseWithDefaults() *GetShareResponse {
this := GetShareResponse{}
return &this
}
// GetShare returns the Share field value if set, zero value otherwise.
func (o *GetShareResponse) GetShare() (res GetShareResponseGetShareRetType) {
res, _ = o.GetShareOk()
return
}
// GetShareOk returns a tuple with the Share field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetShareResponse) GetShareOk() (ret GetShareResponseGetShareRetType, ok bool) {
return getGetShareResponseGetShareAttributeTypeOk(o.Share)
}
// HasShare returns a boolean if a field has been set.
func (o *GetShareResponse) HasShare() bool {
_, ok := o.GetShareOk()
return ok
}
// SetShare gets a reference to the given GetShareResponseShare and assigns it to the Share field.
func (o *GetShareResponse) SetShare(v GetShareResponseGetShareRetType) {
setGetShareResponseGetShareAttributeType(&o.Share, v)
}
func (o GetShareResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetShareResponseGetShareAttributeTypeOk(o.Share); ok {
toSerialize["Share"] = val
}
return toSerialize, nil
}
type NullableGetShareResponse struct {
value *GetShareResponse
isSet bool
}
func (v NullableGetShareResponse) Get() *GetShareResponse {
return v.value
}
func (v *NullableGetShareResponse) Set(val *GetShareResponse) {
v.value = val
v.isSet = true
}
func (v NullableGetShareResponse) IsSet() bool {
return v.isSet
}
func (v *NullableGetShareResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetShareResponse(val *GetShareResponse) *NullableGetShareResponse {
return &NullableGetShareResponse{value: val, isSet: true}
}
func (v NullableGetShareResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetShareResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,479 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the GetShareResponseShare type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetShareResponseShare{}
/*
types and functions for createdAt
*/
// isDateTime
type GetShareResponseShareGetCreatedAtAttributeType = *time.Time
type GetShareResponseShareGetCreatedAtArgType = time.Time
type GetShareResponseShareGetCreatedAtRetType = time.Time
func getGetShareResponseShareGetCreatedAtAttributeTypeOk(arg GetShareResponseShareGetCreatedAtAttributeType) (ret GetShareResponseShareGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetCreatedAtAttributeType(arg *GetShareResponseShareGetCreatedAtAttributeType, val GetShareResponseShareGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for exportPolicy
*/
// isModel
type GetShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy
type GetShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy
type GetShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy
func getGetShareResponseShareGetExportPolicyAttributeTypeOk(arg GetShareResponseShareGetExportPolicyAttributeType) (ret GetShareResponseShareGetExportPolicyRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setGetShareResponseShareGetExportPolicyAttributeType(arg *GetShareResponseShareGetExportPolicyAttributeType, val GetShareResponseShareGetExportPolicyRetType) {
*arg = val
}
/*
types and functions for id
*/
// isNotNullableString
type GetShareResponseShareGetIdAttributeType = *string
func getGetShareResponseShareGetIdAttributeTypeOk(arg GetShareResponseShareGetIdAttributeType) (ret GetShareResponseShareGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetIdAttributeType(arg *GetShareResponseShareGetIdAttributeType, val GetShareResponseShareGetIdRetType) {
*arg = &val
}
type GetShareResponseShareGetIdArgType = string
type GetShareResponseShareGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type GetShareResponseShareGetLabelsAttributeType = *map[string]string
type GetShareResponseShareGetLabelsArgType = map[string]string
type GetShareResponseShareGetLabelsRetType = map[string]string
func getGetShareResponseShareGetLabelsAttributeTypeOk(arg GetShareResponseShareGetLabelsAttributeType) (ret GetShareResponseShareGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetLabelsAttributeType(arg *GetShareResponseShareGetLabelsAttributeType, val GetShareResponseShareGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type GetShareResponseShareGetMountPathAttributeType = *string
func getGetShareResponseShareGetMountPathAttributeTypeOk(arg GetShareResponseShareGetMountPathAttributeType) (ret GetShareResponseShareGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetMountPathAttributeType(arg *GetShareResponseShareGetMountPathAttributeType, val GetShareResponseShareGetMountPathRetType) {
*arg = &val
}
type GetShareResponseShareGetMountPathArgType = string
type GetShareResponseShareGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type GetShareResponseShareGetNameAttributeType = *string
func getGetShareResponseShareGetNameAttributeTypeOk(arg GetShareResponseShareGetNameAttributeType) (ret GetShareResponseShareGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetNameAttributeType(arg *GetShareResponseShareGetNameAttributeType, val GetShareResponseShareGetNameRetType) {
*arg = &val
}
type GetShareResponseShareGetNameArgType = string
type GetShareResponseShareGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64
type GetShareResponseShareGetSpaceHardLimitGigabytesArgType = int64
type GetShareResponseShareGetSpaceHardLimitGigabytesRetType = int64
func getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret GetShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val GetShareResponseShareGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type GetShareResponseShareGetStateAttributeType = *string
func getGetShareResponseShareGetStateAttributeTypeOk(arg GetShareResponseShareGetStateAttributeType) (ret GetShareResponseShareGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGetShareResponseShareGetStateAttributeType(arg *GetShareResponseShareGetStateAttributeType, val GetShareResponseShareGetStateRetType) {
*arg = &val
}
type GetShareResponseShareGetStateArgType = string
type GetShareResponseShareGetStateRetType = string
// GetShareResponseShare Share
type GetShareResponseShare struct {
CreatedAt GetShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
ExportPolicy GetShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
// ID of the Share
Id GetShareResponseShareGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels GetShareResponseShareGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Share, used to mount the Share
MountPath GetShareResponseShareGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Share
Name GetShareResponseShareGetNameAttributeType `json:"name,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
State GetShareResponseShareGetStateAttributeType `json:"state,omitempty"`
}
// NewGetShareResponseShare instantiates a new GetShareResponseShare 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 NewGetShareResponseShare() *GetShareResponseShare {
this := GetShareResponseShare{}
return &this
}
// NewGetShareResponseShareWithDefaults instantiates a new GetShareResponseShare 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 NewGetShareResponseShareWithDefaults() *GetShareResponseShare {
this := GetShareResponseShare{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetCreatedAt() (res GetShareResponseShareGetCreatedAtRetType) {
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 *GetShareResponseShare) GetCreatedAtOk() (ret GetShareResponseShareGetCreatedAtRetType, ok bool) {
return getGetShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *GetShareResponseShare) 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 *GetShareResponseShare) SetCreatedAt(v GetShareResponseShareGetCreatedAtRetType) {
setGetShareResponseShareGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetExportPolicy returns the ExportPolicy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *GetShareResponseShare) GetExportPolicy() (res GetShareResponseShareGetExportPolicyRetType) {
res, _ = o.GetExportPolicyOk()
return
}
// GetExportPolicyOk returns a tuple with the ExportPolicy 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 *GetShareResponseShare) GetExportPolicyOk() (ret GetShareResponseShareGetExportPolicyRetType, ok bool) {
return getGetShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
}
// HasExportPolicy returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasExportPolicy() bool {
_, ok := o.GetExportPolicyOk()
return ok
}
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
func (o *GetShareResponseShare) SetExportPolicy(v GetShareResponseShareGetExportPolicyRetType) {
setGetShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
}
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
func (o *GetShareResponseShare) SetExportPolicyNil() {
o.ExportPolicy = nil
}
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
func (o *GetShareResponseShare) UnsetExportPolicy() {
o.ExportPolicy = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetId() (res GetShareResponseShareGetIdRetType) {
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 *GetShareResponseShare) GetIdOk() (ret GetShareResponseShareGetIdRetType, ok bool) {
return getGetShareResponseShareGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *GetShareResponseShare) SetId(v GetShareResponseShareGetIdRetType) {
setGetShareResponseShareGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetLabels() (res GetShareResponseShareGetLabelsRetType) {
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 *GetShareResponseShare) GetLabelsOk() (ret GetShareResponseShareGetLabelsRetType, ok bool) {
return getGetShareResponseShareGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *GetShareResponseShare) SetLabels(v GetShareResponseShareGetLabelsRetType) {
setGetShareResponseShareGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetMountPath() (res GetShareResponseShareGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetShareResponseShare) GetMountPathOk() (ret GetShareResponseShareGetMountPathRetType, ok bool) {
return getGetShareResponseShareGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *GetShareResponseShare) SetMountPath(v GetShareResponseShareGetMountPathRetType) {
setGetShareResponseShareGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetName() (res GetShareResponseShareGetNameRetType) {
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 *GetShareResponseShare) GetNameOk() (ret GetShareResponseShareGetNameRetType, ok bool) {
return getGetShareResponseShareGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *GetShareResponseShare) SetName(v GetShareResponseShareGetNameRetType) {
setGetShareResponseShareGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetSpaceHardLimitGigabytes() (res GetShareResponseShareGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret GetShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
return getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *GetShareResponseShare) SetSpaceHardLimitGigabytes(v GetShareResponseShareGetSpaceHardLimitGigabytesRetType) {
setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *GetShareResponseShare) GetState() (res GetShareResponseShareGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetShareResponseShare) GetStateOk() (ret GetShareResponseShareGetStateRetType, ok bool) {
return getGetShareResponseShareGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *GetShareResponseShare) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *GetShareResponseShare) SetState(v GetShareResponseShareGetStateRetType) {
setGetShareResponseShareGetStateAttributeType(&o.State, v)
}
func (o GetShareResponseShare) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGetShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getGetShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
toSerialize["ExportPolicy"] = val
}
if val, ok := getGetShareResponseShareGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getGetShareResponseShareGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getGetShareResponseShareGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getGetShareResponseShareGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
if val, ok := getGetShareResponseShareGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableGetShareResponseShare struct {
value *GetShareResponseShare
isSet bool
}
func (v NullableGetShareResponseShare) Get() *GetShareResponseShare {
return v.value
}
func (v *NullableGetShareResponseShare) Set(val *GetShareResponseShare) {
v.value = val
v.isSet = true
}
func (v NullableGetShareResponseShare) IsSet() bool {
return v.isSet
}
func (v *NullableGetShareResponseShare) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetShareResponseShare(val *GetShareResponseShare) *NullableGetShareResponseShare {
return &NullableGetShareResponseShare{value: val, isSet: true}
}
func (v NullableGetShareResponseShare) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetShareResponseShare) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,137 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GoogleProtobufAny{}
/*
types and functions for @type
*/
// isNotNullableString
type GoogleProtobufAnyGetTypeAttributeType = *string
func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttributeType) (ret GoogleProtobufAnyGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setGoogleProtobufAnyGetTypeAttributeType(arg *GoogleProtobufAnyGetTypeAttributeType, val GoogleProtobufAnyGetTypeRetType) {
*arg = &val
}
type GoogleProtobufAnyGetTypeArgType = string
type GoogleProtobufAnyGetTypeRetType = string
// GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
type GoogleProtobufAny struct {
// The type of the serialized message.
Type GoogleProtobufAnyGetTypeAttributeType `json:"@type,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GoogleProtobufAny GoogleProtobufAny
// NewGoogleProtobufAny instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAny() *GoogleProtobufAny {
this := GoogleProtobufAny{}
return &this
}
// NewGoogleProtobufAnyWithDefaults instantiates a new GoogleProtobufAny 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 NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny {
this := GoogleProtobufAny{}
return &this
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) {
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 *GoogleProtobufAny) GetTypeOk() (ret GoogleProtobufAnyGetTypeRetType, ok bool) {
return getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type)
}
// HasType returns a boolean if a field has been set.
func (o *GoogleProtobufAny) HasType() bool {
_, ok := o.GetTypeOk()
return ok
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *GoogleProtobufAny) SetType(v GoogleProtobufAnyGetTypeRetType) {
setGoogleProtobufAnyGetTypeAttributeType(&o.Type, v)
}
func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
type NullableGoogleProtobufAny struct {
value *GoogleProtobufAny
isSet bool
}
func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny {
return v.value
}
func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) {
v.value = val
v.isSet = true
}
func (v NullableGoogleProtobufAny) IsSet() bool {
return v.isSet
}
func (v *NullableGoogleProtobufAny) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny {
return &NullableGoogleProtobufAny{value: val, isSet: true}
}
func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,128 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ListPerformanceClassesResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListPerformanceClassesResponse{}
/*
types and functions for performanceClasses
*/
// isArray
type ListPerformanceClassesResponseGetPerformanceClassesAttributeType = *[]PerformanceClass
type ListPerformanceClassesResponseGetPerformanceClassesArgType = []PerformanceClass
type ListPerformanceClassesResponseGetPerformanceClassesRetType = []PerformanceClass
func getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(arg ListPerformanceClassesResponseGetPerformanceClassesAttributeType) (ret ListPerformanceClassesResponseGetPerformanceClassesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListPerformanceClassesResponseGetPerformanceClassesAttributeType(arg *ListPerformanceClassesResponseGetPerformanceClassesAttributeType, val ListPerformanceClassesResponseGetPerformanceClassesRetType) {
*arg = &val
}
// ListPerformanceClassesResponse struct for ListPerformanceClassesResponse
type ListPerformanceClassesResponse struct {
// List of Performance Classes
PerformanceClasses ListPerformanceClassesResponseGetPerformanceClassesAttributeType `json:"performanceClasses,omitempty"`
}
// NewListPerformanceClassesResponse instantiates a new ListPerformanceClassesResponse 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 NewListPerformanceClassesResponse() *ListPerformanceClassesResponse {
this := ListPerformanceClassesResponse{}
return &this
}
// NewListPerformanceClassesResponseWithDefaults instantiates a new ListPerformanceClassesResponse 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 NewListPerformanceClassesResponseWithDefaults() *ListPerformanceClassesResponse {
this := ListPerformanceClassesResponse{}
return &this
}
// GetPerformanceClasses returns the PerformanceClasses field value if set, zero value otherwise.
func (o *ListPerformanceClassesResponse) GetPerformanceClasses() (res ListPerformanceClassesResponseGetPerformanceClassesRetType) {
res, _ = o.GetPerformanceClassesOk()
return
}
// GetPerformanceClassesOk returns a tuple with the PerformanceClasses field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ListPerformanceClassesResponse) GetPerformanceClassesOk() (ret ListPerformanceClassesResponseGetPerformanceClassesRetType, ok bool) {
return getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(o.PerformanceClasses)
}
// HasPerformanceClasses returns a boolean if a field has been set.
func (o *ListPerformanceClassesResponse) HasPerformanceClasses() bool {
_, ok := o.GetPerformanceClassesOk()
return ok
}
// SetPerformanceClasses gets a reference to the given []PerformanceClass and assigns it to the PerformanceClasses field.
func (o *ListPerformanceClassesResponse) SetPerformanceClasses(v ListPerformanceClassesResponseGetPerformanceClassesRetType) {
setListPerformanceClassesResponseGetPerformanceClassesAttributeType(&o.PerformanceClasses, v)
}
func (o ListPerformanceClassesResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(o.PerformanceClasses); ok {
toSerialize["PerformanceClasses"] = val
}
return toSerialize, nil
}
type NullableListPerformanceClassesResponse struct {
value *ListPerformanceClassesResponse
isSet bool
}
func (v NullableListPerformanceClassesResponse) Get() *ListPerformanceClassesResponse {
return v.value
}
func (v *NullableListPerformanceClassesResponse) Set(val *ListPerformanceClassesResponse) {
v.value = val
v.isSet = true
}
func (v NullableListPerformanceClassesResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListPerformanceClassesResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListPerformanceClassesResponse(val *ListPerformanceClassesResponse) *NullableListPerformanceClassesResponse {
return &NullableListPerformanceClassesResponse{value: val, isSet: true}
}
func (v NullableListPerformanceClassesResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListPerformanceClassesResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,128 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ListResourcePoolSnapshotsResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListResourcePoolSnapshotsResponse{}
/*
types and functions for resourcePoolSnapshots
*/
// isArray
type ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType = *[]ResourcePoolSnapshot
type ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsArgType = []ResourcePoolSnapshot
type ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType = []ResourcePoolSnapshot
func getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk(arg ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType) (ret ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType(arg *ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType, val ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType) {
*arg = &val
}
// ListResourcePoolSnapshotsResponse struct for ListResourcePoolSnapshotsResponse
type ListResourcePoolSnapshotsResponse struct {
// List of Resource Pool Snapshots
ResourcePoolSnapshots ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType `json:"resourcePoolSnapshots,omitempty"`
}
// NewListResourcePoolSnapshotsResponse instantiates a new ListResourcePoolSnapshotsResponse 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 NewListResourcePoolSnapshotsResponse() *ListResourcePoolSnapshotsResponse {
this := ListResourcePoolSnapshotsResponse{}
return &this
}
// NewListResourcePoolSnapshotsResponseWithDefaults instantiates a new ListResourcePoolSnapshotsResponse 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 NewListResourcePoolSnapshotsResponseWithDefaults() *ListResourcePoolSnapshotsResponse {
this := ListResourcePoolSnapshotsResponse{}
return &this
}
// GetResourcePoolSnapshots returns the ResourcePoolSnapshots field value if set, zero value otherwise.
func (o *ListResourcePoolSnapshotsResponse) GetResourcePoolSnapshots() (res ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType) {
res, _ = o.GetResourcePoolSnapshotsOk()
return
}
// GetResourcePoolSnapshotsOk returns a tuple with the ResourcePoolSnapshots field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ListResourcePoolSnapshotsResponse) GetResourcePoolSnapshotsOk() (ret ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType, ok bool) {
return getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk(o.ResourcePoolSnapshots)
}
// HasResourcePoolSnapshots returns a boolean if a field has been set.
func (o *ListResourcePoolSnapshotsResponse) HasResourcePoolSnapshots() bool {
_, ok := o.GetResourcePoolSnapshotsOk()
return ok
}
// SetResourcePoolSnapshots gets a reference to the given []ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshots field.
func (o *ListResourcePoolSnapshotsResponse) SetResourcePoolSnapshots(v ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType) {
setListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType(&o.ResourcePoolSnapshots, v)
}
func (o ListResourcePoolSnapshotsResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk(o.ResourcePoolSnapshots); ok {
toSerialize["ResourcePoolSnapshots"] = val
}
return toSerialize, nil
}
type NullableListResourcePoolSnapshotsResponse struct {
value *ListResourcePoolSnapshotsResponse
isSet bool
}
func (v NullableListResourcePoolSnapshotsResponse) Get() *ListResourcePoolSnapshotsResponse {
return v.value
}
func (v *NullableListResourcePoolSnapshotsResponse) Set(val *ListResourcePoolSnapshotsResponse) {
v.value = val
v.isSet = true
}
func (v NullableListResourcePoolSnapshotsResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListResourcePoolSnapshotsResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListResourcePoolSnapshotsResponse(val *ListResourcePoolSnapshotsResponse) *NullableListResourcePoolSnapshotsResponse {
return &NullableListResourcePoolSnapshotsResponse{value: val, isSet: true}
}
func (v NullableListResourcePoolSnapshotsResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListResourcePoolSnapshotsResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,128 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ListResourcePoolsResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListResourcePoolsResponse{}
/*
types and functions for resourcePools
*/
// isArray
type ListResourcePoolsResponseGetResourcePoolsAttributeType = *[]ResourcePool
type ListResourcePoolsResponseGetResourcePoolsArgType = []ResourcePool
type ListResourcePoolsResponseGetResourcePoolsRetType = []ResourcePool
func getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(arg ListResourcePoolsResponseGetResourcePoolsAttributeType) (ret ListResourcePoolsResponseGetResourcePoolsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListResourcePoolsResponseGetResourcePoolsAttributeType(arg *ListResourcePoolsResponseGetResourcePoolsAttributeType, val ListResourcePoolsResponseGetResourcePoolsRetType) {
*arg = &val
}
// ListResourcePoolsResponse struct for ListResourcePoolsResponse
type ListResourcePoolsResponse struct {
// List of Resource Pools
ResourcePools ListResourcePoolsResponseGetResourcePoolsAttributeType `json:"resourcePools,omitempty"`
}
// NewListResourcePoolsResponse instantiates a new ListResourcePoolsResponse 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 NewListResourcePoolsResponse() *ListResourcePoolsResponse {
this := ListResourcePoolsResponse{}
return &this
}
// NewListResourcePoolsResponseWithDefaults instantiates a new ListResourcePoolsResponse 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 NewListResourcePoolsResponseWithDefaults() *ListResourcePoolsResponse {
this := ListResourcePoolsResponse{}
return &this
}
// GetResourcePools returns the ResourcePools field value if set, zero value otherwise.
func (o *ListResourcePoolsResponse) GetResourcePools() (res ListResourcePoolsResponseGetResourcePoolsRetType) {
res, _ = o.GetResourcePoolsOk()
return
}
// GetResourcePoolsOk returns a tuple with the ResourcePools field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ListResourcePoolsResponse) GetResourcePoolsOk() (ret ListResourcePoolsResponseGetResourcePoolsRetType, ok bool) {
return getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(o.ResourcePools)
}
// HasResourcePools returns a boolean if a field has been set.
func (o *ListResourcePoolsResponse) HasResourcePools() bool {
_, ok := o.GetResourcePoolsOk()
return ok
}
// SetResourcePools gets a reference to the given []ResourcePool and assigns it to the ResourcePools field.
func (o *ListResourcePoolsResponse) SetResourcePools(v ListResourcePoolsResponseGetResourcePoolsRetType) {
setListResourcePoolsResponseGetResourcePoolsAttributeType(&o.ResourcePools, v)
}
func (o ListResourcePoolsResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(o.ResourcePools); ok {
toSerialize["ResourcePools"] = val
}
return toSerialize, nil
}
type NullableListResourcePoolsResponse struct {
value *ListResourcePoolsResponse
isSet bool
}
func (v NullableListResourcePoolsResponse) Get() *ListResourcePoolsResponse {
return v.value
}
func (v *NullableListResourcePoolsResponse) Set(val *ListResourcePoolsResponse) {
v.value = val
v.isSet = true
}
func (v NullableListResourcePoolsResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListResourcePoolsResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListResourcePoolsResponse(val *ListResourcePoolsResponse) *NullableListResourcePoolsResponse {
return &NullableListResourcePoolsResponse{value: val, isSet: true}
}
func (v NullableListResourcePoolsResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListResourcePoolsResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,128 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ListShareExportPoliciesResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListShareExportPoliciesResponse{}
/*
types and functions for shareExportPolicies
*/
// isArray
type ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType = *[]ShareExportPolicy
type ListShareExportPoliciesResponseGetShareExportPoliciesArgType = []ShareExportPolicy
type ListShareExportPoliciesResponseGetShareExportPoliciesRetType = []ShareExportPolicy
func getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(arg ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType) (ret ListShareExportPoliciesResponseGetShareExportPoliciesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListShareExportPoliciesResponseGetShareExportPoliciesAttributeType(arg *ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType, val ListShareExportPoliciesResponseGetShareExportPoliciesRetType) {
*arg = &val
}
// ListShareExportPoliciesResponse struct for ListShareExportPoliciesResponse
type ListShareExportPoliciesResponse struct {
// List of Share Export Policies
ShareExportPolicies ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType `json:"shareExportPolicies,omitempty"`
}
// NewListShareExportPoliciesResponse instantiates a new ListShareExportPoliciesResponse 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 NewListShareExportPoliciesResponse() *ListShareExportPoliciesResponse {
this := ListShareExportPoliciesResponse{}
return &this
}
// NewListShareExportPoliciesResponseWithDefaults instantiates a new ListShareExportPoliciesResponse 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 NewListShareExportPoliciesResponseWithDefaults() *ListShareExportPoliciesResponse {
this := ListShareExportPoliciesResponse{}
return &this
}
// GetShareExportPolicies returns the ShareExportPolicies field value if set, zero value otherwise.
func (o *ListShareExportPoliciesResponse) GetShareExportPolicies() (res ListShareExportPoliciesResponseGetShareExportPoliciesRetType) {
res, _ = o.GetShareExportPoliciesOk()
return
}
// GetShareExportPoliciesOk returns a tuple with the ShareExportPolicies field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ListShareExportPoliciesResponse) GetShareExportPoliciesOk() (ret ListShareExportPoliciesResponseGetShareExportPoliciesRetType, ok bool) {
return getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(o.ShareExportPolicies)
}
// HasShareExportPolicies returns a boolean if a field has been set.
func (o *ListShareExportPoliciesResponse) HasShareExportPolicies() bool {
_, ok := o.GetShareExportPoliciesOk()
return ok
}
// SetShareExportPolicies gets a reference to the given []ShareExportPolicy and assigns it to the ShareExportPolicies field.
func (o *ListShareExportPoliciesResponse) SetShareExportPolicies(v ListShareExportPoliciesResponseGetShareExportPoliciesRetType) {
setListShareExportPoliciesResponseGetShareExportPoliciesAttributeType(&o.ShareExportPolicies, v)
}
func (o ListShareExportPoliciesResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(o.ShareExportPolicies); ok {
toSerialize["ShareExportPolicies"] = val
}
return toSerialize, nil
}
type NullableListShareExportPoliciesResponse struct {
value *ListShareExportPoliciesResponse
isSet bool
}
func (v NullableListShareExportPoliciesResponse) Get() *ListShareExportPoliciesResponse {
return v.value
}
func (v *NullableListShareExportPoliciesResponse) Set(val *ListShareExportPoliciesResponse) {
v.value = val
v.isSet = true
}
func (v NullableListShareExportPoliciesResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListShareExportPoliciesResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListShareExportPoliciesResponse(val *ListShareExportPoliciesResponse) *NullableListShareExportPoliciesResponse {
return &NullableListShareExportPoliciesResponse{value: val, isSet: true}
}
func (v NullableListShareExportPoliciesResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListShareExportPoliciesResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,128 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ListSharesResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListSharesResponse{}
/*
types and functions for shares
*/
// isArray
type ListSharesResponseGetSharesAttributeType = *[]Share
type ListSharesResponseGetSharesArgType = []Share
type ListSharesResponseGetSharesRetType = []Share
func getListSharesResponseGetSharesAttributeTypeOk(arg ListSharesResponseGetSharesAttributeType) (ret ListSharesResponseGetSharesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListSharesResponseGetSharesAttributeType(arg *ListSharesResponseGetSharesAttributeType, val ListSharesResponseGetSharesRetType) {
*arg = &val
}
// ListSharesResponse struct for ListSharesResponse
type ListSharesResponse struct {
// List of Shares
Shares ListSharesResponseGetSharesAttributeType `json:"shares,omitempty"`
}
// NewListSharesResponse instantiates a new ListSharesResponse 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 NewListSharesResponse() *ListSharesResponse {
this := ListSharesResponse{}
return &this
}
// NewListSharesResponseWithDefaults instantiates a new ListSharesResponse 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 NewListSharesResponseWithDefaults() *ListSharesResponse {
this := ListSharesResponse{}
return &this
}
// GetShares returns the Shares field value if set, zero value otherwise.
func (o *ListSharesResponse) GetShares() (res ListSharesResponseGetSharesRetType) {
res, _ = o.GetSharesOk()
return
}
// GetSharesOk returns a tuple with the Shares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ListSharesResponse) GetSharesOk() (ret ListSharesResponseGetSharesRetType, ok bool) {
return getListSharesResponseGetSharesAttributeTypeOk(o.Shares)
}
// HasShares returns a boolean if a field has been set.
func (o *ListSharesResponse) HasShares() bool {
_, ok := o.GetSharesOk()
return ok
}
// SetShares gets a reference to the given []Share and assigns it to the Shares field.
func (o *ListSharesResponse) SetShares(v ListSharesResponseGetSharesRetType) {
setListSharesResponseGetSharesAttributeType(&o.Shares, v)
}
func (o ListSharesResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListSharesResponseGetSharesAttributeTypeOk(o.Shares); ok {
toSerialize["Shares"] = val
}
return toSerialize, nil
}
type NullableListSharesResponse struct {
value *ListSharesResponse
isSet bool
}
func (v NullableListSharesResponse) Get() *ListSharesResponse {
return v.value
}
func (v *NullableListSharesResponse) Set(val *ListSharesResponse) {
v.value = val
v.isSet = true
}
func (v NullableListSharesResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListSharesResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListSharesResponse(val *ListSharesResponse) *NullableListSharesResponse {
return &NullableListSharesResponse{value: val, isSet: true}
}
func (v NullableListSharesResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListSharesResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,128 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ListSnapshotSchedulesResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ListSnapshotSchedulesResponse{}
/*
types and functions for snapshotSchedules
*/
// isArray
type ListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeType = *[]SnapshotSchedule
type ListSnapshotSchedulesResponseGetSnapshotSchedulesArgType = []SnapshotSchedule
type ListSnapshotSchedulesResponseGetSnapshotSchedulesRetType = []SnapshotSchedule
func getListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeTypeOk(arg ListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeType) (ret ListSnapshotSchedulesResponseGetSnapshotSchedulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeType(arg *ListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeType, val ListSnapshotSchedulesResponseGetSnapshotSchedulesRetType) {
*arg = &val
}
// ListSnapshotSchedulesResponse struct for ListSnapshotSchedulesResponse
type ListSnapshotSchedulesResponse struct {
// List of Snapshot Schedules
SnapshotSchedules ListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeType `json:"snapshotSchedules,omitempty"`
}
// NewListSnapshotSchedulesResponse instantiates a new ListSnapshotSchedulesResponse 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 NewListSnapshotSchedulesResponse() *ListSnapshotSchedulesResponse {
this := ListSnapshotSchedulesResponse{}
return &this
}
// NewListSnapshotSchedulesResponseWithDefaults instantiates a new ListSnapshotSchedulesResponse 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 NewListSnapshotSchedulesResponseWithDefaults() *ListSnapshotSchedulesResponse {
this := ListSnapshotSchedulesResponse{}
return &this
}
// GetSnapshotSchedules returns the SnapshotSchedules field value if set, zero value otherwise.
func (o *ListSnapshotSchedulesResponse) GetSnapshotSchedules() (res ListSnapshotSchedulesResponseGetSnapshotSchedulesRetType) {
res, _ = o.GetSnapshotSchedulesOk()
return
}
// GetSnapshotSchedulesOk returns a tuple with the SnapshotSchedules field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ListSnapshotSchedulesResponse) GetSnapshotSchedulesOk() (ret ListSnapshotSchedulesResponseGetSnapshotSchedulesRetType, ok bool) {
return getListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeTypeOk(o.SnapshotSchedules)
}
// HasSnapshotSchedules returns a boolean if a field has been set.
func (o *ListSnapshotSchedulesResponse) HasSnapshotSchedules() bool {
_, ok := o.GetSnapshotSchedulesOk()
return ok
}
// SetSnapshotSchedules gets a reference to the given []SnapshotSchedule and assigns it to the SnapshotSchedules field.
func (o *ListSnapshotSchedulesResponse) SetSnapshotSchedules(v ListSnapshotSchedulesResponseGetSnapshotSchedulesRetType) {
setListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeType(&o.SnapshotSchedules, v)
}
func (o ListSnapshotSchedulesResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getListSnapshotSchedulesResponseGetSnapshotSchedulesAttributeTypeOk(o.SnapshotSchedules); ok {
toSerialize["SnapshotSchedules"] = val
}
return toSerialize, nil
}
type NullableListSnapshotSchedulesResponse struct {
value *ListSnapshotSchedulesResponse
isSet bool
}
func (v NullableListSnapshotSchedulesResponse) Get() *ListSnapshotSchedulesResponse {
return v.value
}
func (v *NullableListSnapshotSchedulesResponse) Set(val *ListSnapshotSchedulesResponse) {
v.value = val
v.isSet = true
}
func (v NullableListSnapshotSchedulesResponse) IsSet() bool {
return v.isSet
}
func (v *NullableListSnapshotSchedulesResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableListSnapshotSchedulesResponse(val *ListSnapshotSchedulesResponse) *NullableListSnapshotSchedulesResponse {
return &NullableListSnapshotSchedulesResponse{value: val, isSet: true}
}
func (v NullableListSnapshotSchedulesResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableListSnapshotSchedulesResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,227 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the PerformanceClass type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PerformanceClass{}
/*
types and functions for iops
*/
// isInteger
type PerformanceClassGetIopsAttributeType = *int64
type PerformanceClassGetIopsArgType = int64
type PerformanceClassGetIopsRetType = int64
func getPerformanceClassGetIopsAttributeTypeOk(arg PerformanceClassGetIopsAttributeType) (ret PerformanceClassGetIopsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPerformanceClassGetIopsAttributeType(arg *PerformanceClassGetIopsAttributeType, val PerformanceClassGetIopsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type PerformanceClassGetNameAttributeType = *string
func getPerformanceClassGetNameAttributeTypeOk(arg PerformanceClassGetNameAttributeType) (ret PerformanceClassGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPerformanceClassGetNameAttributeType(arg *PerformanceClassGetNameAttributeType, val PerformanceClassGetNameRetType) {
*arg = &val
}
type PerformanceClassGetNameArgType = string
type PerformanceClassGetNameRetType = string
/*
types and functions for throughput
*/
// isInteger
type PerformanceClassGetThroughputAttributeType = *int64
type PerformanceClassGetThroughputArgType = int64
type PerformanceClassGetThroughputRetType = int64
func getPerformanceClassGetThroughputAttributeTypeOk(arg PerformanceClassGetThroughputAttributeType) (ret PerformanceClassGetThroughputRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setPerformanceClassGetThroughputAttributeType(arg *PerformanceClassGetThroughputAttributeType, val PerformanceClassGetThroughputRetType) {
*arg = &val
}
// PerformanceClass struct for PerformanceClass
type PerformanceClass struct {
// IOPS of the Performance Class
// Can be cast to int32 without loss of precision.
Iops PerformanceClassGetIopsAttributeType `json:"iops,omitempty"`
// Name of the Performance Class
Name PerformanceClassGetNameAttributeType `json:"name,omitempty"`
// Throughput of the Performance Class
// Can be cast to int32 without loss of precision.
Throughput PerformanceClassGetThroughputAttributeType `json:"throughput,omitempty"`
}
// NewPerformanceClass instantiates a new PerformanceClass 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 NewPerformanceClass() *PerformanceClass {
this := PerformanceClass{}
return &this
}
// NewPerformanceClassWithDefaults instantiates a new PerformanceClass 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 NewPerformanceClassWithDefaults() *PerformanceClass {
this := PerformanceClass{}
return &this
}
// GetIops returns the Iops field value if set, zero value otherwise.
func (o *PerformanceClass) GetIops() (res PerformanceClassGetIopsRetType) {
res, _ = o.GetIopsOk()
return
}
// GetIopsOk returns a tuple with the Iops field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceClass) GetIopsOk() (ret PerformanceClassGetIopsRetType, ok bool) {
return getPerformanceClassGetIopsAttributeTypeOk(o.Iops)
}
// HasIops returns a boolean if a field has been set.
func (o *PerformanceClass) HasIops() bool {
_, ok := o.GetIopsOk()
return ok
}
// SetIops gets a reference to the given int64 and assigns it to the Iops field.
func (o *PerformanceClass) SetIops(v PerformanceClassGetIopsRetType) {
setPerformanceClassGetIopsAttributeType(&o.Iops, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *PerformanceClass) GetName() (res PerformanceClassGetNameRetType) {
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 *PerformanceClass) GetNameOk() (ret PerformanceClassGetNameRetType, ok bool) {
return getPerformanceClassGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *PerformanceClass) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *PerformanceClass) SetName(v PerformanceClassGetNameRetType) {
setPerformanceClassGetNameAttributeType(&o.Name, v)
}
// GetThroughput returns the Throughput field value if set, zero value otherwise.
func (o *PerformanceClass) GetThroughput() (res PerformanceClassGetThroughputRetType) {
res, _ = o.GetThroughputOk()
return
}
// GetThroughputOk returns a tuple with the Throughput field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PerformanceClass) GetThroughputOk() (ret PerformanceClassGetThroughputRetType, ok bool) {
return getPerformanceClassGetThroughputAttributeTypeOk(o.Throughput)
}
// HasThroughput returns a boolean if a field has been set.
func (o *PerformanceClass) HasThroughput() bool {
_, ok := o.GetThroughputOk()
return ok
}
// SetThroughput gets a reference to the given int64 and assigns it to the Throughput field.
func (o *PerformanceClass) SetThroughput(v PerformanceClassGetThroughputRetType) {
setPerformanceClassGetThroughputAttributeType(&o.Throughput, v)
}
func (o PerformanceClass) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getPerformanceClassGetIopsAttributeTypeOk(o.Iops); ok {
toSerialize["Iops"] = val
}
if val, ok := getPerformanceClassGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getPerformanceClassGetThroughputAttributeTypeOk(o.Throughput); ok {
toSerialize["Throughput"] = val
}
return toSerialize, nil
}
type NullablePerformanceClass struct {
value *PerformanceClass
isSet bool
}
func (v NullablePerformanceClass) Get() *PerformanceClass {
return v.value
}
func (v *NullablePerformanceClass) Set(val *PerformanceClass) {
v.value = val
v.isSet = true
}
func (v NullablePerformanceClass) IsSet() bool {
return v.isSet
}
func (v *NullablePerformanceClass) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePerformanceClass(val *PerformanceClass) *NullablePerformanceClass {
return &NullablePerformanceClass{value: val, isSet: true}
}
func (v NullablePerformanceClass) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePerformanceClass) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,802 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the ResourcePool type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourcePool{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type ResourcePoolGetAvailabilityZoneAttributeType = *string
func getResourcePoolGetAvailabilityZoneAttributeTypeOk(arg ResourcePoolGetAvailabilityZoneAttributeType) (ret ResourcePoolGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetAvailabilityZoneAttributeType(arg *ResourcePoolGetAvailabilityZoneAttributeType, val ResourcePoolGetAvailabilityZoneRetType) {
*arg = &val
}
type ResourcePoolGetAvailabilityZoneArgType = string
type ResourcePoolGetAvailabilityZoneRetType = string
/*
types and functions for countShares
*/
// isInteger
type ResourcePoolGetCountSharesAttributeType = *int64
type ResourcePoolGetCountSharesArgType = int64
type ResourcePoolGetCountSharesRetType = int64
func getResourcePoolGetCountSharesAttributeTypeOk(arg ResourcePoolGetCountSharesAttributeType) (ret ResourcePoolGetCountSharesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetCountSharesAttributeType(arg *ResourcePoolGetCountSharesAttributeType, val ResourcePoolGetCountSharesRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type ResourcePoolGetCreatedAtAttributeType = *time.Time
type ResourcePoolGetCreatedAtArgType = time.Time
type ResourcePoolGetCreatedAtRetType = time.Time
func getResourcePoolGetCreatedAtAttributeTypeOk(arg ResourcePoolGetCreatedAtAttributeType) (ret ResourcePoolGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetCreatedAtAttributeType(arg *ResourcePoolGetCreatedAtAttributeType, val ResourcePoolGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type ResourcePoolGetIdAttributeType = *string
func getResourcePoolGetIdAttributeTypeOk(arg ResourcePoolGetIdAttributeType) (ret ResourcePoolGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetIdAttributeType(arg *ResourcePoolGetIdAttributeType, val ResourcePoolGetIdRetType) {
*arg = &val
}
type ResourcePoolGetIdArgType = string
type ResourcePoolGetIdRetType = string
/*
types and functions for ipAcl
*/
// isArray
type ResourcePoolGetIpAclAttributeType = *[]string
type ResourcePoolGetIpAclArgType = []string
type ResourcePoolGetIpAclRetType = []string
func getResourcePoolGetIpAclAttributeTypeOk(arg ResourcePoolGetIpAclAttributeType) (ret ResourcePoolGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetIpAclAttributeType(arg *ResourcePoolGetIpAclAttributeType, val ResourcePoolGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type ResourcePoolGetLabelsAttributeType = *map[string]string
type ResourcePoolGetLabelsArgType = map[string]string
type ResourcePoolGetLabelsRetType = map[string]string
func getResourcePoolGetLabelsAttributeTypeOk(arg ResourcePoolGetLabelsAttributeType) (ret ResourcePoolGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetLabelsAttributeType(arg *ResourcePoolGetLabelsAttributeType, val ResourcePoolGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type ResourcePoolGetMountPathAttributeType = *string
func getResourcePoolGetMountPathAttributeTypeOk(arg ResourcePoolGetMountPathAttributeType) (ret ResourcePoolGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetMountPathAttributeType(arg *ResourcePoolGetMountPathAttributeType, val ResourcePoolGetMountPathRetType) {
*arg = &val
}
type ResourcePoolGetMountPathArgType = string
type ResourcePoolGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type ResourcePoolGetNameAttributeType = *string
func getResourcePoolGetNameAttributeTypeOk(arg ResourcePoolGetNameAttributeType) (ret ResourcePoolGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetNameAttributeType(arg *ResourcePoolGetNameAttributeType, val ResourcePoolGetNameRetType) {
*arg = &val
}
type ResourcePoolGetNameArgType = string
type ResourcePoolGetNameRetType = string
/*
types and functions for performanceClass
*/
// isModel
type ResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass
type ResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass
type ResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass
func getResourcePoolGetPerformanceClassAttributeTypeOk(arg ResourcePoolGetPerformanceClassAttributeType) (ret ResourcePoolGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetPerformanceClassAttributeType(arg *ResourcePoolGetPerformanceClassAttributeType, val ResourcePoolGetPerformanceClassRetType) {
*arg = &val
}
/*
types and functions for performanceClassDowngradableAt
*/
// isDateTime
type ResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time
type ResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time
type ResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time
func getResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg ResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret ResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *ResourcePoolGetPerformanceClassDowngradableAtAttributeType, val ResourcePoolGetPerformanceClassDowngradableAtRetType) {
*arg = &val
}
/*
types and functions for sizeReducibleAt
*/
// isDateTime
type ResourcePoolGetSizeReducibleAtAttributeType = *time.Time
type ResourcePoolGetSizeReducibleAtArgType = time.Time
type ResourcePoolGetSizeReducibleAtRetType = time.Time
func getResourcePoolGetSizeReducibleAtAttributeTypeOk(arg ResourcePoolGetSizeReducibleAtAttributeType) (ret ResourcePoolGetSizeReducibleAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetSizeReducibleAtAttributeType(arg *ResourcePoolGetSizeReducibleAtAttributeType, val ResourcePoolGetSizeReducibleAtRetType) {
*arg = &val
}
/*
types and functions for snapshotSchedule
*/
// isModel
type ResourcePoolGetSnapshotScheduleAttributeType = *SnapshotSchedule
type ResourcePoolGetSnapshotScheduleArgType = SnapshotSchedule
type ResourcePoolGetSnapshotScheduleRetType = SnapshotSchedule
func getResourcePoolGetSnapshotScheduleAttributeTypeOk(arg ResourcePoolGetSnapshotScheduleAttributeType) (ret ResourcePoolGetSnapshotScheduleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetSnapshotScheduleAttributeType(arg *ResourcePoolGetSnapshotScheduleAttributeType, val ResourcePoolGetSnapshotScheduleRetType) {
*arg = &val
}
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type ResourcePoolgetSnapshotsAreVisibleAttributeType = *bool
type ResourcePoolgetSnapshotsAreVisibleArgType = bool
type ResourcePoolgetSnapshotsAreVisibleRetType = bool
func getResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg ResourcePoolgetSnapshotsAreVisibleAttributeType) (ret ResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolgetSnapshotsAreVisibleAttributeType(arg *ResourcePoolgetSnapshotsAreVisibleAttributeType, val ResourcePoolgetSnapshotsAreVisibleRetType) {
*arg = &val
}
/*
types and functions for space
*/
// isModel
type ResourcePoolGetSpaceAttributeType = *ResourcePoolSpace
type ResourcePoolGetSpaceArgType = ResourcePoolSpace
type ResourcePoolGetSpaceRetType = ResourcePoolSpace
func getResourcePoolGetSpaceAttributeTypeOk(arg ResourcePoolGetSpaceAttributeType) (ret ResourcePoolGetSpaceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetSpaceAttributeType(arg *ResourcePoolGetSpaceAttributeType, val ResourcePoolGetSpaceRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type ResourcePoolGetStateAttributeType = *string
func getResourcePoolGetStateAttributeTypeOk(arg ResourcePoolGetStateAttributeType) (ret ResourcePoolGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolGetStateAttributeType(arg *ResourcePoolGetStateAttributeType, val ResourcePoolGetStateRetType) {
*arg = &val
}
type ResourcePoolGetStateArgType = string
type ResourcePoolGetStateRetType = string
// ResourcePool struct for ResourcePool
type ResourcePool struct {
// Name of the respective availability zone
AvailabilityZone ResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
// Number of Shares in the Resource Pool
// Can be cast to int32 without loss of precision.
CountShares ResourcePoolGetCountSharesAttributeType `json:"countShares,omitempty"`
CreatedAt ResourcePoolGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Resource Pool
Id ResourcePoolGetIdAttributeType `json:"id,omitempty"`
// List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl ResourcePoolGetIpAclAttributeType `json:"ipAcl,omitempty"`
Labels ResourcePoolGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Resource Pool, used to mount the Resource Pool Note that a Resource Pool can only be mounted in read-only
MountPath ResourcePoolGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Resource Pool
Name ResourcePoolGetNameAttributeType `json:"name,omitempty"`
PerformanceClass ResourcePoolGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Time when the performance class can be downgraded again.
PerformanceClassDowngradableAt ResourcePoolGetPerformanceClassDowngradableAtAttributeType `json:"performanceClassDowngradableAt,omitempty"`
// Time when the size can be reduced again.
SizeReducibleAt ResourcePoolGetSizeReducibleAtAttributeType `json:"sizeReducibleAt,omitempty"`
SnapshotSchedule ResourcePoolGetSnapshotScheduleAttributeType `json:"snapshotSchedule,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible ResourcePoolgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
Space ResourcePoolGetSpaceAttributeType `json:"space,omitempty"`
// State of the Resource Pool (possible values: [\"pending\", \"creating\", \"created\", \"updating\", \"error\", \"deleting\"])
State ResourcePoolGetStateAttributeType `json:"state,omitempty"`
}
// NewResourcePool instantiates a new ResourcePool 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 NewResourcePool() *ResourcePool {
this := ResourcePool{}
return &this
}
// NewResourcePoolWithDefaults instantiates a new ResourcePool 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 NewResourcePoolWithDefaults() *ResourcePool {
this := ResourcePool{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
func (o *ResourcePool) GetAvailabilityZone() (res ResourcePoolGetAvailabilityZoneRetType) {
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 *ResourcePool) GetAvailabilityZoneOk() (ret ResourcePoolGetAvailabilityZoneRetType, ok bool) {
return getResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// HasAvailabilityZone returns a boolean if a field has been set.
func (o *ResourcePool) HasAvailabilityZone() bool {
_, ok := o.GetAvailabilityZoneOk()
return ok
}
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
func (o *ResourcePool) SetAvailabilityZone(v ResourcePoolGetAvailabilityZoneRetType) {
setResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetCountShares returns the CountShares field value if set, zero value otherwise.
func (o *ResourcePool) GetCountShares() (res ResourcePoolGetCountSharesRetType) {
res, _ = o.GetCountSharesOk()
return
}
// GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetCountSharesOk() (ret ResourcePoolGetCountSharesRetType, ok bool) {
return getResourcePoolGetCountSharesAttributeTypeOk(o.CountShares)
}
// HasCountShares returns a boolean if a field has been set.
func (o *ResourcePool) HasCountShares() bool {
_, ok := o.GetCountSharesOk()
return ok
}
// SetCountShares gets a reference to the given int64 and assigns it to the CountShares field.
func (o *ResourcePool) SetCountShares(v ResourcePoolGetCountSharesRetType) {
setResourcePoolGetCountSharesAttributeType(&o.CountShares, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ResourcePool) GetCreatedAt() (res ResourcePoolGetCreatedAtRetType) {
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 *ResourcePool) GetCreatedAtOk() (ret ResourcePoolGetCreatedAtRetType, ok bool) {
return getResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *ResourcePool) 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 *ResourcePool) SetCreatedAt(v ResourcePoolGetCreatedAtRetType) {
setResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ResourcePool) GetId() (res ResourcePoolGetIdRetType) {
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 *ResourcePool) GetIdOk() (ret ResourcePoolGetIdRetType, ok bool) {
return getResourcePoolGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *ResourcePool) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ResourcePool) SetId(v ResourcePoolGetIdRetType) {
setResourcePoolGetIdAttributeType(&o.Id, v)
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *ResourcePool) GetIpAcl() (res ResourcePoolGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetIpAclOk() (ret ResourcePoolGetIpAclRetType, ok bool) {
return getResourcePoolGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *ResourcePool) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *ResourcePool) SetIpAcl(v ResourcePoolGetIpAclRetType) {
setResourcePoolGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *ResourcePool) GetLabels() (res ResourcePoolGetLabelsRetType) {
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 *ResourcePool) GetLabelsOk() (ret ResourcePoolGetLabelsRetType, ok bool) {
return getResourcePoolGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *ResourcePool) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *ResourcePool) SetLabels(v ResourcePoolGetLabelsRetType) {
setResourcePoolGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *ResourcePool) GetMountPath() (res ResourcePoolGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetMountPathOk() (ret ResourcePoolGetMountPathRetType, ok bool) {
return getResourcePoolGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *ResourcePool) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *ResourcePool) SetMountPath(v ResourcePoolGetMountPathRetType) {
setResourcePoolGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ResourcePool) GetName() (res ResourcePoolGetNameRetType) {
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 *ResourcePool) GetNameOk() (ret ResourcePoolGetNameRetType, ok bool) {
return getResourcePoolGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *ResourcePool) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ResourcePool) SetName(v ResourcePoolGetNameRetType) {
setResourcePoolGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *ResourcePool) GetPerformanceClass() (res ResourcePoolGetPerformanceClassRetType) {
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 *ResourcePool) GetPerformanceClassOk() (ret ResourcePoolGetPerformanceClassRetType, ok bool) {
return getResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *ResourcePool) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given ResourcePoolPerformanceClass and assigns it to the PerformanceClass field.
func (o *ResourcePool) SetPerformanceClass(v ResourcePoolGetPerformanceClassRetType) {
setResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise.
func (o *ResourcePool) GetPerformanceClassDowngradableAt() (res ResourcePoolGetPerformanceClassDowngradableAtRetType) {
res, _ = o.GetPerformanceClassDowngradableAtOk()
return
}
// GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetPerformanceClassDowngradableAtOk() (ret ResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
return getResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt)
}
// HasPerformanceClassDowngradableAt returns a boolean if a field has been set.
func (o *ResourcePool) HasPerformanceClassDowngradableAt() bool {
_, ok := o.GetPerformanceClassDowngradableAtOk()
return ok
}
// SetPerformanceClassDowngradableAt gets a reference to the given time.Time and assigns it to the PerformanceClassDowngradableAt field.
func (o *ResourcePool) SetPerformanceClassDowngradableAt(v ResourcePoolGetPerformanceClassDowngradableAtRetType) {
setResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v)
}
// GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise.
func (o *ResourcePool) GetSizeReducibleAt() (res ResourcePoolGetSizeReducibleAtRetType) {
res, _ = o.GetSizeReducibleAtOk()
return
}
// GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetSizeReducibleAtOk() (ret ResourcePoolGetSizeReducibleAtRetType, ok bool) {
return getResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt)
}
// HasSizeReducibleAt returns a boolean if a field has been set.
func (o *ResourcePool) HasSizeReducibleAt() bool {
_, ok := o.GetSizeReducibleAtOk()
return ok
}
// SetSizeReducibleAt gets a reference to the given time.Time and assigns it to the SizeReducibleAt field.
func (o *ResourcePool) SetSizeReducibleAt(v ResourcePoolGetSizeReducibleAtRetType) {
setResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v)
}
// GetSnapshotSchedule returns the SnapshotSchedule field value if set, zero value otherwise.
func (o *ResourcePool) GetSnapshotSchedule() (res ResourcePoolGetSnapshotScheduleRetType) {
res, _ = o.GetSnapshotScheduleOk()
return
}
// GetSnapshotScheduleOk returns a tuple with the SnapshotSchedule field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetSnapshotScheduleOk() (ret ResourcePoolGetSnapshotScheduleRetType, ok bool) {
return getResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule)
}
// HasSnapshotSchedule returns a boolean if a field has been set.
func (o *ResourcePool) HasSnapshotSchedule() bool {
_, ok := o.GetSnapshotScheduleOk()
return ok
}
// SetSnapshotSchedule gets a reference to the given SnapshotSchedule and assigns it to the SnapshotSchedule field.
func (o *ResourcePool) SetSnapshotSchedule(v ResourcePoolGetSnapshotScheduleRetType) {
setResourcePoolGetSnapshotScheduleAttributeType(&o.SnapshotSchedule, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *ResourcePool) GetSnapshotsAreVisible() (res ResourcePoolgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetSnapshotsAreVisibleOk() (ret ResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
return getResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *ResourcePool) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *ResourcePool) SetSnapshotsAreVisible(v ResourcePoolgetSnapshotsAreVisibleRetType) {
setResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *ResourcePool) GetSpace() (res ResourcePoolGetSpaceRetType) {
res, _ = o.GetSpaceOk()
return
}
// GetSpaceOk returns a tuple with the Space field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetSpaceOk() (ret ResourcePoolGetSpaceRetType, ok bool) {
return getResourcePoolGetSpaceAttributeTypeOk(o.Space)
}
// HasSpace returns a boolean if a field has been set.
func (o *ResourcePool) HasSpace() bool {
_, ok := o.GetSpaceOk()
return ok
}
// SetSpace gets a reference to the given ResourcePoolSpace and assigns it to the Space field.
func (o *ResourcePool) SetSpace(v ResourcePoolGetSpaceRetType) {
setResourcePoolGetSpaceAttributeType(&o.Space, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *ResourcePool) GetState() (res ResourcePoolGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePool) GetStateOk() (ret ResourcePoolGetStateRetType, ok bool) {
return getResourcePoolGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *ResourcePool) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *ResourcePool) SetState(v ResourcePoolGetStateRetType) {
setResourcePoolGetStateAttributeType(&o.State, v)
}
func (o ResourcePool) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getResourcePoolGetCountSharesAttributeTypeOk(o.CountShares); ok {
toSerialize["CountShares"] = val
}
if val, ok := getResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getResourcePoolGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getResourcePoolGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getResourcePoolGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getResourcePoolGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getResourcePoolGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt); ok {
toSerialize["PerformanceClassDowngradableAt"] = val
}
if val, ok := getResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt); ok {
toSerialize["SizeReducibleAt"] = val
}
if val, ok := getResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule); ok {
toSerialize["SnapshotSchedule"] = val
}
if val, ok := getResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
if val, ok := getResourcePoolGetSpaceAttributeTypeOk(o.Space); ok {
toSerialize["Space"] = val
}
if val, ok := getResourcePoolGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableResourcePool struct {
value *ResourcePool
isSet bool
}
func (v NullableResourcePool) Get() *ResourcePool {
return v.value
}
func (v *NullableResourcePool) Set(val *ResourcePool) {
v.value = val
v.isSet = true
}
func (v NullableResourcePool) IsSet() bool {
return v.isSet
}
func (v *NullableResourcePool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourcePool(val *ResourcePool) *NullableResourcePool {
return &NullableResourcePool{value: val, isSet: true}
}
func (v NullableResourcePool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourcePool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,227 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ResourcePoolPerformanceClass type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourcePoolPerformanceClass{}
/*
types and functions for name
*/
// isNotNullableString
type ResourcePoolPerformanceClassGetNameAttributeType = *string
func getResourcePoolPerformanceClassGetNameAttributeTypeOk(arg ResourcePoolPerformanceClassGetNameAttributeType) (ret ResourcePoolPerformanceClassGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolPerformanceClassGetNameAttributeType(arg *ResourcePoolPerformanceClassGetNameAttributeType, val ResourcePoolPerformanceClassGetNameRetType) {
*arg = &val
}
type ResourcePoolPerformanceClassGetNameArgType = string
type ResourcePoolPerformanceClassGetNameRetType = string
/*
types and functions for peakIops
*/
// isInteger
type ResourcePoolPerformanceClassGetPeakIopsAttributeType = *int64
type ResourcePoolPerformanceClassGetPeakIopsArgType = int64
type ResourcePoolPerformanceClassGetPeakIopsRetType = int64
func getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(arg ResourcePoolPerformanceClassGetPeakIopsAttributeType) (ret ResourcePoolPerformanceClassGetPeakIopsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolPerformanceClassGetPeakIopsAttributeType(arg *ResourcePoolPerformanceClassGetPeakIopsAttributeType, val ResourcePoolPerformanceClassGetPeakIopsRetType) {
*arg = &val
}
/*
types and functions for throughput
*/
// isInteger
type ResourcePoolPerformanceClassGetThroughputAttributeType = *int64
type ResourcePoolPerformanceClassGetThroughputArgType = int64
type ResourcePoolPerformanceClassGetThroughputRetType = int64
func getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(arg ResourcePoolPerformanceClassGetThroughputAttributeType) (ret ResourcePoolPerformanceClassGetThroughputRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolPerformanceClassGetThroughputAttributeType(arg *ResourcePoolPerformanceClassGetThroughputAttributeType, val ResourcePoolPerformanceClassGetThroughputRetType) {
*arg = &val
}
// ResourcePoolPerformanceClass Information about the performance class
type ResourcePoolPerformanceClass struct {
// Name of the performance class
Name ResourcePoolPerformanceClassGetNameAttributeType `json:"name,omitempty"`
// Max. IOPS of the Resource Pool. This is shared between every Share in the Resource Pool.
// Can be cast to int32 without loss of precision.
PeakIops ResourcePoolPerformanceClassGetPeakIopsAttributeType `json:"peakIops,omitempty"`
// Throughput of the Resource Pool.
// Can be cast to int32 without loss of precision.
Throughput ResourcePoolPerformanceClassGetThroughputAttributeType `json:"throughput,omitempty"`
}
// NewResourcePoolPerformanceClass instantiates a new ResourcePoolPerformanceClass 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 NewResourcePoolPerformanceClass() *ResourcePoolPerformanceClass {
this := ResourcePoolPerformanceClass{}
return &this
}
// NewResourcePoolPerformanceClassWithDefaults instantiates a new ResourcePoolPerformanceClass 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 NewResourcePoolPerformanceClassWithDefaults() *ResourcePoolPerformanceClass {
this := ResourcePoolPerformanceClass{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ResourcePoolPerformanceClass) GetName() (res ResourcePoolPerformanceClassGetNameRetType) {
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 *ResourcePoolPerformanceClass) GetNameOk() (ret ResourcePoolPerformanceClassGetNameRetType, ok bool) {
return getResourcePoolPerformanceClassGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *ResourcePoolPerformanceClass) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ResourcePoolPerformanceClass) SetName(v ResourcePoolPerformanceClassGetNameRetType) {
setResourcePoolPerformanceClassGetNameAttributeType(&o.Name, v)
}
// GetPeakIops returns the PeakIops field value if set, zero value otherwise.
func (o *ResourcePoolPerformanceClass) GetPeakIops() (res ResourcePoolPerformanceClassGetPeakIopsRetType) {
res, _ = o.GetPeakIopsOk()
return
}
// GetPeakIopsOk returns a tuple with the PeakIops field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolPerformanceClass) GetPeakIopsOk() (ret ResourcePoolPerformanceClassGetPeakIopsRetType, ok bool) {
return getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(o.PeakIops)
}
// HasPeakIops returns a boolean if a field has been set.
func (o *ResourcePoolPerformanceClass) HasPeakIops() bool {
_, ok := o.GetPeakIopsOk()
return ok
}
// SetPeakIops gets a reference to the given int64 and assigns it to the PeakIops field.
func (o *ResourcePoolPerformanceClass) SetPeakIops(v ResourcePoolPerformanceClassGetPeakIopsRetType) {
setResourcePoolPerformanceClassGetPeakIopsAttributeType(&o.PeakIops, v)
}
// GetThroughput returns the Throughput field value if set, zero value otherwise.
func (o *ResourcePoolPerformanceClass) GetThroughput() (res ResourcePoolPerformanceClassGetThroughputRetType) {
res, _ = o.GetThroughputOk()
return
}
// GetThroughputOk returns a tuple with the Throughput field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolPerformanceClass) GetThroughputOk() (ret ResourcePoolPerformanceClassGetThroughputRetType, ok bool) {
return getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(o.Throughput)
}
// HasThroughput returns a boolean if a field has been set.
func (o *ResourcePoolPerformanceClass) HasThroughput() bool {
_, ok := o.GetThroughputOk()
return ok
}
// SetThroughput gets a reference to the given int64 and assigns it to the Throughput field.
func (o *ResourcePoolPerformanceClass) SetThroughput(v ResourcePoolPerformanceClassGetThroughputRetType) {
setResourcePoolPerformanceClassGetThroughputAttributeType(&o.Throughput, v)
}
func (o ResourcePoolPerformanceClass) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getResourcePoolPerformanceClassGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(o.PeakIops); ok {
toSerialize["PeakIops"] = val
}
if val, ok := getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(o.Throughput); ok {
toSerialize["Throughput"] = val
}
return toSerialize, nil
}
type NullableResourcePoolPerformanceClass struct {
value *ResourcePoolPerformanceClass
isSet bool
}
func (v NullableResourcePoolPerformanceClass) Get() *ResourcePoolPerformanceClass {
return v.value
}
func (v *NullableResourcePoolPerformanceClass) Set(val *ResourcePoolPerformanceClass) {
v.value = val
v.isSet = true
}
func (v NullableResourcePoolPerformanceClass) IsSet() bool {
return v.isSet
}
func (v *NullableResourcePoolPerformanceClass) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourcePoolPerformanceClass(val *ResourcePoolPerformanceClass) *NullableResourcePoolPerformanceClass {
return &NullableResourcePoolPerformanceClass{value: val, isSet: true}
}
func (v NullableResourcePoolPerformanceClass) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourcePoolPerformanceClass) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,388 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the ResourcePoolSnapshot type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourcePoolSnapshot{}
/*
types and functions for comment
*/
// isNullableString
type ResourcePoolSnapshotGetCommentAttributeType = *NullableString
func getResourcePoolSnapshotGetCommentAttributeTypeOk(arg ResourcePoolSnapshotGetCommentAttributeType) (ret ResourcePoolSnapshotGetCommentRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setResourcePoolSnapshotGetCommentAttributeType(arg *ResourcePoolSnapshotGetCommentAttributeType, val ResourcePoolSnapshotGetCommentRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type ResourcePoolSnapshotGetCommentArgType = *string
type ResourcePoolSnapshotGetCommentRetType = *string
/*
types and functions for createdAt
*/
// isDateTime
type ResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time
type ResourcePoolSnapshotGetCreatedAtArgType = time.Time
type ResourcePoolSnapshotGetCreatedAtRetType = time.Time
func getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg ResourcePoolSnapshotGetCreatedAtAttributeType) (ret ResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetCreatedAtAttributeType(arg *ResourcePoolSnapshotGetCreatedAtAttributeType, val ResourcePoolSnapshotGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for logicalSizeGigabytes
*/
// isInteger
type ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64
type ResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64
type ResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64
func getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret ResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for resourcePoolId
*/
// isNotNullableString
type ResourcePoolSnapshotGetResourcePoolIdAttributeType = *string
func getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg ResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret ResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *ResourcePoolSnapshotGetResourcePoolIdAttributeType, val ResourcePoolSnapshotGetResourcePoolIdRetType) {
*arg = &val
}
type ResourcePoolSnapshotGetResourcePoolIdArgType = string
type ResourcePoolSnapshotGetResourcePoolIdRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type ResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64
type ResourcePoolSnapshotGetSizeGigabytesArgType = int64
type ResourcePoolSnapshotGetSizeGigabytesRetType = int64
func getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret ResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *ResourcePoolSnapshotGetSizeGigabytesAttributeType, val ResourcePoolSnapshotGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for snapshotName
*/
// isNotNullableString
type ResourcePoolSnapshotGetSnapshotNameAttributeType = *string
func getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg ResourcePoolSnapshotGetSnapshotNameAttributeType) (ret ResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSnapshotGetSnapshotNameAttributeType(arg *ResourcePoolSnapshotGetSnapshotNameAttributeType, val ResourcePoolSnapshotGetSnapshotNameRetType) {
*arg = &val
}
type ResourcePoolSnapshotGetSnapshotNameArgType = string
type ResourcePoolSnapshotGetSnapshotNameRetType = string
// ResourcePoolSnapshot struct for ResourcePoolSnapshot
type ResourcePoolSnapshot struct {
// (optional) A comment to add more information about a snapshot
Comment ResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"`
CreatedAt ResourcePoolSnapshotGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. whats in the snapshot)
// Can be cast to int32 without loss of precision.
LogicalSizeGigabytes ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType `json:"logicalSizeGigabytes,omitempty"`
// ID of the Resource Pool of the Snapshot
ResourcePoolId ResourcePoolSnapshotGetResourcePoolIdAttributeType `json:"resourcePoolId,omitempty"`
// Reflects the actual storage footprint in the backend at snapshot time in Gibibytes (e.g. how much storage from the Resource Pool does it use).
// Can be cast to int32 without loss of precision.
SizeGigabytes ResourcePoolSnapshotGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// Name of the Resource Pool Snapshot
SnapshotName ResourcePoolSnapshotGetSnapshotNameAttributeType `json:"snapshotName,omitempty"`
}
// NewResourcePoolSnapshot instantiates a new ResourcePoolSnapshot 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 NewResourcePoolSnapshot() *ResourcePoolSnapshot {
this := ResourcePoolSnapshot{}
return &this
}
// NewResourcePoolSnapshotWithDefaults instantiates a new ResourcePoolSnapshot 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 NewResourcePoolSnapshotWithDefaults() *ResourcePoolSnapshot {
this := ResourcePoolSnapshot{}
return &this
}
// GetComment returns the Comment field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourcePoolSnapshot) GetComment() (res ResourcePoolSnapshotGetCommentRetType) {
res, _ = o.GetCommentOk()
return
}
// GetCommentOk returns a tuple with the Comment 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 *ResourcePoolSnapshot) GetCommentOk() (ret ResourcePoolSnapshotGetCommentRetType, ok bool) {
return getResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment)
}
// HasComment returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasComment() bool {
_, ok := o.GetCommentOk()
return ok
}
// SetComment gets a reference to the given string and assigns it to the Comment field.
func (o *ResourcePoolSnapshot) SetComment(v ResourcePoolSnapshotGetCommentRetType) {
setResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v)
}
// SetCommentNil sets the value for Comment to be an explicit nil
func (o *ResourcePoolSnapshot) SetCommentNil() {
o.Comment = nil
}
// UnsetComment ensures that no value is present for Comment, not even an explicit nil
func (o *ResourcePoolSnapshot) UnsetComment() {
o.Comment = nil
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetCreatedAt() (res ResourcePoolSnapshotGetCreatedAtRetType) {
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 *ResourcePoolSnapshot) GetCreatedAtOk() (ret ResourcePoolSnapshotGetCreatedAtRetType, ok bool) {
return getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) 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 *ResourcePoolSnapshot) SetCreatedAt(v ResourcePoolSnapshotGetCreatedAtRetType) {
setResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytes() (res ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
res, _ = o.GetLogicalSizeGigabytesOk()
return
}
// GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret ResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) {
return getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes)
}
// HasLogicalSizeGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasLogicalSizeGigabytes() bool {
_, ok := o.GetLogicalSizeGigabytesOk()
return ok
}
// SetLogicalSizeGigabytes gets a reference to the given int64 and assigns it to the LogicalSizeGigabytes field.
func (o *ResourcePoolSnapshot) SetLogicalSizeGigabytes(v ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) {
setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v)
}
// GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetResourcePoolId() (res ResourcePoolSnapshotGetResourcePoolIdRetType) {
res, _ = o.GetResourcePoolIdOk()
return
}
// GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetResourcePoolIdOk() (ret ResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) {
return getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId)
}
// HasResourcePoolId returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasResourcePoolId() bool {
_, ok := o.GetResourcePoolIdOk()
return ok
}
// SetResourcePoolId gets a reference to the given string and assigns it to the ResourcePoolId field.
func (o *ResourcePoolSnapshot) SetResourcePoolId(v ResourcePoolSnapshotGetResourcePoolIdRetType) {
setResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetSizeGigabytes() (res ResourcePoolSnapshotGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetSizeGigabytesOk() (ret ResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) {
return getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *ResourcePoolSnapshot) SetSizeGigabytes(v ResourcePoolSnapshotGetSizeGigabytesRetType) {
setResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetSnapshotName returns the SnapshotName field value if set, zero value otherwise.
func (o *ResourcePoolSnapshot) GetSnapshotName() (res ResourcePoolSnapshotGetSnapshotNameRetType) {
res, _ = o.GetSnapshotNameOk()
return
}
// GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSnapshot) GetSnapshotNameOk() (ret ResourcePoolSnapshotGetSnapshotNameRetType, ok bool) {
return getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName)
}
// HasSnapshotName returns a boolean if a field has been set.
func (o *ResourcePoolSnapshot) HasSnapshotName() bool {
_, ok := o.GetSnapshotNameOk()
return ok
}
// SetSnapshotName gets a reference to the given string and assigns it to the SnapshotName field.
func (o *ResourcePoolSnapshot) SetSnapshotName(v ResourcePoolSnapshotGetSnapshotNameRetType) {
setResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v)
}
func (o ResourcePoolSnapshot) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok {
toSerialize["Comment"] = val
}
if val, ok := getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes); ok {
toSerialize["LogicalSizeGigabytes"] = val
}
if val, ok := getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId); ok {
toSerialize["ResourcePoolId"] = val
}
if val, ok := getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName); ok {
toSerialize["SnapshotName"] = val
}
return toSerialize, nil
}
type NullableResourcePoolSnapshot struct {
value *ResourcePoolSnapshot
isSet bool
}
func (v NullableResourcePoolSnapshot) Get() *ResourcePoolSnapshot {
return v.value
}
func (v *NullableResourcePoolSnapshot) Set(val *ResourcePoolSnapshot) {
v.value = val
v.isSet = true
}
func (v NullableResourcePoolSnapshot) IsSet() bool {
return v.isSet
}
func (v *NullableResourcePoolSnapshot) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourcePoolSnapshot(val *ResourcePoolSnapshot) *NullableResourcePoolSnapshot {
return &NullableResourcePoolSnapshot{value: val, isSet: true}
}
func (v NullableResourcePoolSnapshot) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourcePoolSnapshot) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,247 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the ResourcePoolSpace type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ResourcePoolSpace{}
/*
types and functions for availableGigabytes
*/
// isDouble
type ResourcePoolSpaceGetAvailableGigabytesAttributeType = *float64
type ResourcePoolSpaceGetAvailableGigabytesArgType = *float64
type ResourcePoolSpaceGetAvailableGigabytesRetType = *float64
func getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetAvailableGigabytesAttributeType) (ret ResourcePoolSpaceGetAvailableGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setResourcePoolSpaceGetAvailableGigabytesAttributeType(arg *ResourcePoolSpaceGetAvailableGigabytesAttributeType, val ResourcePoolSpaceGetAvailableGigabytesRetType) {
*arg = val
}
/*
types and functions for sizeGigabytes
*/
// isInteger
type ResourcePoolSpaceGetSizeGigabytesAttributeType = *int64
type ResourcePoolSpaceGetSizeGigabytesArgType = int64
type ResourcePoolSpaceGetSizeGigabytesRetType = int64
func getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetSizeGigabytesAttributeType) (ret ResourcePoolSpaceGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setResourcePoolSpaceGetSizeGigabytesAttributeType(arg *ResourcePoolSpaceGetSizeGigabytesAttributeType, val ResourcePoolSpaceGetSizeGigabytesRetType) {
*arg = &val
}
/*
types and functions for usedGigabytes
*/
// isDouble
type ResourcePoolSpaceGetUsedGigabytesAttributeType = *float64
type ResourcePoolSpaceGetUsedGigabytesArgType = *float64
type ResourcePoolSpaceGetUsedGigabytesRetType = *float64
func getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetUsedGigabytesAttributeType) (ret ResourcePoolSpaceGetUsedGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setResourcePoolSpaceGetUsedGigabytesAttributeType(arg *ResourcePoolSpaceGetUsedGigabytesAttributeType, val ResourcePoolSpaceGetUsedGigabytesRetType) {
*arg = val
}
// ResourcePoolSpace Space information
type ResourcePoolSpace struct {
// Available space of the Resource Pool (only available when retrieving a single Resource Pool by ID)
AvailableGigabytes ResourcePoolSpaceGetAvailableGigabytesAttributeType `json:"availableGigabytes,omitempty"`
// Size of the Resource Pool in Gibibytes.
// Can be cast to int32 without loss of precision.
SizeGigabytes ResourcePoolSpaceGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// Used space of the Resource Pool (only available when retrieving a single Resource Pool by ID)
UsedGigabytes ResourcePoolSpaceGetUsedGigabytesAttributeType `json:"usedGigabytes,omitempty"`
}
// NewResourcePoolSpace instantiates a new ResourcePoolSpace 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 NewResourcePoolSpace() *ResourcePoolSpace {
this := ResourcePoolSpace{}
return &this
}
// NewResourcePoolSpaceWithDefaults instantiates a new ResourcePoolSpace 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 NewResourcePoolSpaceWithDefaults() *ResourcePoolSpace {
this := ResourcePoolSpace{}
return &this
}
// GetAvailableGigabytes returns the AvailableGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourcePoolSpace) GetAvailableGigabytes() (res ResourcePoolSpaceGetAvailableGigabytesRetType) {
res, _ = o.GetAvailableGigabytesOk()
return
}
// GetAvailableGigabytesOk returns a tuple with the AvailableGigabytes 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 *ResourcePoolSpace) GetAvailableGigabytesOk() (ret ResourcePoolSpaceGetAvailableGigabytesRetType, ok bool) {
return getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(o.AvailableGigabytes)
}
// HasAvailableGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSpace) HasAvailableGigabytes() bool {
_, ok := o.GetAvailableGigabytesOk()
return ok
}
// SetAvailableGigabytes gets a reference to the given float64 and assigns it to the AvailableGigabytes field.
func (o *ResourcePoolSpace) SetAvailableGigabytes(v ResourcePoolSpaceGetAvailableGigabytesRetType) {
setResourcePoolSpaceGetAvailableGigabytesAttributeType(&o.AvailableGigabytes, v)
}
// SetAvailableGigabytesNil sets the value for AvailableGigabytes to be an explicit nil
func (o *ResourcePoolSpace) SetAvailableGigabytesNil() {
o.AvailableGigabytes = nil
}
// UnsetAvailableGigabytes ensures that no value is present for AvailableGigabytes, not even an explicit nil
func (o *ResourcePoolSpace) UnsetAvailableGigabytes() {
o.AvailableGigabytes = nil
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise.
func (o *ResourcePoolSpace) GetSizeGigabytes() (res ResourcePoolSpaceGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ResourcePoolSpace) GetSizeGigabytesOk() (ret ResourcePoolSpaceGetSizeGigabytesRetType, ok bool) {
return getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSpace) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *ResourcePoolSpace) SetSizeGigabytes(v ResourcePoolSpaceGetSizeGigabytesRetType) {
setResourcePoolSpaceGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// GetUsedGigabytes returns the UsedGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ResourcePoolSpace) GetUsedGigabytes() (res ResourcePoolSpaceGetUsedGigabytesRetType) {
res, _ = o.GetUsedGigabytesOk()
return
}
// GetUsedGigabytesOk returns a tuple with the UsedGigabytes 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 *ResourcePoolSpace) GetUsedGigabytesOk() (ret ResourcePoolSpaceGetUsedGigabytesRetType, ok bool) {
return getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(o.UsedGigabytes)
}
// HasUsedGigabytes returns a boolean if a field has been set.
func (o *ResourcePoolSpace) HasUsedGigabytes() bool {
_, ok := o.GetUsedGigabytesOk()
return ok
}
// SetUsedGigabytes gets a reference to the given float64 and assigns it to the UsedGigabytes field.
func (o *ResourcePoolSpace) SetUsedGigabytes(v ResourcePoolSpaceGetUsedGigabytesRetType) {
setResourcePoolSpaceGetUsedGigabytesAttributeType(&o.UsedGigabytes, v)
}
// SetUsedGigabytesNil sets the value for UsedGigabytes to be an explicit nil
func (o *ResourcePoolSpace) SetUsedGigabytesNil() {
o.UsedGigabytes = nil
}
// UnsetUsedGigabytes ensures that no value is present for UsedGigabytes, not even an explicit nil
func (o *ResourcePoolSpace) UnsetUsedGigabytes() {
o.UsedGigabytes = nil
}
func (o ResourcePoolSpace) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(o.AvailableGigabytes); ok {
toSerialize["AvailableGigabytes"] = val
}
if val, ok := getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(o.UsedGigabytes); ok {
toSerialize["UsedGigabytes"] = val
}
return toSerialize, nil
}
type NullableResourcePoolSpace struct {
value *ResourcePoolSpace
isSet bool
}
func (v NullableResourcePoolSpace) Get() *ResourcePoolSpace {
return v.value
}
func (v *NullableResourcePoolSpace) Set(val *ResourcePoolSpace) {
v.value = val
v.isSet = true
}
func (v NullableResourcePoolSpace) IsSet() bool {
return v.isSet
}
func (v *NullableResourcePoolSpace) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableResourcePoolSpace(val *ResourcePoolSpace) *NullableResourcePoolSpace {
return &NullableResourcePoolSpace{value: val, isSet: true}
}
func (v NullableResourcePoolSpace) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableResourcePoolSpace) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

479
pkg/sfsbeta/model_share.go Normal file
View file

@ -0,0 +1,479 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the Share type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Share{}
/*
types and functions for createdAt
*/
// isDateTime
type ShareGetCreatedAtAttributeType = *time.Time
type ShareGetCreatedAtArgType = time.Time
type ShareGetCreatedAtRetType = time.Time
func getShareGetCreatedAtAttributeTypeOk(arg ShareGetCreatedAtAttributeType) (ret ShareGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetCreatedAtAttributeType(arg *ShareGetCreatedAtAttributeType, val ShareGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for exportPolicy
*/
// isModel
type ShareGetExportPolicyAttributeType = *NullableShareExportPolicy
type ShareGetExportPolicyArgType = *NullableShareExportPolicy
type ShareGetExportPolicyRetType = *NullableShareExportPolicy
func getShareGetExportPolicyAttributeTypeOk(arg ShareGetExportPolicyAttributeType) (ret ShareGetExportPolicyRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setShareGetExportPolicyAttributeType(arg *ShareGetExportPolicyAttributeType, val ShareGetExportPolicyRetType) {
*arg = val
}
/*
types and functions for id
*/
// isNotNullableString
type ShareGetIdAttributeType = *string
func getShareGetIdAttributeTypeOk(arg ShareGetIdAttributeType) (ret ShareGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetIdAttributeType(arg *ShareGetIdAttributeType, val ShareGetIdRetType) {
*arg = &val
}
type ShareGetIdArgType = string
type ShareGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type ShareGetLabelsAttributeType = *map[string]string
type ShareGetLabelsArgType = map[string]string
type ShareGetLabelsRetType = map[string]string
func getShareGetLabelsAttributeTypeOk(arg ShareGetLabelsAttributeType) (ret ShareGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetLabelsAttributeType(arg *ShareGetLabelsAttributeType, val ShareGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type ShareGetMountPathAttributeType = *string
func getShareGetMountPathAttributeTypeOk(arg ShareGetMountPathAttributeType) (ret ShareGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetMountPathAttributeType(arg *ShareGetMountPathAttributeType, val ShareGetMountPathRetType) {
*arg = &val
}
type ShareGetMountPathArgType = string
type ShareGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type ShareGetNameAttributeType = *string
func getShareGetNameAttributeTypeOk(arg ShareGetNameAttributeType) (ret ShareGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetNameAttributeType(arg *ShareGetNameAttributeType, val ShareGetNameRetType) {
*arg = &val
}
type ShareGetNameArgType = string
type ShareGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type ShareGetSpaceHardLimitGigabytesAttributeType = *int64
type ShareGetSpaceHardLimitGigabytesArgType = int64
type ShareGetSpaceHardLimitGigabytesRetType = int64
func getShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg ShareGetSpaceHardLimitGigabytesAttributeType) (ret ShareGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetSpaceHardLimitGigabytesAttributeType(arg *ShareGetSpaceHardLimitGigabytesAttributeType, val ShareGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type ShareGetStateAttributeType = *string
func getShareGetStateAttributeTypeOk(arg ShareGetStateAttributeType) (ret ShareGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareGetStateAttributeType(arg *ShareGetStateAttributeType, val ShareGetStateRetType) {
*arg = &val
}
type ShareGetStateArgType = string
type ShareGetStateRetType = string
// Share struct for Share
type Share struct {
CreatedAt ShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
ExportPolicy ShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
// ID of the Share
Id ShareGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels ShareGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Share, used to mount the Share
MountPath ShareGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Share
Name ShareGetNameAttributeType `json:"name,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes ShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
State ShareGetStateAttributeType `json:"state,omitempty"`
}
// NewShare instantiates a new Share 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 NewShare() *Share {
this := Share{}
return &this
}
// NewShareWithDefaults instantiates a new Share 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 NewShareWithDefaults() *Share {
this := Share{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *Share) GetCreatedAt() (res ShareGetCreatedAtRetType) {
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 *Share) GetCreatedAtOk() (ret ShareGetCreatedAtRetType, ok bool) {
return getShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *Share) 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 *Share) SetCreatedAt(v ShareGetCreatedAtRetType) {
setShareGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetExportPolicy returns the ExportPolicy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Share) GetExportPolicy() (res ShareGetExportPolicyRetType) {
res, _ = o.GetExportPolicyOk()
return
}
// GetExportPolicyOk returns a tuple with the ExportPolicy 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 *Share) GetExportPolicyOk() (ret ShareGetExportPolicyRetType, ok bool) {
return getShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
}
// HasExportPolicy returns a boolean if a field has been set.
func (o *Share) HasExportPolicy() bool {
_, ok := o.GetExportPolicyOk()
return ok
}
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
func (o *Share) SetExportPolicy(v ShareGetExportPolicyRetType) {
setShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
}
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
func (o *Share) SetExportPolicyNil() {
o.ExportPolicy = nil
}
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
func (o *Share) UnsetExportPolicy() {
o.ExportPolicy = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Share) GetId() (res ShareGetIdRetType) {
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 *Share) GetIdOk() (ret ShareGetIdRetType, ok bool) {
return getShareGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *Share) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Share) SetId(v ShareGetIdRetType) {
setShareGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *Share) GetLabels() (res ShareGetLabelsRetType) {
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 *Share) GetLabelsOk() (ret ShareGetLabelsRetType, ok bool) {
return getShareGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *Share) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *Share) SetLabels(v ShareGetLabelsRetType) {
setShareGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *Share) GetMountPath() (res ShareGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Share) GetMountPathOk() (ret ShareGetMountPathRetType, ok bool) {
return getShareGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *Share) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *Share) SetMountPath(v ShareGetMountPathRetType) {
setShareGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Share) GetName() (res ShareGetNameRetType) {
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 *Share) GetNameOk() (ret ShareGetNameRetType, ok bool) {
return getShareGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *Share) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Share) SetName(v ShareGetNameRetType) {
setShareGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *Share) GetSpaceHardLimitGigabytes() (res ShareGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Share) GetSpaceHardLimitGigabytesOk() (ret ShareGetSpaceHardLimitGigabytesRetType, ok bool) {
return getShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *Share) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *Share) SetSpaceHardLimitGigabytes(v ShareGetSpaceHardLimitGigabytesRetType) {
setShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *Share) GetState() (res ShareGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Share) GetStateOk() (ret ShareGetStateRetType, ok bool) {
return getShareGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *Share) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *Share) SetState(v ShareGetStateRetType) {
setShareGetStateAttributeType(&o.State, v)
}
func (o Share) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
toSerialize["ExportPolicy"] = val
}
if val, ok := getShareGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getShareGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getShareGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getShareGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
if val, ok := getShareGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableShare struct {
value *Share
isSet bool
}
func (v NullableShare) Get() *Share {
return v.value
}
func (v *NullableShare) Set(val *Share) {
v.value = val
v.isSet = true
}
func (v NullableShare) IsSet() bool {
return v.isSet
}
func (v *NullableShare) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableShare(val *Share) *NullableShare {
return &NullableShare{value: val, isSet: true}
}
func (v NullableShare) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableShare) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,371 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the ShareExportPolicy type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ShareExportPolicy{}
/*
types and functions for createdAt
*/
// isDateTime
type ShareExportPolicyGetCreatedAtAttributeType = *time.Time
type ShareExportPolicyGetCreatedAtArgType = time.Time
type ShareExportPolicyGetCreatedAtRetType = time.Time
func getShareExportPolicyGetCreatedAtAttributeTypeOk(arg ShareExportPolicyGetCreatedAtAttributeType) (ret ShareExportPolicyGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetCreatedAtAttributeType(arg *ShareExportPolicyGetCreatedAtAttributeType, val ShareExportPolicyGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type ShareExportPolicyGetIdAttributeType = *string
func getShareExportPolicyGetIdAttributeTypeOk(arg ShareExportPolicyGetIdAttributeType) (ret ShareExportPolicyGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetIdAttributeType(arg *ShareExportPolicyGetIdAttributeType, val ShareExportPolicyGetIdRetType) {
*arg = &val
}
type ShareExportPolicyGetIdArgType = string
type ShareExportPolicyGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type ShareExportPolicyGetLabelsAttributeType = *map[string]string
type ShareExportPolicyGetLabelsArgType = map[string]string
type ShareExportPolicyGetLabelsRetType = map[string]string
func getShareExportPolicyGetLabelsAttributeTypeOk(arg ShareExportPolicyGetLabelsAttributeType) (ret ShareExportPolicyGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetLabelsAttributeType(arg *ShareExportPolicyGetLabelsAttributeType, val ShareExportPolicyGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type ShareExportPolicyGetNameAttributeType = *string
func getShareExportPolicyGetNameAttributeTypeOk(arg ShareExportPolicyGetNameAttributeType) (ret ShareExportPolicyGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetNameAttributeType(arg *ShareExportPolicyGetNameAttributeType, val ShareExportPolicyGetNameRetType) {
*arg = &val
}
type ShareExportPolicyGetNameArgType = string
type ShareExportPolicyGetNameRetType = string
/*
types and functions for rules
*/
// isArray
type ShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule
type ShareExportPolicyGetRulesArgType = []ShareExportPolicyRule
type ShareExportPolicyGetRulesRetType = []ShareExportPolicyRule
func getShareExportPolicyGetRulesAttributeTypeOk(arg ShareExportPolicyGetRulesAttributeType) (ret ShareExportPolicyGetRulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetRulesAttributeType(arg *ShareExportPolicyGetRulesAttributeType, val ShareExportPolicyGetRulesRetType) {
*arg = &val
}
/*
types and functions for sharesUsingExportPolicy
*/
// isInteger
type ShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64
type ShareExportPolicyGetSharesUsingExportPolicyArgType = int64
type ShareExportPolicyGetSharesUsingExportPolicyRetType = int64
func getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg ShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret ShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyGetSharesUsingExportPolicyAttributeType(arg *ShareExportPolicyGetSharesUsingExportPolicyAttributeType, val ShareExportPolicyGetSharesUsingExportPolicyRetType) {
*arg = &val
}
// ShareExportPolicy Details of the Share Export Policy to use in the Share. Note that if this is not set, the Share can only be mounted in read only by clients with IPs matching the IP ACL of the Resource Pool hosting this Share
type ShareExportPolicy struct {
CreatedAt ShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Share Export Policy
Id ShareExportPolicyGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share export policy keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels ShareExportPolicyGetLabelsAttributeType `json:"labels,omitempty"`
// Name of the Share Export Policy
Name ShareExportPolicyGetNameAttributeType `json:"name,omitempty"`
// List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field \"order\" within each rule
Rules ShareExportPolicyGetRulesAttributeType `json:"rules,omitempty"`
// Number of Shares using this Share Export Policy
// Can be cast to int32 without loss of precision.
SharesUsingExportPolicy ShareExportPolicyGetSharesUsingExportPolicyAttributeType `json:"sharesUsingExportPolicy,omitempty"`
}
// NewShareExportPolicy instantiates a new ShareExportPolicy 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 NewShareExportPolicy() *ShareExportPolicy {
this := ShareExportPolicy{}
return &this
}
// NewShareExportPolicyWithDefaults instantiates a new ShareExportPolicy 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 NewShareExportPolicyWithDefaults() *ShareExportPolicy {
this := ShareExportPolicy{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetCreatedAt() (res ShareExportPolicyGetCreatedAtRetType) {
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 *ShareExportPolicy) GetCreatedAtOk() (ret ShareExportPolicyGetCreatedAtRetType, ok bool) {
return getShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *ShareExportPolicy) 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 *ShareExportPolicy) SetCreatedAt(v ShareExportPolicyGetCreatedAtRetType) {
setShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetId() (res ShareExportPolicyGetIdRetType) {
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 *ShareExportPolicy) GetIdOk() (ret ShareExportPolicyGetIdRetType, ok bool) {
return getShareExportPolicyGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ShareExportPolicy) SetId(v ShareExportPolicyGetIdRetType) {
setShareExportPolicyGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetLabels() (res ShareExportPolicyGetLabelsRetType) {
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 *ShareExportPolicy) GetLabelsOk() (ret ShareExportPolicyGetLabelsRetType, ok bool) {
return getShareExportPolicyGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *ShareExportPolicy) SetLabels(v ShareExportPolicyGetLabelsRetType) {
setShareExportPolicyGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetName() (res ShareExportPolicyGetNameRetType) {
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 *ShareExportPolicy) GetNameOk() (ret ShareExportPolicyGetNameRetType, ok bool) {
return getShareExportPolicyGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *ShareExportPolicy) SetName(v ShareExportPolicyGetNameRetType) {
setShareExportPolicyGetNameAttributeType(&o.Name, v)
}
// GetRules returns the Rules field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetRules() (res ShareExportPolicyGetRulesRetType) {
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 *ShareExportPolicy) GetRulesOk() (ret ShareExportPolicyGetRulesRetType, ok bool) {
return getShareExportPolicyGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given []ShareExportPolicyRule and assigns it to the Rules field.
func (o *ShareExportPolicy) SetRules(v ShareExportPolicyGetRulesRetType) {
setShareExportPolicyGetRulesAttributeType(&o.Rules, v)
}
// GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise.
func (o *ShareExportPolicy) GetSharesUsingExportPolicy() (res ShareExportPolicyGetSharesUsingExportPolicyRetType) {
res, _ = o.GetSharesUsingExportPolicyOk()
return
}
// GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicy) GetSharesUsingExportPolicyOk() (ret ShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) {
return getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy)
}
// HasSharesUsingExportPolicy returns a boolean if a field has been set.
func (o *ShareExportPolicy) HasSharesUsingExportPolicy() bool {
_, ok := o.GetSharesUsingExportPolicyOk()
return ok
}
// SetSharesUsingExportPolicy gets a reference to the given int64 and assigns it to the SharesUsingExportPolicy field.
func (o *ShareExportPolicy) SetSharesUsingExportPolicy(v ShareExportPolicyGetSharesUsingExportPolicyRetType) {
setShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v)
}
func (o ShareExportPolicy) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getShareExportPolicyGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getShareExportPolicyGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getShareExportPolicyGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getShareExportPolicyGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
if val, ok := getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy); ok {
toSerialize["SharesUsingExportPolicy"] = val
}
return toSerialize, nil
}
type NullableShareExportPolicy struct {
value *ShareExportPolicy
isSet bool
}
func (v NullableShareExportPolicy) Get() *ShareExportPolicy {
return v.value
}
func (v *NullableShareExportPolicy) Set(val *ShareExportPolicy) {
v.value = val
v.isSet = true
}
func (v NullableShareExportPolicy) IsSet() bool {
return v.isSet
}
func (v *NullableShareExportPolicy) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableShareExportPolicy(val *ShareExportPolicy) *NullableShareExportPolicy {
return &NullableShareExportPolicy{value: val, isSet: true}
}
func (v NullableShareExportPolicy) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableShareExportPolicy) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,482 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the ShareExportPolicyRule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ShareExportPolicyRule{}
/*
types and functions for createdAt
*/
// isDateTime
type ShareExportPolicyRuleGetCreatedAtAttributeType = *time.Time
type ShareExportPolicyRuleGetCreatedAtArgType = time.Time
type ShareExportPolicyRuleGetCreatedAtRetType = time.Time
func getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(arg ShareExportPolicyRuleGetCreatedAtAttributeType) (ret ShareExportPolicyRuleGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRuleGetCreatedAtAttributeType(arg *ShareExportPolicyRuleGetCreatedAtAttributeType, val ShareExportPolicyRuleGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNullableString
type ShareExportPolicyRuleGetDescriptionAttributeType = *NullableString
func getShareExportPolicyRuleGetDescriptionAttributeTypeOk(arg ShareExportPolicyRuleGetDescriptionAttributeType) (ret ShareExportPolicyRuleGetDescriptionRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setShareExportPolicyRuleGetDescriptionAttributeType(arg *ShareExportPolicyRuleGetDescriptionAttributeType, val ShareExportPolicyRuleGetDescriptionRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type ShareExportPolicyRuleGetDescriptionArgType = *string
type ShareExportPolicyRuleGetDescriptionRetType = *string
/*
types and functions for id
*/
// isNotNullableString
type ShareExportPolicyRuleGetIdAttributeType = *string
func getShareExportPolicyRuleGetIdAttributeTypeOk(arg ShareExportPolicyRuleGetIdAttributeType) (ret ShareExportPolicyRuleGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRuleGetIdAttributeType(arg *ShareExportPolicyRuleGetIdAttributeType, val ShareExportPolicyRuleGetIdRetType) {
*arg = &val
}
type ShareExportPolicyRuleGetIdArgType = string
type ShareExportPolicyRuleGetIdRetType = string
/*
types and functions for ipAcl
*/
// isArray
type ShareExportPolicyRuleGetIpAclAttributeType = *[]string
type ShareExportPolicyRuleGetIpAclArgType = []string
type ShareExportPolicyRuleGetIpAclRetType = []string
func getShareExportPolicyRuleGetIpAclAttributeTypeOk(arg ShareExportPolicyRuleGetIpAclAttributeType) (ret ShareExportPolicyRuleGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRuleGetIpAclAttributeType(arg *ShareExportPolicyRuleGetIpAclAttributeType, val ShareExportPolicyRuleGetIpAclRetType) {
*arg = &val
}
/*
types and functions for order
*/
// isInteger
type ShareExportPolicyRuleGetOrderAttributeType = *int64
type ShareExportPolicyRuleGetOrderArgType = int64
type ShareExportPolicyRuleGetOrderRetType = int64
func getShareExportPolicyRuleGetOrderAttributeTypeOk(arg ShareExportPolicyRuleGetOrderAttributeType) (ret ShareExportPolicyRuleGetOrderRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRuleGetOrderAttributeType(arg *ShareExportPolicyRuleGetOrderAttributeType, val ShareExportPolicyRuleGetOrderRetType) {
*arg = &val
}
/*
types and functions for readOnly
*/
// isBoolean
type ShareExportPolicyRulegetReadOnlyAttributeType = *bool
type ShareExportPolicyRulegetReadOnlyArgType = bool
type ShareExportPolicyRulegetReadOnlyRetType = bool
func getShareExportPolicyRulegetReadOnlyAttributeTypeOk(arg ShareExportPolicyRulegetReadOnlyAttributeType) (ret ShareExportPolicyRulegetReadOnlyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRulegetReadOnlyAttributeType(arg *ShareExportPolicyRulegetReadOnlyAttributeType, val ShareExportPolicyRulegetReadOnlyRetType) {
*arg = &val
}
/*
types and functions for setUuid
*/
// isBoolean
type ShareExportPolicyRulegetSetUuidAttributeType = *bool
type ShareExportPolicyRulegetSetUuidArgType = bool
type ShareExportPolicyRulegetSetUuidRetType = bool
func getShareExportPolicyRulegetSetUuidAttributeTypeOk(arg ShareExportPolicyRulegetSetUuidAttributeType) (ret ShareExportPolicyRulegetSetUuidRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRulegetSetUuidAttributeType(arg *ShareExportPolicyRulegetSetUuidAttributeType, val ShareExportPolicyRulegetSetUuidRetType) {
*arg = &val
}
/*
types and functions for superUser
*/
// isBoolean
type ShareExportPolicyRulegetSuperUserAttributeType = *bool
type ShareExportPolicyRulegetSuperUserArgType = bool
type ShareExportPolicyRulegetSuperUserRetType = bool
func getShareExportPolicyRulegetSuperUserAttributeTypeOk(arg ShareExportPolicyRulegetSuperUserAttributeType) (ret ShareExportPolicyRulegetSuperUserRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setShareExportPolicyRulegetSuperUserAttributeType(arg *ShareExportPolicyRulegetSuperUserAttributeType, val ShareExportPolicyRulegetSuperUserRetType) {
*arg = &val
}
// ShareExportPolicyRule struct for ShareExportPolicyRule
type ShareExportPolicyRule struct {
CreatedAt ShareExportPolicyRuleGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// Description of the Rule (optional)
Description ShareExportPolicyRuleGetDescriptionAttributeType `json:"description,omitempty"`
// ID of the Share Export Policy Rule
Id ShareExportPolicyRuleGetIdAttributeType `json:"id,omitempty"`
// IP access control list, where IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.251/32\" for a specific IP) This array cannot be empty
IpAcl ShareExportPolicyRuleGetIpAclAttributeType `json:"ipAcl,omitempty"`
// Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied This field must be set
// Can be cast to int32 without loss of precision.
Order ShareExportPolicyRuleGetOrderAttributeType `json:"order,omitempty"`
// Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false
ReadOnly ShareExportPolicyRulegetReadOnlyAttributeType `json:"readOnly,omitempty"`
// Flag to honor set UUID Default: false
SetUuid ShareExportPolicyRulegetSetUuidAttributeType `json:"setUuid,omitempty"`
// Flag to indicate if client IPs matching this rule have root access on the Share Default: true
SuperUser ShareExportPolicyRulegetSuperUserAttributeType `json:"superUser,omitempty"`
}
// NewShareExportPolicyRule instantiates a new ShareExportPolicyRule 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 NewShareExportPolicyRule() *ShareExportPolicyRule {
this := ShareExportPolicyRule{}
return &this
}
// NewShareExportPolicyRuleWithDefaults instantiates a new ShareExportPolicyRule 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 NewShareExportPolicyRuleWithDefaults() *ShareExportPolicyRule {
this := ShareExportPolicyRule{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetCreatedAt() (res ShareExportPolicyRuleGetCreatedAtRetType) {
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 *ShareExportPolicyRule) GetCreatedAtOk() (ret ShareExportPolicyRuleGetCreatedAtRetType, ok bool) {
return getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) 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 *ShareExportPolicyRule) SetCreatedAt(v ShareExportPolicyRuleGetCreatedAtRetType) {
setShareExportPolicyRuleGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ShareExportPolicyRule) GetDescription() (res ShareExportPolicyRuleGetDescriptionRetType) {
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ShareExportPolicyRule) GetDescriptionOk() (ret ShareExportPolicyRuleGetDescriptionRetType, ok bool) {
return getShareExportPolicyRuleGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *ShareExportPolicyRule) SetDescription(v ShareExportPolicyRuleGetDescriptionRetType) {
setShareExportPolicyRuleGetDescriptionAttributeType(&o.Description, v)
}
// SetDescriptionNil sets the value for Description to be an explicit nil
func (o *ShareExportPolicyRule) SetDescriptionNil() {
o.Description = nil
}
// UnsetDescription ensures that no value is present for Description, not even an explicit nil
func (o *ShareExportPolicyRule) UnsetDescription() {
o.Description = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetId() (res ShareExportPolicyRuleGetIdRetType) {
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 *ShareExportPolicyRule) GetIdOk() (ret ShareExportPolicyRuleGetIdRetType, ok bool) {
return getShareExportPolicyRuleGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ShareExportPolicyRule) SetId(v ShareExportPolicyRuleGetIdRetType) {
setShareExportPolicyRuleGetIdAttributeType(&o.Id, v)
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetIpAcl() (res ShareExportPolicyRuleGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicyRule) GetIpAclOk() (ret ShareExportPolicyRuleGetIpAclRetType, ok bool) {
return getShareExportPolicyRuleGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *ShareExportPolicyRule) SetIpAcl(v ShareExportPolicyRuleGetIpAclRetType) {
setShareExportPolicyRuleGetIpAclAttributeType(&o.IpAcl, v)
}
// GetOrder returns the Order field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetOrder() (res ShareExportPolicyRuleGetOrderRetType) {
res, _ = o.GetOrderOk()
return
}
// GetOrderOk returns a tuple with the Order field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicyRule) GetOrderOk() (ret ShareExportPolicyRuleGetOrderRetType, ok bool) {
return getShareExportPolicyRuleGetOrderAttributeTypeOk(o.Order)
}
// HasOrder returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasOrder() bool {
_, ok := o.GetOrderOk()
return ok
}
// SetOrder gets a reference to the given int64 and assigns it to the Order field.
func (o *ShareExportPolicyRule) SetOrder(v ShareExportPolicyRuleGetOrderRetType) {
setShareExportPolicyRuleGetOrderAttributeType(&o.Order, v)
}
// GetReadOnly returns the ReadOnly field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetReadOnly() (res ShareExportPolicyRulegetReadOnlyRetType) {
res, _ = o.GetReadOnlyOk()
return
}
// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicyRule) GetReadOnlyOk() (ret ShareExportPolicyRulegetReadOnlyRetType, ok bool) {
return getShareExportPolicyRulegetReadOnlyAttributeTypeOk(o.ReadOnly)
}
// HasReadOnly returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasReadOnly() bool {
_, ok := o.GetReadOnlyOk()
return ok
}
// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field.
func (o *ShareExportPolicyRule) SetReadOnly(v ShareExportPolicyRulegetReadOnlyRetType) {
setShareExportPolicyRulegetReadOnlyAttributeType(&o.ReadOnly, v)
}
// GetSetUuid returns the SetUuid field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetSetUuid() (res ShareExportPolicyRulegetSetUuidRetType) {
res, _ = o.GetSetUuidOk()
return
}
// GetSetUuidOk returns a tuple with the SetUuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicyRule) GetSetUuidOk() (ret ShareExportPolicyRulegetSetUuidRetType, ok bool) {
return getShareExportPolicyRulegetSetUuidAttributeTypeOk(o.SetUuid)
}
// HasSetUuid returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasSetUuid() bool {
_, ok := o.GetSetUuidOk()
return ok
}
// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field.
func (o *ShareExportPolicyRule) SetSetUuid(v ShareExportPolicyRulegetSetUuidRetType) {
setShareExportPolicyRulegetSetUuidAttributeType(&o.SetUuid, v)
}
// GetSuperUser returns the SuperUser field value if set, zero value otherwise.
func (o *ShareExportPolicyRule) GetSuperUser() (res ShareExportPolicyRulegetSuperUserRetType) {
res, _ = o.GetSuperUserOk()
return
}
// GetSuperUserOk returns a tuple with the SuperUser field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ShareExportPolicyRule) GetSuperUserOk() (ret ShareExportPolicyRulegetSuperUserRetType, ok bool) {
return getShareExportPolicyRulegetSuperUserAttributeTypeOk(o.SuperUser)
}
// HasSuperUser returns a boolean if a field has been set.
func (o *ShareExportPolicyRule) HasSuperUser() bool {
_, ok := o.GetSuperUserOk()
return ok
}
// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field.
func (o *ShareExportPolicyRule) SetSuperUser(v ShareExportPolicyRulegetSuperUserRetType) {
setShareExportPolicyRulegetSuperUserAttributeType(&o.SuperUser, v)
}
func (o ShareExportPolicyRule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getShareExportPolicyRuleGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getShareExportPolicyRuleGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getShareExportPolicyRuleGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getShareExportPolicyRuleGetOrderAttributeTypeOk(o.Order); ok {
toSerialize["Order"] = val
}
if val, ok := getShareExportPolicyRulegetReadOnlyAttributeTypeOk(o.ReadOnly); ok {
toSerialize["ReadOnly"] = val
}
if val, ok := getShareExportPolicyRulegetSetUuidAttributeTypeOk(o.SetUuid); ok {
toSerialize["SetUuid"] = val
}
if val, ok := getShareExportPolicyRulegetSuperUserAttributeTypeOk(o.SuperUser); ok {
toSerialize["SuperUser"] = val
}
return toSerialize, nil
}
type NullableShareExportPolicyRule struct {
value *ShareExportPolicyRule
isSet bool
}
func (v NullableShareExportPolicyRule) Get() *ShareExportPolicyRule {
return v.value
}
func (v *NullableShareExportPolicyRule) Set(val *ShareExportPolicyRule) {
v.value = val
v.isSet = true
}
func (v NullableShareExportPolicyRule) IsSet() bool {
return v.isSet
}
func (v *NullableShareExportPolicyRule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableShareExportPolicyRule(val *ShareExportPolicyRule) *NullableShareExportPolicyRule {
return &NullableShareExportPolicyRule{value: val, isSet: true}
}
func (v NullableShareExportPolicyRule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableShareExportPolicyRule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,178 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the SnapshotSchedule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SnapshotSchedule{}
/*
types and functions for cron
*/
// isNotNullableString
type SnapshotScheduleGetCronAttributeType = *string
func getSnapshotScheduleGetCronAttributeTypeOk(arg SnapshotScheduleGetCronAttributeType) (ret SnapshotScheduleGetCronRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setSnapshotScheduleGetCronAttributeType(arg *SnapshotScheduleGetCronAttributeType, val SnapshotScheduleGetCronRetType) {
*arg = &val
}
type SnapshotScheduleGetCronArgType = string
type SnapshotScheduleGetCronRetType = string
/*
types and functions for name
*/
// isNotNullableString
type SnapshotScheduleGetNameAttributeType = *string
func getSnapshotScheduleGetNameAttributeTypeOk(arg SnapshotScheduleGetNameAttributeType) (ret SnapshotScheduleGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setSnapshotScheduleGetNameAttributeType(arg *SnapshotScheduleGetNameAttributeType, val SnapshotScheduleGetNameRetType) {
*arg = &val
}
type SnapshotScheduleGetNameArgType = string
type SnapshotScheduleGetNameRetType = string
// SnapshotSchedule struct for SnapshotSchedule
type SnapshotSchedule struct {
// Cron of the Snapshot Schedule (follows the cron schedule expression in Unix-like systems)
Cron SnapshotScheduleGetCronAttributeType `json:"cron,omitempty"`
// Name of the Snapshot Schedule
Name SnapshotScheduleGetNameAttributeType `json:"name,omitempty"`
}
// NewSnapshotSchedule instantiates a new SnapshotSchedule 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 NewSnapshotSchedule() *SnapshotSchedule {
this := SnapshotSchedule{}
return &this
}
// NewSnapshotScheduleWithDefaults instantiates a new SnapshotSchedule 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 NewSnapshotScheduleWithDefaults() *SnapshotSchedule {
this := SnapshotSchedule{}
return &this
}
// GetCron returns the Cron field value if set, zero value otherwise.
func (o *SnapshotSchedule) GetCron() (res SnapshotScheduleGetCronRetType) {
res, _ = o.GetCronOk()
return
}
// GetCronOk returns a tuple with the Cron field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *SnapshotSchedule) GetCronOk() (ret SnapshotScheduleGetCronRetType, ok bool) {
return getSnapshotScheduleGetCronAttributeTypeOk(o.Cron)
}
// HasCron returns a boolean if a field has been set.
func (o *SnapshotSchedule) HasCron() bool {
_, ok := o.GetCronOk()
return ok
}
// SetCron gets a reference to the given string and assigns it to the Cron field.
func (o *SnapshotSchedule) SetCron(v SnapshotScheduleGetCronRetType) {
setSnapshotScheduleGetCronAttributeType(&o.Cron, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *SnapshotSchedule) GetName() (res SnapshotScheduleGetNameRetType) {
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 *SnapshotSchedule) GetNameOk() (ret SnapshotScheduleGetNameRetType, ok bool) {
return getSnapshotScheduleGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *SnapshotSchedule) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *SnapshotSchedule) SetName(v SnapshotScheduleGetNameRetType) {
setSnapshotScheduleGetNameAttributeType(&o.Name, v)
}
func (o SnapshotSchedule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getSnapshotScheduleGetCronAttributeTypeOk(o.Cron); ok {
toSerialize["Cron"] = val
}
if val, ok := getSnapshotScheduleGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
return toSerialize, nil
}
type NullableSnapshotSchedule struct {
value *SnapshotSchedule
isSet bool
}
func (v NullableSnapshotSchedule) Get() *SnapshotSchedule {
return v.value
}
func (v *NullableSnapshotSchedule) Set(val *SnapshotSchedule) {
v.value = val
v.isSet = true
}
func (v NullableSnapshotSchedule) IsSet() bool {
return v.isSet
}
func (v *NullableSnapshotSchedule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSnapshotSchedule(val *SnapshotSchedule) *NullableSnapshotSchedule {
return &NullableSnapshotSchedule{value: val, isSet: true}
}
func (v NullableSnapshotSchedule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSnapshotSchedule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

226
pkg/sfsbeta/model_status.go Normal file
View file

@ -0,0 +1,226 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the Status type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Status{}
/*
types and functions for code
*/
// isInteger
type StatusGetCodeAttributeType = *int64
type StatusGetCodeArgType = int64
type StatusGetCodeRetType = int64
func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) {
*arg = &val
}
/*
types and functions for details
*/
// isArray
type StatusGetDetailsAttributeType = *[]GoogleProtobufAny
type StatusGetDetailsArgType = []GoogleProtobufAny
type StatusGetDetailsRetType = []GoogleProtobufAny
func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) {
*arg = &val
}
/*
types and functions for message
*/
// isNotNullableString
type StatusGetMessageAttributeType = *string
func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) {
*arg = &val
}
type StatusGetMessageArgType = string
type StatusGetMessageRetType = string
// Status The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).
type Status struct {
// The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
// Can be cast to int32 without loss of precision.
Code StatusGetCodeAttributeType `json:"code,omitempty"`
// A list of messages that carry the error details. There is a common set of message types for APIs to use.
Details StatusGetDetailsAttributeType `json:"details,omitempty"`
// A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
Message StatusGetMessageAttributeType `json:"message,omitempty"`
}
// NewStatus instantiates a new Status 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 NewStatus() *Status {
this := Status{}
return &this
}
// NewStatusWithDefaults instantiates a new Status 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 NewStatusWithDefaults() *Status {
this := Status{}
return &this
}
// GetCode returns the Code field value if set, zero value otherwise.
func (o *Status) GetCode() (res StatusGetCodeRetType) {
res, _ = o.GetCodeOk()
return
}
// GetCodeOk returns a tuple with the Code field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) {
return getStatusGetCodeAttributeTypeOk(o.Code)
}
// HasCode returns a boolean if a field has been set.
func (o *Status) HasCode() bool {
_, ok := o.GetCodeOk()
return ok
}
// SetCode gets a reference to the given int64 and assigns it to the Code field.
func (o *Status) SetCode(v StatusGetCodeRetType) {
setStatusGetCodeAttributeType(&o.Code, v)
}
// GetDetails returns the Details field value if set, zero value otherwise.
func (o *Status) GetDetails() (res StatusGetDetailsRetType) {
res, _ = o.GetDetailsOk()
return
}
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) {
return getStatusGetDetailsAttributeTypeOk(o.Details)
}
// HasDetails returns a boolean if a field has been set.
func (o *Status) HasDetails() bool {
_, ok := o.GetDetailsOk()
return ok
}
// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field.
func (o *Status) SetDetails(v StatusGetDetailsRetType) {
setStatusGetDetailsAttributeType(&o.Details, v)
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *Status) GetMessage() (res StatusGetMessageRetType) {
res, _ = o.GetMessageOk()
return
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) {
return getStatusGetMessageAttributeTypeOk(o.Message)
}
// HasMessage returns a boolean if a field has been set.
func (o *Status) HasMessage() bool {
_, ok := o.GetMessageOk()
return ok
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *Status) SetMessage(v StatusGetMessageRetType) {
setStatusGetMessageAttributeType(&o.Message, v)
}
func (o Status) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok {
toSerialize["Code"] = val
}
if val, ok := getStatusGetDetailsAttributeTypeOk(o.Details); ok {
toSerialize["Details"] = val
}
if val, ok := getStatusGetMessageAttributeTypeOk(o.Message); ok {
toSerialize["Message"] = val
}
return toSerialize, nil
}
type NullableStatus struct {
value *Status
isSet bool
}
func (v NullableStatus) Get() *Status {
return v.value
}
func (v *NullableStatus) Set(val *Status) {
v.value = val
v.isSet = true
}
func (v NullableStatus) IsSet() bool {
return v.isSet
}
func (v *NullableStatus) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableStatus(val *Status) *NullableStatus {
return &NullableStatus{value: val, isSet: true}
}
func (v NullableStatus) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableStatus) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,382 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateResourcePoolPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateResourcePoolPayload{}
/*
types and functions for ipAcl
*/
// isArray
type UpdateResourcePoolPayloadGetIpAclAttributeType = *[]string
type UpdateResourcePoolPayloadGetIpAclArgType = []string
type UpdateResourcePoolPayloadGetIpAclRetType = []string
func getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(arg UpdateResourcePoolPayloadGetIpAclAttributeType) (ret UpdateResourcePoolPayloadGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetIpAclAttributeType(arg *UpdateResourcePoolPayloadGetIpAclAttributeType, val UpdateResourcePoolPayloadGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type UpdateResourcePoolPayloadGetLabelsAttributeType = *map[string]string
type UpdateResourcePoolPayloadGetLabelsArgType = map[string]string
type UpdateResourcePoolPayloadGetLabelsRetType = map[string]string
func getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(arg UpdateResourcePoolPayloadGetLabelsAttributeType) (ret UpdateResourcePoolPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetLabelsAttributeType(arg *UpdateResourcePoolPayloadGetLabelsAttributeType, val UpdateResourcePoolPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for performanceClass
*/
// isNotNullableString
type UpdateResourcePoolPayloadGetPerformanceClassAttributeType = *string
func getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg UpdateResourcePoolPayloadGetPerformanceClassAttributeType) (ret UpdateResourcePoolPayloadGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetPerformanceClassAttributeType(arg *UpdateResourcePoolPayloadGetPerformanceClassAttributeType, val UpdateResourcePoolPayloadGetPerformanceClassRetType) {
*arg = &val
}
type UpdateResourcePoolPayloadGetPerformanceClassArgType = string
type UpdateResourcePoolPayloadGetPerformanceClassRetType = string
/*
types and functions for sizeGigabytes
*/
// isInteger
type UpdateResourcePoolPayloadGetSizeGigabytesAttributeType = *int64
type UpdateResourcePoolPayloadGetSizeGigabytesArgType = *int64
type UpdateResourcePoolPayloadGetSizeGigabytesRetType = *int64
func getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg UpdateResourcePoolPayloadGetSizeGigabytesAttributeType) (ret UpdateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *UpdateResourcePoolPayloadGetSizeGigabytesAttributeType, val UpdateResourcePoolPayloadGetSizeGigabytesRetType) {
*arg = val
}
/*
types and functions for snapshotScheduleName
*/
// isNotNullableString
type UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType = *string
func getUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(arg UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType) (ret UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType(arg *UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType, val UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
*arg = &val
}
type UpdateResourcePoolPayloadGetSnapshotScheduleNameArgType = string
type UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType = string
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType = *bool
type UpdateResourcePoolPayloadgetSnapshotsAreVisibleArgType = bool
type UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType = bool
func getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType) (ret UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(arg *UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType, val UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
*arg = &val
}
// UpdateResourcePoolPayload struct for UpdateResourcePoolPayload
type UpdateResourcePoolPayload struct {
// (optional) List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl UpdateResourcePoolPayloadGetIpAclAttributeType `json:"ipAcl,omitempty"`
// An optional object that represents the labels associated with the resource pool keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels UpdateResourcePoolPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// (optional) Name of the performance class
PerformanceClass UpdateResourcePoolPayloadGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// (optional) Size of the Resource Pool (unit: gigabytes)
// Can be cast to int32 without loss of precision.
SizeGigabytes UpdateResourcePoolPayloadGetSizeGigabytesAttributeType `json:"sizeGigabytes,omitempty"`
// (optional) Name of the Snapshot Schedule to use If not set, the Snapshot Schedule is not updated If set to an empty string, the Snapshot Schedule is removed
SnapshotScheduleName UpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType `json:"snapshotScheduleName,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
}
// NewUpdateResourcePoolPayload instantiates a new UpdateResourcePoolPayload 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 NewUpdateResourcePoolPayload() *UpdateResourcePoolPayload {
this := UpdateResourcePoolPayload{}
return &this
}
// NewUpdateResourcePoolPayloadWithDefaults instantiates a new UpdateResourcePoolPayload 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 NewUpdateResourcePoolPayloadWithDefaults() *UpdateResourcePoolPayload {
this := UpdateResourcePoolPayload{}
return &this
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetIpAcl() (res UpdateResourcePoolPayloadGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetIpAclOk() (ret UpdateResourcePoolPayloadGetIpAclRetType, ok bool) {
return getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *UpdateResourcePoolPayload) SetIpAcl(v UpdateResourcePoolPayloadGetIpAclRetType) {
setUpdateResourcePoolPayloadGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetLabels() (res UpdateResourcePoolPayloadGetLabelsRetType) {
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 *UpdateResourcePoolPayload) GetLabelsOk() (ret UpdateResourcePoolPayloadGetLabelsRetType, ok bool) {
return getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *UpdateResourcePoolPayload) SetLabels(v UpdateResourcePoolPayloadGetLabelsRetType) {
setUpdateResourcePoolPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetPerformanceClass() (res UpdateResourcePoolPayloadGetPerformanceClassRetType) {
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 *UpdateResourcePoolPayload) GetPerformanceClassOk() (ret UpdateResourcePoolPayloadGetPerformanceClassRetType, ok bool) {
return getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field.
func (o *UpdateResourcePoolPayload) SetPerformanceClass(v UpdateResourcePoolPayloadGetPerformanceClassRetType) {
setUpdateResourcePoolPayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateResourcePoolPayload) GetSizeGigabytes() (res UpdateResourcePoolPayloadGetSizeGigabytesRetType) {
res, _ = o.GetSizeGigabytesOk()
return
}
// GetSizeGigabytesOk returns a tuple with the SizeGigabytes 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 *UpdateResourcePoolPayload) GetSizeGigabytesOk() (ret UpdateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) {
return getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes)
}
// HasSizeGigabytes returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasSizeGigabytes() bool {
_, ok := o.GetSizeGigabytesOk()
return ok
}
// SetSizeGigabytes gets a reference to the given int64 and assigns it to the SizeGigabytes field.
func (o *UpdateResourcePoolPayload) SetSizeGigabytes(v UpdateResourcePoolPayloadGetSizeGigabytesRetType) {
setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(&o.SizeGigabytes, v)
}
// SetSizeGigabytesNil sets the value for SizeGigabytes to be an explicit nil
func (o *UpdateResourcePoolPayload) SetSizeGigabytesNil() {
o.SizeGigabytes = nil
}
// UnsetSizeGigabytes ensures that no value is present for SizeGigabytes, not even an explicit nil
func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() {
o.SizeGigabytes = nil
}
// GetSnapshotScheduleName returns the SnapshotScheduleName field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetSnapshotScheduleName() (res UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
res, _ = o.GetSnapshotScheduleNameOk()
return
}
// GetSnapshotScheduleNameOk returns a tuple with the SnapshotScheduleName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetSnapshotScheduleNameOk() (ret UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType, ok bool) {
return getUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(o.SnapshotScheduleName)
}
// HasSnapshotScheduleName returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasSnapshotScheduleName() bool {
_, ok := o.GetSnapshotScheduleNameOk()
return ok
}
// SetSnapshotScheduleName gets a reference to the given string and assigns it to the SnapshotScheduleName field.
func (o *UpdateResourcePoolPayload) SetSnapshotScheduleName(v UpdateResourcePoolPayloadGetSnapshotScheduleNameRetType) {
setUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeType(&o.SnapshotScheduleName, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisible() (res UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisibleOk() (ret UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) {
return getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *UpdateResourcePoolPayload) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *UpdateResourcePoolPayload) SetSnapshotsAreVisible(v UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) {
setUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes); ok {
toSerialize["SizeGigabytes"] = val
}
if val, ok := getUpdateResourcePoolPayloadGetSnapshotScheduleNameAttributeTypeOk(o.SnapshotScheduleName); ok {
toSerialize["SnapshotScheduleName"] = val
}
if val, ok := getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
return toSerialize, nil
}
type NullableUpdateResourcePoolPayload struct {
value *UpdateResourcePoolPayload
isSet bool
}
func (v NullableUpdateResourcePoolPayload) Get() *UpdateResourcePoolPayload {
return v.value
}
func (v *NullableUpdateResourcePoolPayload) Set(val *UpdateResourcePoolPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateResourcePoolPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateResourcePoolPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateResourcePoolPayload(val *UpdateResourcePoolPayload) *NullableUpdateResourcePoolPayload {
return &NullableUpdateResourcePoolPayload{value: val, isSet: true}
}
func (v NullableUpdateResourcePoolPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateResourcePoolPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateResourcePoolResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateResourcePoolResponse{}
/*
types and functions for resourcePool
*/
// isModel
type UpdateResourcePoolResponseGetResourcePoolAttributeType = *UpdateResourcePoolResponseResourcePool
type UpdateResourcePoolResponseGetResourcePoolArgType = UpdateResourcePoolResponseResourcePool
type UpdateResourcePoolResponseGetResourcePoolRetType = UpdateResourcePoolResponseResourcePool
func getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(arg UpdateResourcePoolResponseGetResourcePoolAttributeType) (ret UpdateResourcePoolResponseGetResourcePoolRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseGetResourcePoolAttributeType(arg *UpdateResourcePoolResponseGetResourcePoolAttributeType, val UpdateResourcePoolResponseGetResourcePoolRetType) {
*arg = &val
}
// UpdateResourcePoolResponse struct for UpdateResourcePoolResponse
type UpdateResourcePoolResponse struct {
ResourcePool UpdateResourcePoolResponseGetResourcePoolAttributeType `json:"resourcePool,omitempty"`
}
// NewUpdateResourcePoolResponse instantiates a new UpdateResourcePoolResponse 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 NewUpdateResourcePoolResponse() *UpdateResourcePoolResponse {
this := UpdateResourcePoolResponse{}
return &this
}
// NewUpdateResourcePoolResponseWithDefaults instantiates a new UpdateResourcePoolResponse 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 NewUpdateResourcePoolResponseWithDefaults() *UpdateResourcePoolResponse {
this := UpdateResourcePoolResponse{}
return &this
}
// GetResourcePool returns the ResourcePool field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponse) GetResourcePool() (res UpdateResourcePoolResponseGetResourcePoolRetType) {
res, _ = o.GetResourcePoolOk()
return
}
// GetResourcePoolOk returns a tuple with the ResourcePool field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponse) GetResourcePoolOk() (ret UpdateResourcePoolResponseGetResourcePoolRetType, ok bool) {
return getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool)
}
// HasResourcePool returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponse) HasResourcePool() bool {
_, ok := o.GetResourcePoolOk()
return ok
}
// SetResourcePool gets a reference to the given UpdateResourcePoolResponseResourcePool and assigns it to the ResourcePool field.
func (o *UpdateResourcePoolResponse) SetResourcePool(v UpdateResourcePoolResponseGetResourcePoolRetType) {
setUpdateResourcePoolResponseGetResourcePoolAttributeType(&o.ResourcePool, v)
}
func (o UpdateResourcePoolResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool); ok {
toSerialize["ResourcePool"] = val
}
return toSerialize, nil
}
type NullableUpdateResourcePoolResponse struct {
value *UpdateResourcePoolResponse
isSet bool
}
func (v NullableUpdateResourcePoolResponse) Get() *UpdateResourcePoolResponse {
return v.value
}
func (v *NullableUpdateResourcePoolResponse) Set(val *UpdateResourcePoolResponse) {
v.value = val
v.isSet = true
}
func (v NullableUpdateResourcePoolResponse) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateResourcePoolResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateResourcePoolResponse(val *UpdateResourcePoolResponse) *NullableUpdateResourcePoolResponse {
return &NullableUpdateResourcePoolResponse{value: val, isSet: true}
}
func (v NullableUpdateResourcePoolResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateResourcePoolResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,802 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the UpdateResourcePoolResponseResourcePool type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateResourcePoolResponseResourcePool{}
/*
types and functions for availabilityZone
*/
// isNotNullableString
type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType = *string
func getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType, val UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
*arg = &val
}
type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneArgType = string
type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string
/*
types and functions for countShares
*/
// isInteger
type UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType = *int64
type UpdateResourcePoolResponseResourcePoolGetCountSharesArgType = int64
type UpdateResourcePoolResponseResourcePoolGetCountSharesRetType = int64
func getUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType, val UpdateResourcePoolResponseResourcePoolGetCountSharesRetType) {
*arg = &val
}
/*
types and functions for createdAt
*/
// isDateTime
type UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType = *time.Time
type UpdateResourcePoolResponseResourcePoolGetCreatedAtArgType = time.Time
type UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType = time.Time
func getUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType, val UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type UpdateResourcePoolResponseResourcePoolGetIdAttributeType = *string
func getUpdateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetIdAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetIdAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetIdAttributeType, val UpdateResourcePoolResponseResourcePoolGetIdRetType) {
*arg = &val
}
type UpdateResourcePoolResponseResourcePoolGetIdArgType = string
type UpdateResourcePoolResponseResourcePoolGetIdRetType = string
/*
types and functions for ipAcl
*/
// isArray
type UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType = *[]string
type UpdateResourcePoolResponseResourcePoolGetIpAclArgType = []string
type UpdateResourcePoolResponseResourcePoolGetIpAclRetType = []string
func getUpdateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType, val UpdateResourcePoolResponseResourcePoolGetIpAclRetType) {
*arg = &val
}
/*
types and functions for labels
*/
// isContainer
type UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType = *map[string]string
type UpdateResourcePoolResponseResourcePoolGetLabelsArgType = map[string]string
type UpdateResourcePoolResponseResourcePoolGetLabelsRetType = map[string]string
func getUpdateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType, val UpdateResourcePoolResponseResourcePoolGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType = *string
func getUpdateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetMountPathAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType, val UpdateResourcePoolResponseResourcePoolGetMountPathRetType) {
*arg = &val
}
type UpdateResourcePoolResponseResourcePoolGetMountPathArgType = string
type UpdateResourcePoolResponseResourcePoolGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type UpdateResourcePoolResponseResourcePoolGetNameAttributeType = *string
func getUpdateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetNameAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetNameAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetNameAttributeType, val UpdateResourcePoolResponseResourcePoolGetNameRetType) {
*arg = &val
}
type UpdateResourcePoolResponseResourcePoolGetNameArgType = string
type UpdateResourcePoolResponseResourcePoolGetNameRetType = string
/*
types and functions for performanceClass
*/
// isModel
type UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass
type UpdateResourcePoolResponseResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass
type UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass
func getUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType, val UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
*arg = &val
}
/*
types and functions for performanceClassDowngradableAt
*/
// isDateTime
type UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time
type UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time
type UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time
func getUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType, val UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
*arg = &val
}
/*
types and functions for sizeReducibleAt
*/
// isDateTime
type UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType = *time.Time
type UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtArgType = time.Time
type UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType = time.Time
func getUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType, val UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
*arg = &val
}
/*
types and functions for snapshotSchedule
*/
// isModel
type UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType = *SnapshotSchedule
type UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleArgType = SnapshotSchedule
type UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType = SnapshotSchedule
func getUpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType, val UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
*arg = &val
}
/*
types and functions for snapshotsAreVisible
*/
// isBoolean
type UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType = *bool
type UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleArgType = bool
type UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType = bool
func getUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType) (ret UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(arg *UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType, val UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
*arg = &val
}
/*
types and functions for space
*/
// isModel
type UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType = *ResourcePoolSpace
type UpdateResourcePoolResponseResourcePoolGetSpaceArgType = ResourcePoolSpace
type UpdateResourcePoolResponseResourcePoolGetSpaceRetType = ResourcePoolSpace
func getUpdateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType, val UpdateResourcePoolResponseResourcePoolGetSpaceRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type UpdateResourcePoolResponseResourcePoolGetStateAttributeType = *string
func getUpdateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetStateAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateResourcePoolResponseResourcePoolGetStateAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetStateAttributeType, val UpdateResourcePoolResponseResourcePoolGetStateRetType) {
*arg = &val
}
type UpdateResourcePoolResponseResourcePoolGetStateArgType = string
type UpdateResourcePoolResponseResourcePoolGetStateRetType = string
// UpdateResourcePoolResponseResourcePool Updated Resource Pool
type UpdateResourcePoolResponseResourcePool struct {
// Name of the respective availability zone
AvailabilityZone UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"`
// Number of Shares in the Resource Pool
// Can be cast to int32 without loss of precision.
CountShares UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType `json:"countShares,omitempty"`
CreatedAt UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// ID of the Resource Pool
Id UpdateResourcePoolResponseResourcePoolGetIdAttributeType `json:"id,omitempty"`
// List of IPs that can mount the Resource Pool in read-only; IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP)
IpAcl UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType `json:"ipAcl,omitempty"`
Labels UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Resource Pool, used to mount the Resource Pool Note that a Resource Pool can only be mounted in read-only
MountPath UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Resource Pool
Name UpdateResourcePoolResponseResourcePoolGetNameAttributeType `json:"name,omitempty"`
PerformanceClass UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType `json:"performanceClass,omitempty"`
// Time when the performance class can be downgraded again.
PerformanceClassDowngradableAt UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType `json:"performanceClassDowngradableAt,omitempty"`
// Time when the size can be reduced again.
SizeReducibleAt UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType `json:"sizeReducibleAt,omitempty"`
SnapshotSchedule UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType `json:"snapshotSchedule,omitempty"`
// Whether the .snapshot directory is visible when mounting the resource pool. Setting this value to false might prevent you from accessing the snapshots (e.g. for security reasons). Additionally, the access to the snapshots is always controlled by the export policy of the resource pool. That means, if snapshots are visible and the export policy allows for reading the resource pool, then it also allows reading the snapshot of all shares.
SnapshotsAreVisible UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"`
Space UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType `json:"space,omitempty"`
// State of the Resource Pool (possible values: [\"pending\", \"creating\", \"created\", \"updating\", \"error\", \"deleting\"])
State UpdateResourcePoolResponseResourcePoolGetStateAttributeType `json:"state,omitempty"`
}
// NewUpdateResourcePoolResponseResourcePool instantiates a new UpdateResourcePoolResponseResourcePool 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 NewUpdateResourcePoolResponseResourcePool() *UpdateResourcePoolResponseResourcePool {
this := UpdateResourcePoolResponseResourcePool{}
return &this
}
// NewUpdateResourcePoolResponseResourcePoolWithDefaults instantiates a new UpdateResourcePoolResponseResourcePool 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 NewUpdateResourcePoolResponseResourcePoolWithDefaults() *UpdateResourcePoolResponseResourcePool {
this := UpdateResourcePoolResponseResourcePool{}
return &this
}
// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetAvailabilityZone() (res UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
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 *UpdateResourcePoolResponseResourcePool) GetAvailabilityZoneOk() (ret UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone)
}
// HasAvailabilityZone returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasAvailabilityZone() bool {
_, ok := o.GetAvailabilityZoneOk()
return ok
}
// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field.
func (o *UpdateResourcePoolResponseResourcePool) SetAvailabilityZone(v UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) {
setUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v)
}
// GetCountShares returns the CountShares field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetCountShares() (res UpdateResourcePoolResponseResourcePoolGetCountSharesRetType) {
res, _ = o.GetCountSharesOk()
return
}
// GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetCountSharesOk() (ret UpdateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares)
}
// HasCountShares returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasCountShares() bool {
_, ok := o.GetCountSharesOk()
return ok
}
// SetCountShares gets a reference to the given int64 and assigns it to the CountShares field.
func (o *UpdateResourcePoolResponseResourcePool) SetCountShares(v UpdateResourcePoolResponseResourcePoolGetCountSharesRetType) {
setUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType(&o.CountShares, v)
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetCreatedAt() (res UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType) {
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 *UpdateResourcePoolResponseResourcePool) GetCreatedAtOk() (ret UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) 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 *UpdateResourcePoolResponseResourcePool) SetCreatedAt(v UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType) {
setUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetId() (res UpdateResourcePoolResponseResourcePoolGetIdRetType) {
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 *UpdateResourcePoolResponseResourcePool) GetIdOk() (ret UpdateResourcePoolResponseResourcePoolGetIdRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *UpdateResourcePoolResponseResourcePool) SetId(v UpdateResourcePoolResponseResourcePoolGetIdRetType) {
setUpdateResourcePoolResponseResourcePoolGetIdAttributeType(&o.Id, v)
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetIpAcl() (res UpdateResourcePoolResponseResourcePoolGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetIpAclOk() (ret UpdateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *UpdateResourcePoolResponseResourcePool) SetIpAcl(v UpdateResourcePoolResponseResourcePoolGetIpAclRetType) {
setUpdateResourcePoolResponseResourcePoolGetIpAclAttributeType(&o.IpAcl, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetLabels() (res UpdateResourcePoolResponseResourcePoolGetLabelsRetType) {
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 *UpdateResourcePoolResponseResourcePool) GetLabelsOk() (ret UpdateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *UpdateResourcePoolResponseResourcePool) SetLabels(v UpdateResourcePoolResponseResourcePoolGetLabelsRetType) {
setUpdateResourcePoolResponseResourcePoolGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetMountPath() (res UpdateResourcePoolResponseResourcePoolGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetMountPathOk() (ret UpdateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *UpdateResourcePoolResponseResourcePool) SetMountPath(v UpdateResourcePoolResponseResourcePoolGetMountPathRetType) {
setUpdateResourcePoolResponseResourcePoolGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetName() (res UpdateResourcePoolResponseResourcePoolGetNameRetType) {
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 *UpdateResourcePoolResponseResourcePool) GetNameOk() (ret UpdateResourcePoolResponseResourcePoolGetNameRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateResourcePoolResponseResourcePool) SetName(v UpdateResourcePoolResponseResourcePoolGetNameRetType) {
setUpdateResourcePoolResponseResourcePoolGetNameAttributeType(&o.Name, v)
}
// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClass() (res UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
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 *UpdateResourcePoolResponseResourcePool) GetPerformanceClassOk() (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass)
}
// HasPerformanceClass returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasPerformanceClass() bool {
_, ok := o.GetPerformanceClassOk()
return ok
}
// SetPerformanceClass gets a reference to the given ResourcePoolPerformanceClass and assigns it to the PerformanceClass field.
func (o *UpdateResourcePoolResponseResourcePool) SetPerformanceClass(v UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType) {
setUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v)
}
// GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt() (res UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
res, _ = o.GetPerformanceClassDowngradableAtOk()
return
}
// GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAtOk() (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt)
}
// HasPerformanceClassDowngradableAt returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasPerformanceClassDowngradableAt() bool {
_, ok := o.GetPerformanceClassDowngradableAtOk()
return ok
}
// SetPerformanceClassDowngradableAt gets a reference to the given time.Time and assigns it to the PerformanceClassDowngradableAt field.
func (o *UpdateResourcePoolResponseResourcePool) SetPerformanceClassDowngradableAt(v UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) {
setUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v)
}
// GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetSizeReducibleAt() (res UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
res, _ = o.GetSizeReducibleAtOk()
return
}
// GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetSizeReducibleAtOk() (ret UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt)
}
// HasSizeReducibleAt returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasSizeReducibleAt() bool {
_, ok := o.GetSizeReducibleAtOk()
return ok
}
// SetSizeReducibleAt gets a reference to the given time.Time and assigns it to the SizeReducibleAt field.
func (o *UpdateResourcePoolResponseResourcePool) SetSizeReducibleAt(v UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) {
setUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v)
}
// GetSnapshotSchedule returns the SnapshotSchedule field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotSchedule() (res UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
res, _ = o.GetSnapshotScheduleOk()
return
}
// GetSnapshotScheduleOk returns a tuple with the SnapshotSchedule field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotScheduleOk() (ret UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule)
}
// HasSnapshotSchedule returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasSnapshotSchedule() bool {
_, ok := o.GetSnapshotScheduleOk()
return ok
}
// SetSnapshotSchedule gets a reference to the given SnapshotSchedule and assigns it to the SnapshotSchedule field.
func (o *UpdateResourcePoolResponseResourcePool) SetSnapshotSchedule(v UpdateResourcePoolResponseResourcePoolGetSnapshotScheduleRetType) {
setUpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeType(&o.SnapshotSchedule, v)
}
// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
res, _ = o.GetSnapshotsAreVisibleOk()
return
}
// GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotsAreVisibleOk() (ret UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible)
}
// HasSnapshotsAreVisible returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasSnapshotsAreVisible() bool {
_, ok := o.GetSnapshotsAreVisibleOk()
return ok
}
// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field.
func (o *UpdateResourcePoolResponseResourcePool) SetSnapshotsAreVisible(v UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) {
setUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v)
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetSpace() (res UpdateResourcePoolResponseResourcePoolGetSpaceRetType) {
res, _ = o.GetSpaceOk()
return
}
// GetSpaceOk returns a tuple with the Space field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetSpaceOk() (ret UpdateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space)
}
// HasSpace returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasSpace() bool {
_, ok := o.GetSpaceOk()
return ok
}
// SetSpace gets a reference to the given ResourcePoolSpace and assigns it to the Space field.
func (o *UpdateResourcePoolResponseResourcePool) SetSpace(v UpdateResourcePoolResponseResourcePoolGetSpaceRetType) {
setUpdateResourcePoolResponseResourcePoolGetSpaceAttributeType(&o.Space, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *UpdateResourcePoolResponseResourcePool) GetState() (res UpdateResourcePoolResponseResourcePoolGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateResourcePoolResponseResourcePool) GetStateOk() (ret UpdateResourcePoolResponseResourcePoolGetStateRetType, ok bool) {
return getUpdateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *UpdateResourcePoolResponseResourcePool) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *UpdateResourcePoolResponseResourcePool) SetState(v UpdateResourcePoolResponseResourcePoolGetStateRetType) {
setUpdateResourcePoolResponseResourcePoolGetStateAttributeType(&o.State, v)
}
func (o UpdateResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok {
toSerialize["AvailabilityZone"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares); ok {
toSerialize["CountShares"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass); ok {
toSerialize["PerformanceClass"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt); ok {
toSerialize["PerformanceClassDowngradableAt"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt); ok {
toSerialize["SizeReducibleAt"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetSnapshotScheduleAttributeTypeOk(o.SnapshotSchedule); ok {
toSerialize["SnapshotSchedule"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible); ok {
toSerialize["SnapshotsAreVisible"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space); ok {
toSerialize["Space"] = val
}
if val, ok := getUpdateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableUpdateResourcePoolResponseResourcePool struct {
value *UpdateResourcePoolResponseResourcePool
isSet bool
}
func (v NullableUpdateResourcePoolResponseResourcePool) Get() *UpdateResourcePoolResponseResourcePool {
return v.value
}
func (v *NullableUpdateResourcePoolResponseResourcePool) Set(val *UpdateResourcePoolResponseResourcePool) {
v.value = val
v.isSet = true
}
func (v NullableUpdateResourcePoolResponseResourcePool) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateResourcePoolResponseResourcePool) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateResourcePoolResponseResourcePool(val *UpdateResourcePoolResponseResourcePool) *NullableUpdateResourcePoolResponseResourcePool {
return &NullableUpdateResourcePoolResponseResourcePool{value: val, isSet: true}
}
func (v NullableUpdateResourcePoolResponseResourcePool) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateResourcePoolResponseResourcePool) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,391 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateShareExportPolicyBodyRule type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateShareExportPolicyBodyRule{}
/*
types and functions for description
*/
// isNullableString
type UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType = *NullableString
func getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(arg UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType) (ret UpdateShareExportPolicyBodyRuleGetDescriptionRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setUpdateShareExportPolicyBodyRuleGetDescriptionAttributeType(arg *UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType, val UpdateShareExportPolicyBodyRuleGetDescriptionRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type UpdateShareExportPolicyBodyRuleGetDescriptionArgType = *string
type UpdateShareExportPolicyBodyRuleGetDescriptionRetType = *string
/*
types and functions for ipAcl
*/
// isArray
type UpdateShareExportPolicyBodyRuleGetIpAclAttributeType = *[]string
type UpdateShareExportPolicyBodyRuleGetIpAclArgType = []string
type UpdateShareExportPolicyBodyRuleGetIpAclRetType = []string
func getUpdateShareExportPolicyBodyRuleGetIpAclAttributeTypeOk(arg UpdateShareExportPolicyBodyRuleGetIpAclAttributeType) (ret UpdateShareExportPolicyBodyRuleGetIpAclRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyBodyRuleGetIpAclAttributeType(arg *UpdateShareExportPolicyBodyRuleGetIpAclAttributeType, val UpdateShareExportPolicyBodyRuleGetIpAclRetType) {
*arg = &val
}
/*
types and functions for order
*/
// isInteger
type UpdateShareExportPolicyBodyRuleGetOrderAttributeType = *int64
type UpdateShareExportPolicyBodyRuleGetOrderArgType = int64
type UpdateShareExportPolicyBodyRuleGetOrderRetType = int64
func getUpdateShareExportPolicyBodyRuleGetOrderAttributeTypeOk(arg UpdateShareExportPolicyBodyRuleGetOrderAttributeType) (ret UpdateShareExportPolicyBodyRuleGetOrderRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyBodyRuleGetOrderAttributeType(arg *UpdateShareExportPolicyBodyRuleGetOrderAttributeType, val UpdateShareExportPolicyBodyRuleGetOrderRetType) {
*arg = &val
}
/*
types and functions for readOnly
*/
// isBoolean
type UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType = *bool
type UpdateShareExportPolicyBodyRulegetReadOnlyArgType = bool
type UpdateShareExportPolicyBodyRulegetReadOnlyRetType = bool
func getUpdateShareExportPolicyBodyRulegetReadOnlyAttributeTypeOk(arg UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType) (ret UpdateShareExportPolicyBodyRulegetReadOnlyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyBodyRulegetReadOnlyAttributeType(arg *UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType, val UpdateShareExportPolicyBodyRulegetReadOnlyRetType) {
*arg = &val
}
/*
types and functions for setUuid
*/
// isBoolean
type UpdateShareExportPolicyBodyRulegetSetUuidAttributeType = *bool
type UpdateShareExportPolicyBodyRulegetSetUuidArgType = bool
type UpdateShareExportPolicyBodyRulegetSetUuidRetType = bool
func getUpdateShareExportPolicyBodyRulegetSetUuidAttributeTypeOk(arg UpdateShareExportPolicyBodyRulegetSetUuidAttributeType) (ret UpdateShareExportPolicyBodyRulegetSetUuidRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyBodyRulegetSetUuidAttributeType(arg *UpdateShareExportPolicyBodyRulegetSetUuidAttributeType, val UpdateShareExportPolicyBodyRulegetSetUuidRetType) {
*arg = &val
}
/*
types and functions for superUser
*/
// isBoolean
type UpdateShareExportPolicyBodyRulegetSuperUserAttributeType = *bool
type UpdateShareExportPolicyBodyRulegetSuperUserArgType = bool
type UpdateShareExportPolicyBodyRulegetSuperUserRetType = bool
func getUpdateShareExportPolicyBodyRulegetSuperUserAttributeTypeOk(arg UpdateShareExportPolicyBodyRulegetSuperUserAttributeType) (ret UpdateShareExportPolicyBodyRulegetSuperUserRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyBodyRulegetSuperUserAttributeType(arg *UpdateShareExportPolicyBodyRulegetSuperUserAttributeType, val UpdateShareExportPolicyBodyRulegetSuperUserRetType) {
*arg = &val
}
// UpdateShareExportPolicyBodyRule struct for UpdateShareExportPolicyBodyRule
type UpdateShareExportPolicyBodyRule struct {
// Description of the Rule (optional)
Description UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType `json:"description,omitempty"`
// IP access control list, where IPs must have a subnet mask (e.g. \"172.16.0.0/24\" for a range of IPs, or \"172.16.0.250/32\" for a specific IP) This array cannot be empty
IpAcl UpdateShareExportPolicyBodyRuleGetIpAclAttributeType `json:"ipAcl,omitempty"`
// Order of the rule within a Share Export Policy. The order is used so that when a client IP matches multiple rules, the first rule is applied This field must be set
// Can be cast to int32 without loss of precision.
Order UpdateShareExportPolicyBodyRuleGetOrderAttributeType `json:"order,omitempty"`
// Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false
ReadOnly UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType `json:"readOnly,omitempty"`
// Flag to honor set UUID Default: false
SetUuid UpdateShareExportPolicyBodyRulegetSetUuidAttributeType `json:"setUuid,omitempty"`
// Flag to indicate if client IPs matching this rule have root access on the Share Default: true
SuperUser UpdateShareExportPolicyBodyRulegetSuperUserAttributeType `json:"superUser,omitempty"`
}
// NewUpdateShareExportPolicyBodyRule instantiates a new UpdateShareExportPolicyBodyRule 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 NewUpdateShareExportPolicyBodyRule() *UpdateShareExportPolicyBodyRule {
this := UpdateShareExportPolicyBodyRule{}
return &this
}
// NewUpdateShareExportPolicyBodyRuleWithDefaults instantiates a new UpdateShareExportPolicyBodyRule 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 NewUpdateShareExportPolicyBodyRuleWithDefaults() *UpdateShareExportPolicyBodyRule {
this := UpdateShareExportPolicyBodyRule{}
var readOnly bool = false
this.ReadOnly = &readOnly
var setUuid bool = false
this.SetUuid = &setUuid
var superUser bool = true
this.SuperUser = &superUser
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateShareExportPolicyBodyRule) GetDescription() (res UpdateShareExportPolicyBodyRuleGetDescriptionRetType) {
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UpdateShareExportPolicyBodyRule) GetDescriptionOk() (ret UpdateShareExportPolicyBodyRuleGetDescriptionRetType, ok bool) {
return getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyBodyRule) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *UpdateShareExportPolicyBodyRule) SetDescription(v UpdateShareExportPolicyBodyRuleGetDescriptionRetType) {
setUpdateShareExportPolicyBodyRuleGetDescriptionAttributeType(&o.Description, v)
}
// SetDescriptionNil sets the value for Description to be an explicit nil
func (o *UpdateShareExportPolicyBodyRule) SetDescriptionNil() {
o.Description = nil
}
// UnsetDescription ensures that no value is present for Description, not even an explicit nil
func (o *UpdateShareExportPolicyBodyRule) UnsetDescription() {
o.Description = nil
}
// GetIpAcl returns the IpAcl field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyBodyRule) GetIpAcl() (res UpdateShareExportPolicyBodyRuleGetIpAclRetType) {
res, _ = o.GetIpAclOk()
return
}
// GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareExportPolicyBodyRule) GetIpAclOk() (ret UpdateShareExportPolicyBodyRuleGetIpAclRetType, ok bool) {
return getUpdateShareExportPolicyBodyRuleGetIpAclAttributeTypeOk(o.IpAcl)
}
// HasIpAcl returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyBodyRule) HasIpAcl() bool {
_, ok := o.GetIpAclOk()
return ok
}
// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field.
func (o *UpdateShareExportPolicyBodyRule) SetIpAcl(v UpdateShareExportPolicyBodyRuleGetIpAclRetType) {
setUpdateShareExportPolicyBodyRuleGetIpAclAttributeType(&o.IpAcl, v)
}
// GetOrder returns the Order field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyBodyRule) GetOrder() (res UpdateShareExportPolicyBodyRuleGetOrderRetType) {
res, _ = o.GetOrderOk()
return
}
// GetOrderOk returns a tuple with the Order field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareExportPolicyBodyRule) GetOrderOk() (ret UpdateShareExportPolicyBodyRuleGetOrderRetType, ok bool) {
return getUpdateShareExportPolicyBodyRuleGetOrderAttributeTypeOk(o.Order)
}
// HasOrder returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyBodyRule) HasOrder() bool {
_, ok := o.GetOrderOk()
return ok
}
// SetOrder gets a reference to the given int64 and assigns it to the Order field.
func (o *UpdateShareExportPolicyBodyRule) SetOrder(v UpdateShareExportPolicyBodyRuleGetOrderRetType) {
setUpdateShareExportPolicyBodyRuleGetOrderAttributeType(&o.Order, v)
}
// GetReadOnly returns the ReadOnly field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyBodyRule) GetReadOnly() (res UpdateShareExportPolicyBodyRulegetReadOnlyRetType) {
res, _ = o.GetReadOnlyOk()
return
}
// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareExportPolicyBodyRule) GetReadOnlyOk() (ret UpdateShareExportPolicyBodyRulegetReadOnlyRetType, ok bool) {
return getUpdateShareExportPolicyBodyRulegetReadOnlyAttributeTypeOk(o.ReadOnly)
}
// HasReadOnly returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyBodyRule) HasReadOnly() bool {
_, ok := o.GetReadOnlyOk()
return ok
}
// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field.
func (o *UpdateShareExportPolicyBodyRule) SetReadOnly(v UpdateShareExportPolicyBodyRulegetReadOnlyRetType) {
setUpdateShareExportPolicyBodyRulegetReadOnlyAttributeType(&o.ReadOnly, v)
}
// GetSetUuid returns the SetUuid field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyBodyRule) GetSetUuid() (res UpdateShareExportPolicyBodyRulegetSetUuidRetType) {
res, _ = o.GetSetUuidOk()
return
}
// GetSetUuidOk returns a tuple with the SetUuid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareExportPolicyBodyRule) GetSetUuidOk() (ret UpdateShareExportPolicyBodyRulegetSetUuidRetType, ok bool) {
return getUpdateShareExportPolicyBodyRulegetSetUuidAttributeTypeOk(o.SetUuid)
}
// HasSetUuid returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyBodyRule) HasSetUuid() bool {
_, ok := o.GetSetUuidOk()
return ok
}
// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field.
func (o *UpdateShareExportPolicyBodyRule) SetSetUuid(v UpdateShareExportPolicyBodyRulegetSetUuidRetType) {
setUpdateShareExportPolicyBodyRulegetSetUuidAttributeType(&o.SetUuid, v)
}
// GetSuperUser returns the SuperUser field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyBodyRule) GetSuperUser() (res UpdateShareExportPolicyBodyRulegetSuperUserRetType) {
res, _ = o.GetSuperUserOk()
return
}
// GetSuperUserOk returns a tuple with the SuperUser field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareExportPolicyBodyRule) GetSuperUserOk() (ret UpdateShareExportPolicyBodyRulegetSuperUserRetType, ok bool) {
return getUpdateShareExportPolicyBodyRulegetSuperUserAttributeTypeOk(o.SuperUser)
}
// HasSuperUser returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyBodyRule) HasSuperUser() bool {
_, ok := o.GetSuperUserOk()
return ok
}
// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field.
func (o *UpdateShareExportPolicyBodyRule) SetSuperUser(v UpdateShareExportPolicyBodyRulegetSuperUserRetType) {
setUpdateShareExportPolicyBodyRulegetSuperUserAttributeType(&o.SuperUser, v)
}
func (o UpdateShareExportPolicyBodyRule) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getUpdateShareExportPolicyBodyRuleGetIpAclAttributeTypeOk(o.IpAcl); ok {
toSerialize["IpAcl"] = val
}
if val, ok := getUpdateShareExportPolicyBodyRuleGetOrderAttributeTypeOk(o.Order); ok {
toSerialize["Order"] = val
}
if val, ok := getUpdateShareExportPolicyBodyRulegetReadOnlyAttributeTypeOk(o.ReadOnly); ok {
toSerialize["ReadOnly"] = val
}
if val, ok := getUpdateShareExportPolicyBodyRulegetSetUuidAttributeTypeOk(o.SetUuid); ok {
toSerialize["SetUuid"] = val
}
if val, ok := getUpdateShareExportPolicyBodyRulegetSuperUserAttributeTypeOk(o.SuperUser); ok {
toSerialize["SuperUser"] = val
}
return toSerialize, nil
}
type NullableUpdateShareExportPolicyBodyRule struct {
value *UpdateShareExportPolicyBodyRule
isSet bool
}
func (v NullableUpdateShareExportPolicyBodyRule) Get() *UpdateShareExportPolicyBodyRule {
return v.value
}
func (v *NullableUpdateShareExportPolicyBodyRule) Set(val *UpdateShareExportPolicyBodyRule) {
v.value = val
v.isSet = true
}
func (v NullableUpdateShareExportPolicyBodyRule) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateShareExportPolicyBodyRule) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateShareExportPolicyBodyRule(val *UpdateShareExportPolicyBodyRule) *NullableUpdateShareExportPolicyBodyRule {
return &NullableUpdateShareExportPolicyBodyRule{value: val, isSet: true}
}
func (v NullableUpdateShareExportPolicyBodyRule) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateShareExportPolicyBodyRule) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,177 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateShareExportPolicyPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateShareExportPolicyPayload{}
/*
types and functions for labels
*/
// isContainer
type UpdateShareExportPolicyPayloadGetLabelsAttributeType = *map[string]string
type UpdateShareExportPolicyPayloadGetLabelsArgType = map[string]string
type UpdateShareExportPolicyPayloadGetLabelsRetType = map[string]string
func getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(arg UpdateShareExportPolicyPayloadGetLabelsAttributeType) (ret UpdateShareExportPolicyPayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyPayloadGetLabelsAttributeType(arg *UpdateShareExportPolicyPayloadGetLabelsAttributeType, val UpdateShareExportPolicyPayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for rules
*/
// isArray
type UpdateShareExportPolicyPayloadGetRulesAttributeType = *[]UpdateShareExportPolicyBodyRule
type UpdateShareExportPolicyPayloadGetRulesArgType = *[]UpdateShareExportPolicyBodyRule
type UpdateShareExportPolicyPayloadGetRulesRetType = *[]UpdateShareExportPolicyBodyRule
func getUpdateShareExportPolicyPayloadGetRulesAttributeTypeOk(arg UpdateShareExportPolicyPayloadGetRulesAttributeType) (ret UpdateShareExportPolicyPayloadGetRulesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateShareExportPolicyPayloadGetRulesAttributeType(arg *UpdateShareExportPolicyPayloadGetRulesAttributeType, val UpdateShareExportPolicyPayloadGetRulesRetType) {
*arg = val
}
// UpdateShareExportPolicyPayload struct for UpdateShareExportPolicyPayload
type UpdateShareExportPolicyPayload struct {
// An optional object that represents the labels associated with the share export policy keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels UpdateShareExportPolicyPayloadGetLabelsAttributeType `json:"labels,omitempty"`
// List of rules of the Share Export Policy. The order of the rules within the array does not matter - what matters is the field \"order\" within each rule. The whole set of rules needs to be sent in the same request, e.g. if 1 rule is sent, the share export policy will have just that 1 rule, as opposed to extending the existing set of rules with the 1 rule that was sent Important note: the array of rules passed always overwrites the rule array (i.e. sending an empty array removes all rules)
Rules UpdateShareExportPolicyPayloadGetRulesAttributeType `json:"rules,omitempty"`
}
// NewUpdateShareExportPolicyPayload instantiates a new UpdateShareExportPolicyPayload 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 NewUpdateShareExportPolicyPayload() *UpdateShareExportPolicyPayload {
this := UpdateShareExportPolicyPayload{}
return &this
}
// NewUpdateShareExportPolicyPayloadWithDefaults instantiates a new UpdateShareExportPolicyPayload 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 NewUpdateShareExportPolicyPayloadWithDefaults() *UpdateShareExportPolicyPayload {
this := UpdateShareExportPolicyPayload{}
return &this
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyPayload) GetLabels() (res UpdateShareExportPolicyPayloadGetLabelsRetType) {
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 *UpdateShareExportPolicyPayload) GetLabelsOk() (ret UpdateShareExportPolicyPayloadGetLabelsRetType, ok bool) {
return getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyPayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *UpdateShareExportPolicyPayload) SetLabels(v UpdateShareExportPolicyPayloadGetLabelsRetType) {
setUpdateShareExportPolicyPayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetRules returns the Rules field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateShareExportPolicyPayload) GetRules() (res UpdateShareExportPolicyPayloadGetRulesRetType) {
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.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UpdateShareExportPolicyPayload) GetRulesOk() (ret UpdateShareExportPolicyPayloadGetRulesRetType, ok bool) {
return getUpdateShareExportPolicyPayloadGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyPayload) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given []UpdateShareExportPolicyBodyRule and assigns it to the Rules field.
func (o *UpdateShareExportPolicyPayload) SetRules(v UpdateShareExportPolicyPayloadGetRulesRetType) {
setUpdateShareExportPolicyPayloadGetRulesAttributeType(&o.Rules, v)
}
func (o UpdateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateShareExportPolicyPayloadGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
return toSerialize, nil
}
type NullableUpdateShareExportPolicyPayload struct {
value *UpdateShareExportPolicyPayload
isSet bool
}
func (v NullableUpdateShareExportPolicyPayload) Get() *UpdateShareExportPolicyPayload {
return v.value
}
func (v *NullableUpdateShareExportPolicyPayload) Set(val *UpdateShareExportPolicyPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateShareExportPolicyPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateShareExportPolicyPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateShareExportPolicyPayload(val *UpdateShareExportPolicyPayload) *NullableUpdateShareExportPolicyPayload {
return &NullableUpdateShareExportPolicyPayload{value: val, isSet: true}
}
func (v NullableUpdateShareExportPolicyPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateShareExportPolicyPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateShareExportPolicyResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateShareExportPolicyResponse{}
/*
types and functions for shareExportPolicy
*/
// isModel
type UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType = *ShareExportPolicy
type UpdateShareExportPolicyResponseGetShareExportPolicyArgType = ShareExportPolicy
type UpdateShareExportPolicyResponseGetShareExportPolicyRetType = ShareExportPolicy
func getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType) (ret UpdateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareExportPolicyResponseGetShareExportPolicyAttributeType(arg *UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType, val UpdateShareExportPolicyResponseGetShareExportPolicyRetType) {
*arg = &val
}
// UpdateShareExportPolicyResponse struct for UpdateShareExportPolicyResponse
type UpdateShareExportPolicyResponse struct {
ShareExportPolicy UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType `json:"shareExportPolicy,omitempty"`
}
// NewUpdateShareExportPolicyResponse instantiates a new UpdateShareExportPolicyResponse 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 NewUpdateShareExportPolicyResponse() *UpdateShareExportPolicyResponse {
this := UpdateShareExportPolicyResponse{}
return &this
}
// NewUpdateShareExportPolicyResponseWithDefaults instantiates a new UpdateShareExportPolicyResponse 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 NewUpdateShareExportPolicyResponseWithDefaults() *UpdateShareExportPolicyResponse {
this := UpdateShareExportPolicyResponse{}
return &this
}
// GetShareExportPolicy returns the ShareExportPolicy field value if set, zero value otherwise.
func (o *UpdateShareExportPolicyResponse) GetShareExportPolicy() (res UpdateShareExportPolicyResponseGetShareExportPolicyRetType) {
res, _ = o.GetShareExportPolicyOk()
return
}
// GetShareExportPolicyOk returns a tuple with the ShareExportPolicy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareExportPolicyResponse) GetShareExportPolicyOk() (ret UpdateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) {
return getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy)
}
// HasShareExportPolicy returns a boolean if a field has been set.
func (o *UpdateShareExportPolicyResponse) HasShareExportPolicy() bool {
_, ok := o.GetShareExportPolicyOk()
return ok
}
// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field.
func (o *UpdateShareExportPolicyResponse) SetShareExportPolicy(v UpdateShareExportPolicyResponseGetShareExportPolicyRetType) {
setUpdateShareExportPolicyResponseGetShareExportPolicyAttributeType(&o.ShareExportPolicy, v)
}
func (o UpdateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy); ok {
toSerialize["ShareExportPolicy"] = val
}
return toSerialize, nil
}
type NullableUpdateShareExportPolicyResponse struct {
value *UpdateShareExportPolicyResponse
isSet bool
}
func (v NullableUpdateShareExportPolicyResponse) Get() *UpdateShareExportPolicyResponse {
return v.value
}
func (v *NullableUpdateShareExportPolicyResponse) Set(val *UpdateShareExportPolicyResponse) {
v.value = val
v.isSet = true
}
func (v NullableUpdateShareExportPolicyResponse) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateShareExportPolicyResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateShareExportPolicyResponse(val *UpdateShareExportPolicyResponse) *NullableUpdateShareExportPolicyResponse {
return &NullableUpdateShareExportPolicyResponse{value: val, isSet: true}
}
func (v NullableUpdateShareExportPolicyResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateShareExportPolicyResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,252 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateSharePayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateSharePayload{}
/*
types and functions for exportPolicyName
*/
// isNullableString
type UpdateSharePayloadGetExportPolicyNameAttributeType = *NullableString
func getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(arg UpdateSharePayloadGetExportPolicyNameAttributeType) (ret UpdateSharePayloadGetExportPolicyNameRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setUpdateSharePayloadGetExportPolicyNameAttributeType(arg *UpdateSharePayloadGetExportPolicyNameAttributeType, val UpdateSharePayloadGetExportPolicyNameRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type UpdateSharePayloadGetExportPolicyNameArgType = *string
type UpdateSharePayloadGetExportPolicyNameRetType = *string
/*
types and functions for labels
*/
// isContainer
type UpdateSharePayloadGetLabelsAttributeType = *map[string]string
type UpdateSharePayloadGetLabelsArgType = map[string]string
type UpdateSharePayloadGetLabelsRetType = map[string]string
func getUpdateSharePayloadGetLabelsAttributeTypeOk(arg UpdateSharePayloadGetLabelsAttributeType) (ret UpdateSharePayloadGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateSharePayloadGetLabelsAttributeType(arg *UpdateSharePayloadGetLabelsAttributeType, val UpdateSharePayloadGetLabelsRetType) {
*arg = &val
}
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType = *int64
type UpdateSharePayloadGetSpaceHardLimitGigabytesArgType = *int64
type UpdateSharePayloadGetSpaceHardLimitGigabytesRetType = *int64
func getUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(arg UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType) (ret UpdateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType(arg *UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType, val UpdateSharePayloadGetSpaceHardLimitGigabytesRetType) {
*arg = val
}
// UpdateSharePayload struct for UpdateSharePayload
type UpdateSharePayload struct {
// Name of the Share Export Policy to use in the Share. The behavior depends on the value: - If not set (null): Keep the existing export policy (if any) - If set to empty string (\"\"): Remove the existing export policy - If set to a policy name: Update to use the specified policy, creating a new association if none exists
ExportPolicyName UpdateSharePayloadGetExportPolicyNameAttributeType `json:"exportPolicyName,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels UpdateSharePayloadGetLabelsAttributeType `json:"labels,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
}
// NewUpdateSharePayload instantiates a new UpdateSharePayload 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 NewUpdateSharePayload() *UpdateSharePayload {
this := UpdateSharePayload{}
return &this
}
// NewUpdateSharePayloadWithDefaults instantiates a new UpdateSharePayload 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 NewUpdateSharePayloadWithDefaults() *UpdateSharePayload {
this := UpdateSharePayload{}
return &this
}
// GetExportPolicyName returns the ExportPolicyName field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateSharePayload) GetExportPolicyName() (res UpdateSharePayloadGetExportPolicyNameRetType) {
res, _ = o.GetExportPolicyNameOk()
return
}
// GetExportPolicyNameOk returns a tuple with the ExportPolicyName 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 *UpdateSharePayload) GetExportPolicyNameOk() (ret UpdateSharePayloadGetExportPolicyNameRetType, ok bool) {
return getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName)
}
// HasExportPolicyName returns a boolean if a field has been set.
func (o *UpdateSharePayload) HasExportPolicyName() bool {
_, ok := o.GetExportPolicyNameOk()
return ok
}
// SetExportPolicyName gets a reference to the given string and assigns it to the ExportPolicyName field.
func (o *UpdateSharePayload) SetExportPolicyName(v UpdateSharePayloadGetExportPolicyNameRetType) {
setUpdateSharePayloadGetExportPolicyNameAttributeType(&o.ExportPolicyName, v)
}
// SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil
func (o *UpdateSharePayload) SetExportPolicyNameNil() {
o.ExportPolicyName = nil
}
// UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil
func (o *UpdateSharePayload) UnsetExportPolicyName() {
o.ExportPolicyName = nil
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateSharePayload) GetLabels() (res UpdateSharePayloadGetLabelsRetType) {
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 *UpdateSharePayload) GetLabelsOk() (ret UpdateSharePayloadGetLabelsRetType, ok bool) {
return getUpdateSharePayloadGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateSharePayload) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *UpdateSharePayload) SetLabels(v UpdateSharePayloadGetLabelsRetType) {
setUpdateSharePayloadGetLabelsAttributeType(&o.Labels, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateSharePayload) GetSpaceHardLimitGigabytes() (res UpdateSharePayloadGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes 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 *UpdateSharePayload) GetSpaceHardLimitGigabytesOk() (ret UpdateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) {
return getUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *UpdateSharePayload) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *UpdateSharePayload) SetSpaceHardLimitGigabytes(v UpdateSharePayloadGetSpaceHardLimitGigabytesRetType) {
setUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// SetSpaceHardLimitGigabytesNil sets the value for SpaceHardLimitGigabytes to be an explicit nil
func (o *UpdateSharePayload) SetSpaceHardLimitGigabytesNil() {
o.SpaceHardLimitGigabytes = nil
}
// UnsetSpaceHardLimitGigabytes ensures that no value is present for SpaceHardLimitGigabytes, not even an explicit nil
func (o *UpdateSharePayload) UnsetSpaceHardLimitGigabytes() {
o.SpaceHardLimitGigabytes = nil
}
func (o UpdateSharePayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName); ok {
toSerialize["ExportPolicyName"] = val
}
if val, ok := getUpdateSharePayloadGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
return toSerialize, nil
}
type NullableUpdateSharePayload struct {
value *UpdateSharePayload
isSet bool
}
func (v NullableUpdateSharePayload) Get() *UpdateSharePayload {
return v.value
}
func (v *NullableUpdateSharePayload) Set(val *UpdateSharePayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateSharePayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateSharePayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateSharePayload(val *UpdateSharePayload) *NullableUpdateSharePayload {
return &NullableUpdateSharePayload{value: val, isSet: true}
}
func (v NullableUpdateSharePayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateSharePayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

View file

@ -0,0 +1,127 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
)
// checks if the UpdateShareResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateShareResponse{}
/*
types and functions for share
*/
// isModel
type UpdateShareResponseGetShareAttributeType = *UpdateShareResponseShare
type UpdateShareResponseGetShareArgType = UpdateShareResponseShare
type UpdateShareResponseGetShareRetType = UpdateShareResponseShare
func getUpdateShareResponseGetShareAttributeTypeOk(arg UpdateShareResponseGetShareAttributeType) (ret UpdateShareResponseGetShareRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseGetShareAttributeType(arg *UpdateShareResponseGetShareAttributeType, val UpdateShareResponseGetShareRetType) {
*arg = &val
}
// UpdateShareResponse struct for UpdateShareResponse
type UpdateShareResponse struct {
Share UpdateShareResponseGetShareAttributeType `json:"share,omitempty"`
}
// NewUpdateShareResponse instantiates a new UpdateShareResponse 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 NewUpdateShareResponse() *UpdateShareResponse {
this := UpdateShareResponse{}
return &this
}
// NewUpdateShareResponseWithDefaults instantiates a new UpdateShareResponse 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 NewUpdateShareResponseWithDefaults() *UpdateShareResponse {
this := UpdateShareResponse{}
return &this
}
// GetShare returns the Share field value if set, zero value otherwise.
func (o *UpdateShareResponse) GetShare() (res UpdateShareResponseGetShareRetType) {
res, _ = o.GetShareOk()
return
}
// GetShareOk returns a tuple with the Share field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponse) GetShareOk() (ret UpdateShareResponseGetShareRetType, ok bool) {
return getUpdateShareResponseGetShareAttributeTypeOk(o.Share)
}
// HasShare returns a boolean if a field has been set.
func (o *UpdateShareResponse) HasShare() bool {
_, ok := o.GetShareOk()
return ok
}
// SetShare gets a reference to the given UpdateShareResponseShare and assigns it to the Share field.
func (o *UpdateShareResponse) SetShare(v UpdateShareResponseGetShareRetType) {
setUpdateShareResponseGetShareAttributeType(&o.Share, v)
}
func (o UpdateShareResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateShareResponseGetShareAttributeTypeOk(o.Share); ok {
toSerialize["Share"] = val
}
return toSerialize, nil
}
type NullableUpdateShareResponse struct {
value *UpdateShareResponse
isSet bool
}
func (v NullableUpdateShareResponse) Get() *UpdateShareResponse {
return v.value
}
func (v *NullableUpdateShareResponse) Set(val *UpdateShareResponse) {
v.value = val
v.isSet = true
}
func (v NullableUpdateShareResponse) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateShareResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateShareResponse(val *UpdateShareResponse) *NullableUpdateShareResponse {
return &NullableUpdateShareResponse{value: val, isSet: true}
}
func (v NullableUpdateShareResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateShareResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,479 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta
import (
"encoding/json"
"time"
)
// checks if the UpdateShareResponseShare type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateShareResponseShare{}
/*
types and functions for createdAt
*/
// isDateTime
type UpdateShareResponseShareGetCreatedAtAttributeType = *time.Time
type UpdateShareResponseShareGetCreatedAtArgType = time.Time
type UpdateShareResponseShareGetCreatedAtRetType = time.Time
func getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(arg UpdateShareResponseShareGetCreatedAtAttributeType) (ret UpdateShareResponseShareGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetCreatedAtAttributeType(arg *UpdateShareResponseShareGetCreatedAtAttributeType, val UpdateShareResponseShareGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for exportPolicy
*/
// isModel
type UpdateShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy
type UpdateShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy
type UpdateShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy
func getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(arg UpdateShareResponseShareGetExportPolicyAttributeType) (ret UpdateShareResponseShareGetExportPolicyRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg, true
}
func setUpdateShareResponseShareGetExportPolicyAttributeType(arg *UpdateShareResponseShareGetExportPolicyAttributeType, val UpdateShareResponseShareGetExportPolicyRetType) {
*arg = val
}
/*
types and functions for id
*/
// isNotNullableString
type UpdateShareResponseShareGetIdAttributeType = *string
func getUpdateShareResponseShareGetIdAttributeTypeOk(arg UpdateShareResponseShareGetIdAttributeType) (ret UpdateShareResponseShareGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetIdAttributeType(arg *UpdateShareResponseShareGetIdAttributeType, val UpdateShareResponseShareGetIdRetType) {
*arg = &val
}
type UpdateShareResponseShareGetIdArgType = string
type UpdateShareResponseShareGetIdRetType = string
/*
types and functions for labels
*/
// isContainer
type UpdateShareResponseShareGetLabelsAttributeType = *map[string]string
type UpdateShareResponseShareGetLabelsArgType = map[string]string
type UpdateShareResponseShareGetLabelsRetType = map[string]string
func getUpdateShareResponseShareGetLabelsAttributeTypeOk(arg UpdateShareResponseShareGetLabelsAttributeType) (ret UpdateShareResponseShareGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetLabelsAttributeType(arg *UpdateShareResponseShareGetLabelsAttributeType, val UpdateShareResponseShareGetLabelsRetType) {
*arg = &val
}
/*
types and functions for mountPath
*/
// isNotNullableString
type UpdateShareResponseShareGetMountPathAttributeType = *string
func getUpdateShareResponseShareGetMountPathAttributeTypeOk(arg UpdateShareResponseShareGetMountPathAttributeType) (ret UpdateShareResponseShareGetMountPathRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetMountPathAttributeType(arg *UpdateShareResponseShareGetMountPathAttributeType, val UpdateShareResponseShareGetMountPathRetType) {
*arg = &val
}
type UpdateShareResponseShareGetMountPathArgType = string
type UpdateShareResponseShareGetMountPathRetType = string
/*
types and functions for name
*/
// isNotNullableString
type UpdateShareResponseShareGetNameAttributeType = *string
func getUpdateShareResponseShareGetNameAttributeTypeOk(arg UpdateShareResponseShareGetNameAttributeType) (ret UpdateShareResponseShareGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetNameAttributeType(arg *UpdateShareResponseShareGetNameAttributeType, val UpdateShareResponseShareGetNameRetType) {
*arg = &val
}
type UpdateShareResponseShareGetNameArgType = string
type UpdateShareResponseShareGetNameRetType = string
/*
types and functions for spaceHardLimitGigabytes
*/
// isInteger
type UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64
type UpdateShareResponseShareGetSpaceHardLimitGigabytesArgType = int64
type UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType = int64
func getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
*arg = &val
}
/*
types and functions for state
*/
// isNotNullableString
type UpdateShareResponseShareGetStateAttributeType = *string
func getUpdateShareResponseShareGetStateAttributeTypeOk(arg UpdateShareResponseShareGetStateAttributeType) (ret UpdateShareResponseShareGetStateRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateShareResponseShareGetStateAttributeType(arg *UpdateShareResponseShareGetStateAttributeType, val UpdateShareResponseShareGetStateRetType) {
*arg = &val
}
type UpdateShareResponseShareGetStateArgType = string
type UpdateShareResponseShareGetStateRetType = string
// UpdateShareResponseShare Updated Share
type UpdateShareResponseShare struct {
CreatedAt UpdateShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"`
ExportPolicy UpdateShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"`
// ID of the Share
Id UpdateShareResponseShareGetIdAttributeType `json:"id,omitempty"`
// An optional object that represents the labels associated with the share keys are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$'
Labels UpdateShareResponseShareGetLabelsAttributeType `json:"labels,omitempty"`
// Mount path of the Share, used to mount the Share
MountPath UpdateShareResponseShareGetMountPathAttributeType `json:"mountPath,omitempty"`
// Name of the Share
Name UpdateShareResponseShareGetNameAttributeType `json:"name,omitempty"`
// Space hard limit for the Share. If zero, the Share will have access to the full space of the Resource Pool it lives in. (unit: gibibytes)
// Can be cast to int32 without loss of precision.
SpaceHardLimitGigabytes UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes,omitempty"`
// State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"])
State UpdateShareResponseShareGetStateAttributeType `json:"state,omitempty"`
}
// NewUpdateShareResponseShare instantiates a new UpdateShareResponseShare 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 NewUpdateShareResponseShare() *UpdateShareResponseShare {
this := UpdateShareResponseShare{}
return &this
}
// NewUpdateShareResponseShareWithDefaults instantiates a new UpdateShareResponseShare 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 NewUpdateShareResponseShareWithDefaults() *UpdateShareResponseShare {
this := UpdateShareResponseShare{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetCreatedAt() (res UpdateShareResponseShareGetCreatedAtRetType) {
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 *UpdateShareResponseShare) GetCreatedAtOk() (ret UpdateShareResponseShareGetCreatedAtRetType, ok bool) {
return getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) 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 *UpdateShareResponseShare) SetCreatedAt(v UpdateShareResponseShareGetCreatedAtRetType) {
setUpdateShareResponseShareGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetExportPolicy returns the ExportPolicy field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateShareResponseShare) GetExportPolicy() (res UpdateShareResponseShareGetExportPolicyRetType) {
res, _ = o.GetExportPolicyOk()
return
}
// GetExportPolicyOk returns a tuple with the ExportPolicy 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 *UpdateShareResponseShare) GetExportPolicyOk() (ret UpdateShareResponseShareGetExportPolicyRetType, ok bool) {
return getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy)
}
// HasExportPolicy returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasExportPolicy() bool {
_, ok := o.GetExportPolicyOk()
return ok
}
// SetExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ExportPolicy field.
func (o *UpdateShareResponseShare) SetExportPolicy(v UpdateShareResponseShareGetExportPolicyRetType) {
setUpdateShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v)
}
// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil
func (o *UpdateShareResponseShare) SetExportPolicyNil() {
o.ExportPolicy = nil
}
// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil
func (o *UpdateShareResponseShare) UnsetExportPolicy() {
o.ExportPolicy = nil
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetId() (res UpdateShareResponseShareGetIdRetType) {
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 *UpdateShareResponseShare) GetIdOk() (ret UpdateShareResponseShareGetIdRetType, ok bool) {
return getUpdateShareResponseShareGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *UpdateShareResponseShare) SetId(v UpdateShareResponseShareGetIdRetType) {
setUpdateShareResponseShareGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetLabels() (res UpdateShareResponseShareGetLabelsRetType) {
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 *UpdateShareResponseShare) GetLabelsOk() (ret UpdateShareResponseShareGetLabelsRetType, ok bool) {
return getUpdateShareResponseShareGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *UpdateShareResponseShare) SetLabels(v UpdateShareResponseShareGetLabelsRetType) {
setUpdateShareResponseShareGetLabelsAttributeType(&o.Labels, v)
}
// GetMountPath returns the MountPath field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetMountPath() (res UpdateShareResponseShareGetMountPathRetType) {
res, _ = o.GetMountPathOk()
return
}
// GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponseShare) GetMountPathOk() (ret UpdateShareResponseShareGetMountPathRetType, ok bool) {
return getUpdateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath)
}
// HasMountPath returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasMountPath() bool {
_, ok := o.GetMountPathOk()
return ok
}
// SetMountPath gets a reference to the given string and assigns it to the MountPath field.
func (o *UpdateShareResponseShare) SetMountPath(v UpdateShareResponseShareGetMountPathRetType) {
setUpdateShareResponseShareGetMountPathAttributeType(&o.MountPath, v)
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetName() (res UpdateShareResponseShareGetNameRetType) {
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 *UpdateShareResponseShare) GetNameOk() (ret UpdateShareResponseShareGetNameRetType, ok bool) {
return getUpdateShareResponseShareGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateShareResponseShare) SetName(v UpdateShareResponseShareGetNameRetType) {
setUpdateShareResponseShareGetNameAttributeType(&o.Name, v)
}
// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytes() (res UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
res, _ = o.GetSpaceHardLimitGigabytesOk()
return
}
// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) {
return getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes)
}
// HasSpaceHardLimitGigabytes returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasSpaceHardLimitGigabytes() bool {
_, ok := o.GetSpaceHardLimitGigabytesOk()
return ok
}
// SetSpaceHardLimitGigabytes gets a reference to the given int64 and assigns it to the SpaceHardLimitGigabytes field.
func (o *UpdateShareResponseShare) SetSpaceHardLimitGigabytes(v UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) {
setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v)
}
// GetState returns the State field value if set, zero value otherwise.
func (o *UpdateShareResponseShare) GetState() (res UpdateShareResponseShareGetStateRetType) {
res, _ = o.GetStateOk()
return
}
// GetStateOk returns a tuple with the State field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateShareResponseShare) GetStateOk() (ret UpdateShareResponseShareGetStateRetType, ok bool) {
return getUpdateShareResponseShareGetStateAttributeTypeOk(o.State)
}
// HasState returns a boolean if a field has been set.
func (o *UpdateShareResponseShare) HasState() bool {
_, ok := o.GetStateOk()
return ok
}
// SetState gets a reference to the given string and assigns it to the State field.
func (o *UpdateShareResponseShare) SetState(v UpdateShareResponseShareGetStateRetType) {
setUpdateShareResponseShareGetStateAttributeType(&o.State, v)
}
func (o UpdateShareResponseShare) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy); ok {
toSerialize["ExportPolicy"] = val
}
if val, ok := getUpdateShareResponseShareGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getUpdateShareResponseShareGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getUpdateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath); ok {
toSerialize["MountPath"] = val
}
if val, ok := getUpdateShareResponseShareGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes); ok {
toSerialize["SpaceHardLimitGigabytes"] = val
}
if val, ok := getUpdateShareResponseShareGetStateAttributeTypeOk(o.State); ok {
toSerialize["State"] = val
}
return toSerialize, nil
}
type NullableUpdateShareResponseShare struct {
value *UpdateShareResponseShare
isSet bool
}
func (v NullableUpdateShareResponseShare) Get() *UpdateShareResponseShare {
return v.value
}
func (v *NullableUpdateShareResponseShare) Set(val *UpdateShareResponseShare) {
v.value = val
v.isSet = true
}
func (v NullableUpdateShareResponseShare) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateShareResponseShare) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateShareResponseShare(val *UpdateShareResponseShare) *NullableUpdateShareResponseShare {
return &NullableUpdateShareResponseShare{value: val, isSet: true}
}
func (v NullableUpdateShareResponseShare) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateShareResponseShare) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}

View file

@ -0,0 +1,11 @@
/*
STACKIT File Storage (SFS)
API used to create and manage NFS Shares.
API version: 1beta.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sfsbeta

Some files were not shown because too many files have changed in this diff Show more