diff --git a/services/sfs/api_default.go b/services/sfs/api_default.go index d4c7e6c13..60f0459e6 100644 --- a/services/sfs/api_default.go +++ b/services/sfs/api_default.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,6 +24,7 @@ import ( "github.com/stackitcloud/stackit-sdk-go/core/oapierror" ) +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApi interface { /* CreateResourcePool Create Resource Pool @@ -32,6 +34,8 @@ type DefaultApi interface { @param projectId @param region @return ApiCreateResourcePoolRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest /* @@ -42,6 +46,7 @@ type DefaultApi interface { @param region @return CreateResourcePoolResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateResourcePoolExecute(ctx context.Context, projectId string, region string) (*CreateResourcePoolResponse, error) /* @@ -53,6 +58,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiCreateResourcePoolSnapshotRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest /* @@ -64,6 +71,7 @@ type DefaultApi interface { @param resourcePoolId @return CreateResourcePoolSnapshotResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateResourcePoolSnapshotExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*CreateResourcePoolSnapshotResponse, error) /* @@ -75,6 +83,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiCreateShareRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest /* @@ -86,6 +96,7 @@ type DefaultApi interface { @param resourcePoolId @return CreateShareResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*CreateShareResponse, error) /* @@ -96,6 +107,8 @@ type DefaultApi interface { @param projectId @param region @return ApiCreateShareExportPolicyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest /* @@ -106,6 +119,7 @@ type DefaultApi interface { @param region @return CreateShareExportPolicyResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateShareExportPolicyExecute(ctx context.Context, projectId string, region string) (*CreateShareExportPolicyResponse, error) /* @@ -117,6 +131,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiDeleteResourcePoolRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest /* @@ -128,6 +144,7 @@ type DefaultApi interface { @param resourcePoolId @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteResourcePoolExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (map[string]interface{}, error) /* @@ -140,6 +157,8 @@ type DefaultApi interface { @param resourcePoolId @param snapshotName @return ApiDeleteResourcePoolSnapshotRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest /* @@ -152,6 +171,7 @@ type DefaultApi interface { @param snapshotName @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteResourcePoolSnapshotExecute(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) (map[string]interface{}, error) /* @@ -164,6 +184,8 @@ type DefaultApi interface { @param resourcePoolId @param shareId @return ApiDeleteShareRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest /* @@ -176,6 +198,7 @@ type DefaultApi interface { @param shareId @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) (map[string]interface{}, error) /* @@ -187,6 +210,8 @@ type DefaultApi interface { @param region @param policyId @return ApiDeleteShareExportPolicyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest /* @@ -198,6 +223,7 @@ type DefaultApi interface { @param policyId @return map[string]interface{} + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteShareExportPolicyExecute(ctx context.Context, projectId string, region string, policyId string) (map[string]interface{}, error) /* @@ -209,6 +235,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiGetResourcePoolRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest /* @@ -220,6 +248,7 @@ type DefaultApi interface { @param resourcePoolId @return GetResourcePoolResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetResourcePoolExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*GetResourcePoolResponse, error) /* @@ -232,6 +261,8 @@ type DefaultApi interface { @param resourcePoolId @param snapshotName @return ApiGetResourcePoolSnapshotRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest /* @@ -244,6 +275,7 @@ type DefaultApi interface { @param snapshotName @return GetResourcePoolSnapshotResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetResourcePoolSnapshotExecute(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) (*GetResourcePoolSnapshotResponse, error) /* @@ -256,6 +288,8 @@ type DefaultApi interface { @param resourcePoolId @param shareId @return ApiGetShareRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest /* @@ -268,6 +302,7 @@ type DefaultApi interface { @param shareId @return GetShareResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) (*GetShareResponse, error) /* @@ -279,6 +314,8 @@ type DefaultApi interface { @param region @param policyId @return ApiGetShareExportPolicyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest /* @@ -290,6 +327,7 @@ type DefaultApi interface { @param policyId @return GetShareExportPolicyResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetShareExportPolicyExecute(ctx context.Context, projectId string, region string, policyId string) (*GetShareExportPolicyResponse, error) /* @@ -298,6 +336,8 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListPerformanceClassesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest /* @@ -306,6 +346,7 @@ type DefaultApi interface { @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ListPerformanceClassesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListPerformanceClassesExecute(ctx context.Context) (*ListPerformanceClassesResponse, error) /* @@ -317,6 +358,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiListResourcePoolSnapshotsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest /* @@ -328,6 +371,7 @@ type DefaultApi interface { @param resourcePoolId @return ListResourcePoolSnapshotsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListResourcePoolSnapshotsExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*ListResourcePoolSnapshotsResponse, error) /* @@ -338,6 +382,8 @@ type DefaultApi interface { @param projectId @param region @return ApiListResourcePoolsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest /* @@ -348,6 +394,7 @@ type DefaultApi interface { @param region @return ListResourcePoolsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListResourcePoolsExecute(ctx context.Context, projectId string, region string) (*ListResourcePoolsResponse, error) /* @@ -358,6 +405,8 @@ type DefaultApi interface { @param projectId @param region @return ApiListShareExportPoliciesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest /* @@ -368,6 +417,7 @@ type DefaultApi interface { @param region @return ListShareExportPoliciesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListShareExportPoliciesExecute(ctx context.Context, projectId string, region string) (*ListShareExportPoliciesResponse, error) /* @@ -379,6 +429,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiListSharesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest /* @@ -390,6 +442,7 @@ type DefaultApi interface { @param resourcePoolId @return ListSharesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListSharesExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*ListSharesResponse, error) /* @@ -401,6 +454,8 @@ type DefaultApi interface { @param region @param resourcePoolId @return ApiUpdateResourcePoolRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest /* @@ -412,6 +467,7 @@ type DefaultApi interface { @param resourcePoolId @return UpdateResourcePoolResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateResourcePoolExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*UpdateResourcePoolResponse, error) /* @@ -424,6 +480,8 @@ type DefaultApi interface { @param resourcePoolId @param shareId @return ApiUpdateShareRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest /* @@ -436,6 +494,7 @@ type DefaultApi interface { @param shareId @return UpdateShareResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) (*UpdateShareResponse, error) /* @@ -447,6 +506,8 @@ type DefaultApi interface { @param region @param policyId @return ApiUpdateShareExportPolicyRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest /* @@ -458,100 +519,150 @@ type DefaultApi interface { @param policyId @return UpdateShareExportPolicyResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateShareExportPolicyExecute(ctx context.Context, projectId string, region string, policyId string) (*UpdateShareExportPolicyResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateResourcePoolRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateResourcePoolPayload(createResourcePoolPayload CreateResourcePoolPayload) ApiCreateResourcePoolRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateResourcePoolResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateResourcePoolSnapshotRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateResourcePoolSnapshotPayload(createResourcePoolSnapshotPayload CreateResourcePoolSnapshotPayload) ApiCreateResourcePoolSnapshotRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateResourcePoolSnapshotResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateShareRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateSharePayload(createSharePayload CreateSharePayload) ApiCreateShareRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateShareResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateShareExportPolicyRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateShareExportPolicyPayload(createShareExportPolicyPayload CreateShareExportPolicyPayload) ApiCreateShareExportPolicyRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateShareExportPolicyResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteResourcePoolRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteResourcePoolSnapshotRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteShareRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteShareExportPolicyRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetResourcePoolRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetResourcePoolResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetResourcePoolSnapshotRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetResourcePoolSnapshotResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetShareRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetShareResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetShareExportPolicyRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetShareExportPolicyResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListPerformanceClassesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListPerformanceClassesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListResourcePoolSnapshotsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListResourcePoolSnapshotsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListResourcePoolsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListResourcePoolsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListShareExportPoliciesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListShareExportPoliciesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListSharesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListSharesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateResourcePoolRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateResourcePoolPayload(updateResourcePoolPayload UpdateResourcePoolPayload) ApiUpdateResourcePoolRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*UpdateResourcePoolResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateShareRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateSharePayload(updateSharePayload UpdateSharePayload) ApiUpdateShareRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*UpdateShareResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateShareExportPolicyRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateShareExportPolicyPayload(updateShareExportPolicyPayload UpdateShareExportPolicyPayload) ApiUpdateShareExportPolicyRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*UpdateShareExportPolicyResponse, error) } // DefaultApiService DefaultApi service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DefaultApiService service +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolRequest struct { ctx context.Context apiService *DefaultApiService @@ -560,11 +671,13 @@ type CreateResourcePoolRequest struct { createResourcePoolPayload *CreateResourcePoolPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateResourcePoolRequest) CreateResourcePoolPayload(createResourcePoolPayload CreateResourcePoolPayload) ApiCreateResourcePoolRequest { r.createResourcePoolPayload = &createResourcePoolPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateResourcePoolRequest) Execute() (*CreateResourcePoolResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -695,7 +808,7 @@ func (r CreateResourcePoolRequest) Execute() (*CreateResourcePoolResponse, error /* CreateResourcePool: Create Resource Pool -Create a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -711,6 +824,7 @@ func (a *APIClient) CreateResourcePool(ctx context.Context, projectId string, re } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateResourcePoolExecute(ctx context.Context, projectId string, region string) (*CreateResourcePoolResponse, error) { r := CreateResourcePoolRequest{ apiService: a.defaultApi, @@ -721,6 +835,7 @@ func (a *APIClient) CreateResourcePoolExecute(ctx context.Context, projectId str return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotRequest struct { ctx context.Context apiService *DefaultApiService @@ -730,11 +845,13 @@ type CreateResourcePoolSnapshotRequest struct { createResourcePoolSnapshotPayload *CreateResourcePoolSnapshotPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateResourcePoolSnapshotRequest) CreateResourcePoolSnapshotPayload(createResourcePoolSnapshotPayload CreateResourcePoolSnapshotPayload) ApiCreateResourcePoolSnapshotRequest { r.createResourcePoolSnapshotPayload = &createResourcePoolSnapshotPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateResourcePoolSnapshotRequest) Execute() (*CreateResourcePoolSnapshotResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -866,7 +983,7 @@ func (r CreateResourcePoolSnapshotRequest) Execute() (*CreateResourcePoolSnapsho /* CreateResourcePoolSnapshot: Create Resource Pool Snapshot -Creates a Snapshot of a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -884,6 +1001,7 @@ func (a *APIClient) CreateResourcePoolSnapshot(ctx context.Context, projectId st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateResourcePoolSnapshotExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*CreateResourcePoolSnapshotResponse, error) { r := CreateResourcePoolSnapshotRequest{ apiService: a.defaultApi, @@ -895,6 +1013,7 @@ func (a *APIClient) CreateResourcePoolSnapshotExecute(ctx context.Context, proje return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareRequest struct { ctx context.Context apiService *DefaultApiService @@ -904,11 +1023,13 @@ type CreateShareRequest struct { createSharePayload *CreateSharePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShareRequest) CreateSharePayload(createSharePayload CreateSharePayload) ApiCreateShareRequest { r.createSharePayload = &createSharePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShareRequest) Execute() (*CreateShareResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1040,7 +1161,7 @@ func (r CreateShareRequest) Execute() (*CreateShareResponse, error) { /* CreateShare: Create Share -Creates a Share in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -1058,6 +1179,7 @@ func (a *APIClient) CreateShare(ctx context.Context, projectId string, region st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*CreateShareResponse, error) { r := CreateShareRequest{ apiService: a.defaultApi, @@ -1069,6 +1191,7 @@ func (a *APIClient) CreateShareExecute(ctx context.Context, projectId string, re return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequest struct { ctx context.Context apiService *DefaultApiService @@ -1077,11 +1200,13 @@ type CreateShareExportPolicyRequest struct { createShareExportPolicyPayload *CreateShareExportPolicyPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShareExportPolicyRequest) CreateShareExportPolicyPayload(createShareExportPolicyPayload CreateShareExportPolicyPayload) ApiCreateShareExportPolicyRequest { r.createShareExportPolicyPayload = &createShareExportPolicyPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateShareExportPolicyRequest) Execute() (*CreateShareExportPolicyResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1212,7 +1337,7 @@ func (r CreateShareExportPolicyRequest) Execute() (*CreateShareExportPolicyRespo /* CreateShareExportPolicy: Create Share Export Policy -Creates a ShareExportPolicy in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -1228,6 +1353,7 @@ func (a *APIClient) CreateShareExportPolicy(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateShareExportPolicyExecute(ctx context.Context, projectId string, region string) (*CreateShareExportPolicyResponse, error) { r := CreateShareExportPolicyRequest{ apiService: a.defaultApi, @@ -1238,6 +1364,7 @@ func (a *APIClient) CreateShareExportPolicyExecute(ctx context.Context, projectI return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteResourcePoolRequest struct { ctx context.Context apiService *DefaultApiService @@ -1246,6 +1373,7 @@ type DeleteResourcePoolRequest struct { resourcePoolId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteResourcePoolRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -1372,7 +1500,7 @@ func (r DeleteResourcePoolRequest) Execute() (map[string]interface{}, error) { /* DeleteResourcePool: Delete Resource Pool -Deletes a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -1390,6 +1518,7 @@ func (a *APIClient) DeleteResourcePool(ctx context.Context, projectId string, re } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteResourcePoolExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (map[string]interface{}, error) { r := DeleteResourcePoolRequest{ apiService: a.defaultApi, @@ -1401,6 +1530,7 @@ func (a *APIClient) DeleteResourcePoolExecute(ctx context.Context, projectId str return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteResourcePoolSnapshotRequest struct { ctx context.Context apiService *DefaultApiService @@ -1410,6 +1540,7 @@ type DeleteResourcePoolSnapshotRequest struct { snapshotName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteResourcePoolSnapshotRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -1537,7 +1668,7 @@ func (r DeleteResourcePoolSnapshotRequest) Execute() (map[string]interface{}, er /* DeleteResourcePoolSnapshot: Delete Resource Pool Snapshot -Deletes a Snapshot from a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -1557,6 +1688,7 @@ func (a *APIClient) DeleteResourcePoolSnapshot(ctx context.Context, projectId st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteResourcePoolSnapshotExecute(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) (map[string]interface{}, error) { r := DeleteResourcePoolSnapshotRequest{ apiService: a.defaultApi, @@ -1569,6 +1701,7 @@ func (a *APIClient) DeleteResourcePoolSnapshotExecute(ctx context.Context, proje return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteShareRequest struct { ctx context.Context apiService *DefaultApiService @@ -1578,6 +1711,7 @@ type DeleteShareRequest struct { shareId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteShareRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -1705,7 +1839,7 @@ func (r DeleteShareRequest) Execute() (map[string]interface{}, error) { /* DeleteShare: Delete Share -Deletes a Shares in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -1725,6 +1859,7 @@ func (a *APIClient) DeleteShare(ctx context.Context, projectId string, region st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) (map[string]interface{}, error) { r := DeleteShareRequest{ apiService: a.defaultApi, @@ -1737,6 +1872,7 @@ func (a *APIClient) DeleteShareExecute(ctx context.Context, projectId string, re return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteShareExportPolicyRequest struct { ctx context.Context apiService *DefaultApiService @@ -1745,6 +1881,7 @@ type DeleteShareExportPolicyRequest struct { policyId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteShareExportPolicyRequest) Execute() (map[string]interface{}, error) { var ( localVarHTTPMethod = http.MethodDelete @@ -1871,7 +2008,7 @@ func (r DeleteShareExportPolicyRequest) Execute() (map[string]interface{}, error /* DeleteShareExportPolicy: Delete Share Export Policy -Deletes a ShareExportPolicies in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -1889,6 +2026,7 @@ func (a *APIClient) DeleteShareExportPolicy(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteShareExportPolicyExecute(ctx context.Context, projectId string, region string, policyId string) (map[string]interface{}, error) { r := DeleteShareExportPolicyRequest{ apiService: a.defaultApi, @@ -1900,6 +2038,7 @@ func (a *APIClient) DeleteShareExportPolicyExecute(ctx context.Context, projectI return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolRequest struct { ctx context.Context apiService *DefaultApiService @@ -1908,6 +2047,7 @@ type GetResourcePoolRequest struct { resourcePoolId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetResourcePoolRequest) Execute() (*GetResourcePoolResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2034,7 +2174,7 @@ func (r GetResourcePoolRequest) Execute() (*GetResourcePoolResponse, error) { /* GetResourcePool: Get Resource Pool -Retrieves a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -2052,6 +2192,7 @@ func (a *APIClient) GetResourcePool(ctx context.Context, projectId string, regio } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetResourcePoolExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*GetResourcePoolResponse, error) { r := GetResourcePoolRequest{ apiService: a.defaultApi, @@ -2063,6 +2204,7 @@ func (a *APIClient) GetResourcePoolExecute(ctx context.Context, projectId string return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotRequest struct { ctx context.Context apiService *DefaultApiService @@ -2072,6 +2214,7 @@ type GetResourcePoolSnapshotRequest struct { snapshotName string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetResourcePoolSnapshotRequest) Execute() (*GetResourcePoolSnapshotResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2199,7 +2342,7 @@ func (r GetResourcePoolSnapshotRequest) Execute() (*GetResourcePoolSnapshotRespo /* GetResourcePoolSnapshot: Get Resource Pool Snapshot -Retrieves a Snapshot from a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -2219,6 +2362,7 @@ func (a *APIClient) GetResourcePoolSnapshot(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetResourcePoolSnapshotExecute(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) (*GetResourcePoolSnapshotResponse, error) { r := GetResourcePoolSnapshotRequest{ apiService: a.defaultApi, @@ -2231,6 +2375,7 @@ func (a *APIClient) GetResourcePoolSnapshotExecute(ctx context.Context, projectI return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareRequest struct { ctx context.Context apiService *DefaultApiService @@ -2240,6 +2385,7 @@ type GetShareRequest struct { shareId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetShareRequest) Execute() (*GetShareResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2367,7 +2513,7 @@ func (r GetShareRequest) Execute() (*GetShareResponse, error) { /* GetShare: Get Share -Retrieves a Shares in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -2387,6 +2533,7 @@ func (a *APIClient) GetShare(ctx context.Context, projectId string, region strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) (*GetShareResponse, error) { r := GetShareRequest{ apiService: a.defaultApi, @@ -2399,6 +2546,7 @@ func (a *APIClient) GetShareExecute(ctx context.Context, projectId string, regio return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyRequest struct { ctx context.Context apiService *DefaultApiService @@ -2407,6 +2555,7 @@ type GetShareExportPolicyRequest struct { policyId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetShareExportPolicyRequest) Execute() (*GetShareExportPolicyResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2533,7 +2682,7 @@ func (r GetShareExportPolicyRequest) Execute() (*GetShareExportPolicyResponse, e /* GetShareExportPolicy: Get Share Export Policy -Retrieves a ShareExportPolicies in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -2551,6 +2700,7 @@ func (a *APIClient) GetShareExportPolicy(ctx context.Context, projectId string, } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetShareExportPolicyExecute(ctx context.Context, projectId string, region string, policyId string) (*GetShareExportPolicyResponse, error) { r := GetShareExportPolicyRequest{ apiService: a.defaultApi, @@ -2562,11 +2712,13 @@ func (a *APIClient) GetShareExportPolicyExecute(ctx context.Context, projectId s return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListPerformanceClassesRequest struct { ctx context.Context apiService *DefaultApiService } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListPerformanceClassesRequest) Execute() (*ListPerformanceClassesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2690,7 +2842,7 @@ func (r ListPerformanceClassesRequest) Execute() (*ListPerformanceClassesRespons /* ListPerformanceClasses: List Resource Pool Performance Classes -Lists all performances classes available +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListPerformanceClassesRequest @@ -2702,6 +2854,7 @@ func (a *APIClient) ListPerformanceClasses(ctx context.Context) ApiListPerforman } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListPerformanceClassesExecute(ctx context.Context) (*ListPerformanceClassesResponse, error) { r := ListPerformanceClassesRequest{ apiService: a.defaultApi, @@ -2710,6 +2863,7 @@ func (a *APIClient) ListPerformanceClassesExecute(ctx context.Context) (*ListPer return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolSnapshotsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2718,6 +2872,7 @@ type ListResourcePoolSnapshotsRequest struct { resourcePoolId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListResourcePoolSnapshotsRequest) Execute() (*ListResourcePoolSnapshotsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2844,7 +2999,7 @@ func (r ListResourcePoolSnapshotsRequest) Execute() (*ListResourcePoolSnapshotsR /* ListResourcePoolSnapshots: List Resource Pool Snapshots -Lists the Snapshots of a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -2862,6 +3017,7 @@ func (a *APIClient) ListResourcePoolSnapshots(ctx context.Context, projectId str } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListResourcePoolSnapshotsExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*ListResourcePoolSnapshotsResponse, error) { r := ListResourcePoolSnapshotsRequest{ apiService: a.defaultApi, @@ -2873,6 +3029,7 @@ func (a *APIClient) ListResourcePoolSnapshotsExecute(ctx context.Context, projec return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2880,6 +3037,7 @@ type ListResourcePoolsRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListResourcePoolsRequest) Execute() (*ListResourcePoolsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3005,7 +3163,7 @@ func (r ListResourcePoolsRequest) Execute() (*ListResourcePoolsResponse, error) /* ListResourcePools: List Resource Pools -Lists Resource Pools in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -3021,6 +3179,7 @@ func (a *APIClient) ListResourcePools(ctx context.Context, projectId string, reg } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListResourcePoolsExecute(ctx context.Context, projectId string, region string) (*ListResourcePoolsResponse, error) { r := ListResourcePoolsRequest{ apiService: a.defaultApi, @@ -3031,6 +3190,7 @@ func (a *APIClient) ListResourcePoolsExecute(ctx context.Context, projectId stri return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListShareExportPoliciesRequest struct { ctx context.Context apiService *DefaultApiService @@ -3038,6 +3198,7 @@ type ListShareExportPoliciesRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListShareExportPoliciesRequest) Execute() (*ListShareExportPoliciesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3163,7 +3324,7 @@ func (r ListShareExportPoliciesRequest) Execute() (*ListShareExportPoliciesRespo /* ListShareExportPolicies: List Share Export Policies -Lists ShareExportPolicies in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -3179,6 +3340,7 @@ func (a *APIClient) ListShareExportPolicies(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListShareExportPoliciesExecute(ctx context.Context, projectId string, region string) (*ListShareExportPoliciesResponse, error) { r := ListShareExportPoliciesRequest{ apiService: a.defaultApi, @@ -3189,6 +3351,7 @@ func (a *APIClient) ListShareExportPoliciesExecute(ctx context.Context, projectI return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListSharesRequest struct { ctx context.Context apiService *DefaultApiService @@ -3197,6 +3360,7 @@ type ListSharesRequest struct { resourcePoolId string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListSharesRequest) Execute() (*ListSharesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3323,7 +3487,7 @@ func (r ListSharesRequest) Execute() (*ListSharesResponse, error) { /* ListShares: List Shares -Lists Shares in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -3341,6 +3505,7 @@ func (a *APIClient) ListShares(ctx context.Context, projectId string, region str } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListSharesExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*ListSharesResponse, error) { r := ListSharesRequest{ apiService: a.defaultApi, @@ -3352,6 +3517,7 @@ func (a *APIClient) ListSharesExecute(ctx context.Context, projectId string, reg return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolRequest struct { ctx context.Context apiService *DefaultApiService @@ -3361,11 +3527,13 @@ type UpdateResourcePoolRequest struct { updateResourcePoolPayload *UpdateResourcePoolPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateResourcePoolRequest) UpdateResourcePoolPayload(updateResourcePoolPayload UpdateResourcePoolPayload) ApiUpdateResourcePoolRequest { r.updateResourcePoolPayload = &updateResourcePoolPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateResourcePoolRequest) Execute() (*UpdateResourcePoolResponse, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -3497,7 +3665,7 @@ func (r UpdateResourcePoolRequest) Execute() (*UpdateResourcePoolResponse, error /* UpdateResourcePool: Update Resource Pool -Updates a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -3515,6 +3683,7 @@ func (a *APIClient) UpdateResourcePool(ctx context.Context, projectId string, re } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateResourcePoolExecute(ctx context.Context, projectId string, region string, resourcePoolId string) (*UpdateResourcePoolResponse, error) { r := UpdateResourcePoolRequest{ apiService: a.defaultApi, @@ -3526,6 +3695,7 @@ func (a *APIClient) UpdateResourcePoolExecute(ctx context.Context, projectId str return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareRequest struct { ctx context.Context apiService *DefaultApiService @@ -3536,11 +3706,13 @@ type UpdateShareRequest struct { updateSharePayload *UpdateSharePayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateShareRequest) UpdateSharePayload(updateSharePayload UpdateSharePayload) ApiUpdateShareRequest { r.updateSharePayload = &updateSharePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateShareRequest) Execute() (*UpdateShareResponse, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -3673,7 +3845,7 @@ func (r UpdateShareRequest) Execute() (*UpdateShareResponse, error) { /* UpdateShare: Update Share -Updates a Shares in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -3693,6 +3865,7 @@ func (a *APIClient) UpdateShare(ctx context.Context, projectId string, region st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateShareExecute(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) (*UpdateShareResponse, error) { r := UpdateShareRequest{ apiService: a.defaultApi, @@ -3705,6 +3878,7 @@ func (a *APIClient) UpdateShareExecute(ctx context.Context, projectId string, re return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyRequest struct { ctx context.Context apiService *DefaultApiService @@ -3714,11 +3888,13 @@ type UpdateShareExportPolicyRequest struct { updateShareExportPolicyPayload *UpdateShareExportPolicyPayload } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateShareExportPolicyRequest) UpdateShareExportPolicyPayload(updateShareExportPolicyPayload UpdateShareExportPolicyPayload) ApiUpdateShareExportPolicyRequest { r.updateShareExportPolicyPayload = &updateShareExportPolicyPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateShareExportPolicyRequest) Execute() (*UpdateShareExportPolicyResponse, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -3850,7 +4026,7 @@ func (r UpdateShareExportPolicyRequest) Execute() (*UpdateShareExportPolicyRespo /* UpdateShareExportPolicy: Update Share Export Policy -Updates a ShareExportPolicies in a Resource Pool in a project. +Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId @@ -3868,6 +4044,7 @@ func (a *APIClient) UpdateShareExportPolicy(ctx context.Context, projectId strin } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateShareExportPolicyExecute(ctx context.Context, projectId string, region string, policyId string) (*UpdateShareExportPolicyResponse, error) { r := UpdateShareExportPolicyRequest{ apiService: a.defaultApi, diff --git a/services/sfs/client.go b/services/sfs/client.go index 3e977cce2..2b1afcff7 100644 --- a/services/sfs/client.go +++ b/services/sfs/client.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -44,18 +45,21 @@ var ( // APIClient manages communication with the STACKIT File Storage (SFS) API v1.0.0 // In most cases there should be only one, shared, APIClient. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type APIClient struct { cfg *config.Configuration common service // Reuse a single struct instead of allocating one for each service on the heap. defaultApi *DefaultApiService } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type service struct { client DefaultApi } // NewAPIClient creates a new API client. // Optionally receives configuration options +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewAPIClient(opts ...config.ConfigurationOption) (*APIClient, error) { cfg := NewConfiguration() @@ -147,6 +151,7 @@ func typeCheckParameter(obj interface{}, expected string, name string) error { return nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func ParameterValueToString(obj interface{}, key string) string { if reflect.TypeOf(obj).Kind() != reflect.Ptr { return fmt.Sprintf("%v", obj) @@ -285,6 +290,7 @@ func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { // Allow modification of underlying config for alternate implementations and testing // Caution: modifying the configuration while live can cause data races and potentially unwanted behavior +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (c *APIClient) GetConfig() *config.Configuration { return c.cfg } @@ -595,6 +601,7 @@ func parseCacheControl(headers http.Header) cacheControl { } // CacheExpires helper function to determine remaining time before repeating a request. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func CacheExpires(r *http.Response) time.Time { // Figure out when the cache expires. var expires time.Time diff --git a/services/sfs/configuration.go b/services/sfs/configuration.go index aa30a5002..78f342e4f 100644 --- a/services/sfs/configuration.go +++ b/services/sfs/configuration.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -15,6 +16,7 @@ import ( ) // NewConfiguration returns a new Configuration object +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewConfiguration() *config.Configuration { cfg := &config.Configuration{ DefaultHeader: make(map[string]string), diff --git a/services/sfs/go.mod b/services/sfs/go.mod index c214284d7..0171aeb48 100644 --- a/services/sfs/go.mod +++ b/services/sfs/go.mod @@ -2,7 +2,7 @@ module github.com/stackitcloud/stackit-sdk-go/services/sfs go 1.21 -require github.com/stackitcloud/stackit-sdk-go/core v0.21.1 +require github.com/stackitcloud/stackit-sdk-go/core v0.22.0 require ( github.com/golang-jwt/jwt/v5 v5.3.1 // indirect diff --git a/services/sfs/go.sum b/services/sfs/go.sum index ca103c909..195011dd5 100644 --- a/services/sfs/go.sum +++ b/services/sfs/go.sum @@ -4,5 +4,5 @@ github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1 h1:Y/PcAgM7DPYMNqum0MLv4n1mF9ieuevzcCIZYQfm3Ts= -github.com/stackitcloud/stackit-sdk-go/core v0.21.1/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0 h1:6rViz7GnNwXSh51Lur5xuDzO8EWSZfN9J0HvEkBKq6c= +github.com/stackitcloud/stackit-sdk-go/core v0.22.0/go.mod h1:osMglDby4csGZ5sIfhNyYq1bS1TxIdPY88+skE/kkmI= diff --git a/services/sfs/model_create_resource_pool_payload.go b/services/sfs/model_create_resource_pool_payload.go index 24a729eac..f0249425b 100644 --- a/services/sfs/model_create_resource_pool_payload.go +++ b/services/sfs/model_create_resource_pool_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateResourcePoolPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetAvailabilityZoneAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(arg CreateResourcePoolPayloadGetAvailabilityZoneAttributeType) (ret CreateResourcePoolPayloadGetAvailabilityZoneRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(arg CreateRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadGetAvailabilityZoneAttributeType(arg *CreateResourcePoolPayloadGetAvailabilityZoneAttributeType, val CreateResourcePoolPayloadGetAvailabilityZoneRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetAvailabilityZoneArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetAvailabilityZoneRetType = string /* @@ -43,10 +50,16 @@ type CreateResourcePoolPayloadGetAvailabilityZoneRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadGetIpAclAttributeTypeOk(arg CreateResourcePoolPayloadGetIpAclAttributeType) (ret CreateResourcePoolPayloadGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getCreateResourcePoolPayloadGetIpAclAttributeTypeOk(arg CreateResourcePoolP return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadGetIpAclAttributeType(arg *CreateResourcePoolPayloadGetIpAclAttributeType, val CreateResourcePoolPayloadGetIpAclRetType) { *arg = &val } @@ -63,10 +77,16 @@ func setCreateResourcePoolPayloadGetIpAclAttributeType(arg *CreateResourcePoolPa */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadGetLabelsAttributeTypeOk(arg CreateResourcePoolPayloadGetLabelsAttributeType) (ret CreateResourcePoolPayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -74,6 +94,7 @@ func getCreateResourcePoolPayloadGetLabelsAttributeTypeOk(arg CreateResourcePool return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadGetLabelsAttributeType(arg *CreateResourcePoolPayloadGetLabelsAttributeType, val CreateResourcePoolPayloadGetLabelsRetType) { *arg = &val } @@ -83,8 +104,10 @@ func setCreateResourcePoolPayloadGetLabelsAttributeType(arg *CreateResourcePoolP */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadGetNameAttributeTypeOk(arg CreateResourcePoolPayloadGetNameAttributeType) (ret CreateResourcePoolPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -92,11 +115,15 @@ func getCreateResourcePoolPayloadGetNameAttributeTypeOk(arg CreateResourcePoolPa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadGetNameAttributeType(arg *CreateResourcePoolPayloadGetNameAttributeType, val CreateResourcePoolPayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetNameRetType = string /* @@ -104,8 +131,10 @@ type CreateResourcePoolPayloadGetNameRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetPerformanceClassAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg CreateResourcePoolPayloadGetPerformanceClassAttributeType) (ret CreateResourcePoolPayloadGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +142,15 @@ func getCreateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg CreateRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadGetPerformanceClassAttributeType(arg *CreateResourcePoolPayloadGetPerformanceClassAttributeType, val CreateResourcePoolPayloadGetPerformanceClassRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetPerformanceClassArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetPerformanceClassRetType = string /* @@ -125,10 +158,16 @@ type CreateResourcePoolPayloadGetPerformanceClassRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadGetSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg CreateResourcePoolPayloadGetSizeGigabytesAttributeType) (ret CreateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +175,7 @@ func getCreateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg CreateResou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *CreateResourcePoolPayloadGetSizeGigabytesAttributeType, val CreateResourcePoolPayloadGetSizeGigabytesRetType) { *arg = &val } @@ -145,10 +185,16 @@ func setCreateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *CreateResour */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadgetSnapshotsAreVisibleArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType) (ret CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) { if arg == nil { return ret, false @@ -156,11 +202,13 @@ func getCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg Creat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(arg *CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType, val CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { *arg = &val } // CreateResourcePoolPayload struct for CreateResourcePoolPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolPayload struct { // Availability zone // REQUIRED @@ -184,12 +232,14 @@ type CreateResourcePoolPayload struct { SnapshotsAreVisible CreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType `json:"snapshotsAreVisible,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateResourcePoolPayload CreateResourcePoolPayload // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolPayload(availabilityZone CreateResourcePoolPayloadGetAvailabilityZoneArgType, ipAcl CreateResourcePoolPayloadGetIpAclArgType, name CreateResourcePoolPayloadGetNameArgType, performanceClass CreateResourcePoolPayloadGetPerformanceClassArgType, sizeGigabytes CreateResourcePoolPayloadGetSizeGigabytesArgType) *CreateResourcePoolPayload { this := CreateResourcePoolPayload{} setCreateResourcePoolPayloadGetAvailabilityZoneAttributeType(&this.AvailabilityZone, availabilityZone) @@ -203,12 +253,14 @@ func NewCreateResourcePoolPayload(availabilityZone CreateResourcePoolPayloadGetA // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolPayloadWithDefaults() *CreateResourcePoolPayload { this := CreateResourcePoolPayload{} return &this } // GetAvailabilityZone returns the AvailabilityZone field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetAvailabilityZone() (ret CreateResourcePoolPayloadGetAvailabilityZoneRetType) { ret, _ = o.GetAvailabilityZoneOk() return ret @@ -216,16 +268,19 @@ func (o *CreateResourcePoolPayload) GetAvailabilityZone() (ret CreateResourcePoo // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetAvailabilityZoneOk() (ret CreateResourcePoolPayloadGetAvailabilityZoneRetType, ok bool) { return getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) } // SetAvailabilityZone sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetAvailabilityZone(v CreateResourcePoolPayloadGetAvailabilityZoneRetType) { setCreateResourcePoolPayloadGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) } // GetIpAcl returns the IpAcl field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetIpAcl() (ret CreateResourcePoolPayloadGetIpAclRetType) { ret, _ = o.GetIpAclOk() return ret @@ -233,16 +288,19 @@ func (o *CreateResourcePoolPayload) GetIpAcl() (ret CreateResourcePoolPayloadGet // GetIpAclOk returns a tuple with the IpAcl field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetIpAclOk() (ret CreateResourcePoolPayloadGetIpAclRetType, ok bool) { return getCreateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl) } // SetIpAcl sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetIpAcl(v CreateResourcePoolPayloadGetIpAclRetType) { setCreateResourcePoolPayloadGetIpAclAttributeType(&o.IpAcl, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetLabels() (res CreateResourcePoolPayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -250,22 +308,26 @@ func (o *CreateResourcePoolPayload) GetLabels() (res CreateResourcePoolPayloadGe // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetLabelsOk() (ret CreateResourcePoolPayloadGetLabelsRetType, ok bool) { return getCreateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetLabels(v CreateResourcePoolPayloadGetLabelsRetType) { setCreateResourcePoolPayloadGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetName() (ret CreateResourcePoolPayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -273,16 +335,19 @@ func (o *CreateResourcePoolPayload) GetName() (ret CreateResourcePoolPayloadGetN // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetNameOk() (ret CreateResourcePoolPayloadGetNameRetType, ok bool) { return getCreateResourcePoolPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetName(v CreateResourcePoolPayloadGetNameRetType) { setCreateResourcePoolPayloadGetNameAttributeType(&o.Name, v) } // GetPerformanceClass returns the PerformanceClass field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetPerformanceClass() (ret CreateResourcePoolPayloadGetPerformanceClassRetType) { ret, _ = o.GetPerformanceClassOk() return ret @@ -290,16 +355,19 @@ func (o *CreateResourcePoolPayload) GetPerformanceClass() (ret CreateResourcePoo // GetPerformanceClassOk returns a tuple with the PerformanceClass field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetPerformanceClassOk() (ret CreateResourcePoolPayloadGetPerformanceClassRetType, ok bool) { return getCreateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // SetPerformanceClass sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetPerformanceClass(v CreateResourcePoolPayloadGetPerformanceClassRetType) { setCreateResourcePoolPayloadGetPerformanceClassAttributeType(&o.PerformanceClass, v) } // GetSizeGigabytes returns the SizeGigabytes field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetSizeGigabytes() (ret CreateResourcePoolPayloadGetSizeGigabytesRetType) { ret, _ = o.GetSizeGigabytesOk() return ret @@ -307,16 +375,19 @@ func (o *CreateResourcePoolPayload) GetSizeGigabytes() (ret CreateResourcePoolPa // GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetSizeGigabytesOk() (ret CreateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) { return getCreateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes) } // SetSizeGigabytes sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetSizeGigabytes(v CreateResourcePoolPayloadGetSizeGigabytesRetType) { setCreateResourcePoolPayloadGetSizeGigabytesAttributeType(&o.SizeGigabytes, v) } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetSnapshotsAreVisible() (res CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { res, _ = o.GetSnapshotsAreVisibleOk() return @@ -324,21 +395,25 @@ func (o *CreateResourcePoolPayload) GetSnapshotsAreVisible() (res CreateResource // GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) GetSnapshotsAreVisibleOk() (ret CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) { return getCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible) } // HasSnapshotsAreVisible returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolPayload) SetSnapshotsAreVisible(v CreateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { setCreateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateResourcePoolPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateResourcePoolPayloadGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { @@ -365,37 +440,45 @@ func (o CreateResourcePoolPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateResourcePoolPayload struct { value *CreateResourcePoolPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolPayload) Get() *CreateResourcePoolPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolPayload) Set(val *CreateResourcePoolPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateResourcePoolPayload(val *CreateResourcePoolPayload) *NullableCreateResourcePoolPayload { return &NullableCreateResourcePoolPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_resource_pool_response.go b/services/sfs/model_create_resource_pool_response.go index 222a9e2bd..c6b2913d3 100644 --- a/services/sfs/model_create_resource_pool_response.go +++ b/services/sfs/model_create_resource_pool_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateResourcePoolResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseGetResourcePoolAttributeType = *CreateResourcePoolResponseResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseGetResourcePoolArgType = CreateResourcePoolResponseResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseGetResourcePoolRetType = CreateResourcePoolResponseResourcePool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(arg CreateResourcePoolResponseGetResourcePoolAttributeType) (ret CreateResourcePoolResponseGetResourcePoolRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(arg CreateResou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseGetResourcePoolAttributeType(arg *CreateResourcePoolResponseGetResourcePoolAttributeType, val CreateResourcePoolResponseGetResourcePoolRetType) { *arg = &val } // CreateResourcePoolResponse struct for CreateResourcePoolResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponse struct { ResourcePool CreateResourcePoolResponseGetResourcePoolAttributeType `json:"resourcePool,omitempty"` } @@ -46,6 +55,7 @@ type CreateResourcePoolResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolResponse() *CreateResourcePoolResponse { this := CreateResourcePoolResponse{} return &this @@ -54,12 +64,14 @@ func NewCreateResourcePoolResponse() *CreateResourcePoolResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolResponseWithDefaults() *CreateResourcePoolResponse { this := CreateResourcePoolResponse{} return &this } // GetResourcePool returns the ResourcePool field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponse) GetResourcePool() (res CreateResourcePoolResponseGetResourcePoolRetType) { res, _ = o.GetResourcePoolOk() return @@ -67,21 +79,25 @@ func (o *CreateResourcePoolResponse) GetResourcePool() (res CreateResourcePoolRe // GetResourcePoolOk returns a tuple with the ResourcePool field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponse) GetResourcePoolOk() (ret CreateResourcePoolResponseGetResourcePoolRetType, ok bool) { return getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool) } // HasResourcePool returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponse) SetResourcePool(v CreateResourcePoolResponseGetResourcePoolRetType) { setCreateResourcePoolResponseGetResourcePoolAttributeType(&o.ResourcePool, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateResourcePoolResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool); ok { @@ -90,37 +106,45 @@ func (o CreateResourcePoolResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateResourcePoolResponse struct { value *CreateResourcePoolResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolResponse) Get() *CreateResourcePoolResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolResponse) Set(val *CreateResourcePoolResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateResourcePoolResponse(val *CreateResourcePoolResponse) *NullableCreateResourcePoolResponse { return &NullableCreateResourcePoolResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_resource_pool_response_resource_pool.go b/services/sfs/model_create_resource_pool_response_resource_pool.go index f9c9c25dc..04b98cee9 100644 --- a/services/sfs/model_create_resource_pool_response_resource_pool.go +++ b/services/sfs/model_create_resource_pool_response_resource_pool.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &CreateResourcePoolResponseResourcePool{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType) (ret CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(arg *CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType, val CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string /* @@ -44,10 +51,16 @@ type CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetCountSharesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetCountSharesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType) (ret CreateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +68,7 @@ func getCreateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *CreateResourcePoolResponseResourcePoolGetCountSharesAttributeType, val CreateResourcePoolResponseResourcePoolGetCountSharesRetType) { *arg = &val } @@ -64,10 +78,16 @@ func setCreateResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *C */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType) (ret CreateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg Cr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *CreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType, val CreateResourcePoolResponseResourcePoolGetCreatedAtRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *Cre */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetIdAttributeType) (ret CreateResourcePoolResponseResourcePoolGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getCreateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg CreateRes return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetIdAttributeType(arg *CreateResourcePoolResponseResourcePoolGetIdAttributeType, val CreateResourcePoolResponseResourcePoolGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetIdRetType = string /* @@ -105,10 +132,16 @@ type CreateResourcePoolResponseResourcePoolGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetIpAclAttributeType) (ret CreateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getCreateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg Create return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *CreateResourcePoolResponseResourcePoolGetIpAclAttributeType, val CreateResourcePoolResponseResourcePoolGetIpAclRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setCreateResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *CreateR */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetLabelsAttributeType) (ret CreateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +176,7 @@ func getCreateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg Creat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *CreateResourcePoolResponseResourcePoolGetLabelsAttributeType, val CreateResourcePoolResponseResourcePoolGetLabelsRetType) { *arg = &val } @@ -145,8 +186,10 @@ func setCreateResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *Create */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetMountPathAttributeType) (ret CreateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -154,11 +197,15 @@ func getCreateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg Cr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetMountPathAttributeType(arg *CreateResourcePoolResponseResourcePoolGetMountPathAttributeType, val CreateResourcePoolResponseResourcePoolGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetMountPathRetType = string /* @@ -166,8 +213,10 @@ type CreateResourcePoolResponseResourcePoolGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetNameAttributeType) (ret CreateResourcePoolResponseResourcePoolGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -175,11 +224,15 @@ func getCreateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg CreateR return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetNameAttributeType(arg *CreateResourcePoolResponseResourcePoolGetNameAttributeType, val CreateResourcePoolResponseResourcePoolGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetNameRetType = string /* @@ -187,10 +240,16 @@ type CreateResourcePoolResponseResourcePoolGetNameRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType) (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false @@ -198,6 +257,7 @@ func getCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg *CreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType, val CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType) { *arg = &val } @@ -207,10 +267,16 @@ func setCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(a */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { if arg == nil { return ret, false @@ -218,6 +284,7 @@ func getCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType, val CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { *arg = &val } @@ -227,10 +294,16 @@ func setCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtA */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetSizeReducibleAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType) (ret CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) { if arg == nil { return ret, false @@ -238,6 +311,7 @@ func getCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg *CreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType, val CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { *arg = &val } @@ -247,10 +321,16 @@ func setCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(ar */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType) (ret CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { if arg == nil { return ret, false @@ -258,6 +338,7 @@ func getCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(arg *CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType, val CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { *arg = &val } @@ -267,10 +348,16 @@ func setCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTyp */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetSpaceAttributeType = *ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetSpaceArgType = ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetSpaceRetType = ResourcePoolSpace +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetSpaceAttributeType) (ret CreateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) { if arg == nil { return ret, false @@ -278,6 +365,7 @@ func getCreateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg Create return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *CreateResourcePoolResponseResourcePoolGetSpaceAttributeType, val CreateResourcePoolResponseResourcePoolGetSpaceRetType) { *arg = &val } @@ -287,8 +375,10 @@ func setCreateResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *CreateR */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg CreateResourcePoolResponseResourcePoolGetStateAttributeType) (ret CreateResourcePoolResponseResourcePoolGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -296,14 +386,19 @@ func getCreateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg Create return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolResponseResourcePoolGetStateAttributeType(arg *CreateResourcePoolResponseResourcePoolGetStateAttributeType, val CreateResourcePoolResponseResourcePoolGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePoolGetStateRetType = string // CreateResourcePoolResponseResourcePool Created Resource Pool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolResponseResourcePool struct { // Name of the respective availability zone AvailabilityZone CreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` @@ -336,6 +431,7 @@ type CreateResourcePoolResponseResourcePool struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolResponseResourcePool() *CreateResourcePoolResponseResourcePool { this := CreateResourcePoolResponseResourcePool{} return &this @@ -344,6 +440,7 @@ func NewCreateResourcePoolResponseResourcePool() *CreateResourcePoolResponseReso // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolResponseResourcePoolWithDefaults() *CreateResourcePoolResponseResourcePool { this := CreateResourcePoolResponseResourcePool{} var snapshotsAreVisible bool = false @@ -352,6 +449,7 @@ func NewCreateResourcePoolResponseResourcePoolWithDefaults() *CreateResourcePool } // GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetAvailabilityZone() (res CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { res, _ = o.GetAvailabilityZoneOk() return @@ -359,22 +457,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetAvailabilityZone() (res Crea // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetAvailabilityZoneOk() (ret CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) } // HasAvailabilityZone returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetAvailabilityZone(v CreateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { setCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) } // GetCountShares returns the CountShares field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetCountShares() (res CreateResourcePoolResponseResourcePoolGetCountSharesRetType) { res, _ = o.GetCountSharesOk() return @@ -382,22 +484,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetCountShares() (res CreateRes // GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetCountSharesOk() (ret CreateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares) } // HasCountShares returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetCountShares(v CreateResourcePoolResponseResourcePoolGetCountSharesRetType) { setCreateResourcePoolResponseResourcePoolGetCountSharesAttributeType(&o.CountShares, v) } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetCreatedAt() (res CreateResourcePoolResponseResourcePoolGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -405,22 +511,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetCreatedAt() (res CreateResou // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetCreatedAtOk() (ret CreateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetCreatedAt(v CreateResourcePoolResponseResourcePoolGetCreatedAtRetType) { setCreateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetId() (res CreateResourcePoolResponseResourcePoolGetIdRetType) { res, _ = o.GetIdOk() return @@ -428,22 +538,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetId() (res CreateResourcePool // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetIdOk() (ret CreateResourcePoolResponseResourcePoolGetIdRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetId(v CreateResourcePoolResponseResourcePoolGetIdRetType) { setCreateResourcePoolResponseResourcePoolGetIdAttributeType(&o.Id, v) } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetIpAcl() (res CreateResourcePoolResponseResourcePoolGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -451,22 +565,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetIpAcl() (res CreateResourceP // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetIpAclOk() (ret CreateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetIpAcl(v CreateResourcePoolResponseResourcePoolGetIpAclRetType) { setCreateResourcePoolResponseResourcePoolGetIpAclAttributeType(&o.IpAcl, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetLabels() (res CreateResourcePoolResponseResourcePoolGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -474,22 +592,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetLabels() (res CreateResource // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetLabelsOk() (ret CreateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetLabels(v CreateResourcePoolResponseResourcePoolGetLabelsRetType) { setCreateResourcePoolResponseResourcePoolGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetMountPath() (res CreateResourcePoolResponseResourcePoolGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -497,22 +619,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetMountPath() (res CreateResou // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetMountPathOk() (ret CreateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetMountPath(v CreateResourcePoolResponseResourcePoolGetMountPathRetType) { setCreateResourcePoolResponseResourcePoolGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetName() (res CreateResourcePoolResponseResourcePoolGetNameRetType) { res, _ = o.GetNameOk() return @@ -520,22 +646,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetName() (res CreateResourcePo // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetNameOk() (ret CreateResourcePoolResponseResourcePoolGetNameRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetName(v CreateResourcePoolResponseResourcePoolGetNameRetType) { setCreateResourcePoolResponseResourcePoolGetNameAttributeType(&o.Name, v) } // GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClass() (res CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType) { res, _ = o.GetPerformanceClassOk() return @@ -543,22 +673,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClass() (res Crea // GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClassOk() (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // HasPerformanceClass returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetPerformanceClass(v CreateResourcePoolResponseResourcePoolGetPerformanceClassRetType) { setCreateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v) } // GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt() (res CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { res, _ = o.GetPerformanceClassDowngradableAtOk() return @@ -566,22 +700,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClassDowngradable // GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAtOk() (ret CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt) } // HasPerformanceClassDowngradableAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetPerformanceClassDowngradableAt(v CreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { setCreateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v) } // GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetSizeReducibleAt() (res CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { res, _ = o.GetSizeReducibleAtOk() return @@ -589,22 +727,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetSizeReducibleAt() (res Creat // GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetSizeReducibleAtOk() (ret CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt) } // HasSizeReducibleAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetSizeReducibleAt(v CreateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { setCreateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v) } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { res, _ = o.GetSnapshotsAreVisibleOk() return @@ -612,22 +754,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res C // GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetSnapshotsAreVisibleOk() (ret CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible) } // HasSnapshotsAreVisible returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetSnapshotsAreVisible(v CreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { setCreateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v) } // GetSpace returns the Space field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetSpace() (res CreateResourcePoolResponseResourcePoolGetSpaceRetType) { res, _ = o.GetSpaceOk() return @@ -635,22 +781,26 @@ func (o *CreateResourcePoolResponseResourcePool) GetSpace() (res CreateResourceP // GetSpaceOk returns a tuple with the Space field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetSpaceOk() (ret CreateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space) } // HasSpace returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetSpace(v CreateResourcePoolResponseResourcePoolGetSpaceRetType) { setCreateResourcePoolResponseResourcePoolGetSpaceAttributeType(&o.Space, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetState() (res CreateResourcePoolResponseResourcePoolGetStateRetType) { res, _ = o.GetStateOk() return @@ -658,21 +808,25 @@ func (o *CreateResourcePoolResponseResourcePool) GetState() (res CreateResourceP // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) GetStateOk() (ret CreateResourcePoolResponseResourcePoolGetStateRetType, ok bool) { return getCreateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolResponseResourcePool) SetState(v CreateResourcePoolResponseResourcePoolGetStateRetType) { setCreateResourcePoolResponseResourcePoolGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { @@ -720,37 +874,45 @@ func (o CreateResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateResourcePoolResponseResourcePool struct { value *CreateResourcePoolResponseResourcePool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolResponseResourcePool) Get() *CreateResourcePoolResponseResourcePool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolResponseResourcePool) Set(val *CreateResourcePoolResponseResourcePool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolResponseResourcePool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolResponseResourcePool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateResourcePoolResponseResourcePool(val *CreateResourcePoolResponseResourcePool) *NullableCreateResourcePoolResponseResourcePool { return &NullableCreateResourcePoolResponseResourcePool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolResponseResourcePool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolResponseResourcePool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_resource_pool_snapshot_payload.go b/services/sfs/model_create_resource_pool_snapshot_payload.go index 76fa7a810..0cf7f7210 100644 --- a/services/sfs/model_create_resource_pool_snapshot_payload.go +++ b/services/sfs/model_create_resource_pool_snapshot_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateResourcePoolSnapshotPayload{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayloadGetCommentAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(arg CreateResourcePoolSnapshotPayloadGetCommentAttributeType) (ret CreateResourcePoolSnapshotPayloadGetCommentRetType, ok bool) { if arg == nil { return nil, false @@ -31,6 +34,7 @@ func getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(arg CreateRes return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotPayloadGetCommentAttributeType(arg *CreateResourcePoolSnapshotPayloadGetCommentAttributeType, val CreateResourcePoolSnapshotPayloadGetCommentRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -39,7 +43,10 @@ func setCreateResourcePoolSnapshotPayloadGetCommentAttributeType(arg *CreateReso } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayloadGetCommentArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayloadGetCommentRetType = *string /* @@ -47,8 +54,10 @@ type CreateResourcePoolSnapshotPayloadGetCommentRetType = *string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotPayloadGetNameAttributeTypeOk(arg CreateResourcePoolSnapshotPayloadGetNameAttributeType) (ret CreateResourcePoolSnapshotPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -56,14 +65,19 @@ func getCreateResourcePoolSnapshotPayloadGetNameAttributeTypeOk(arg CreateResour return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotPayloadGetNameAttributeType(arg *CreateResourcePoolSnapshotPayloadGetNameAttributeType, val CreateResourcePoolSnapshotPayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayloadGetNameRetType = string // CreateResourcePoolSnapshotPayload struct for CreateResourcePoolSnapshotPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotPayload struct { // (optional) A comment to add more information about a snapshot Comment CreateResourcePoolSnapshotPayloadGetCommentAttributeType `json:"comment,omitempty"` @@ -75,6 +89,7 @@ type CreateResourcePoolSnapshotPayload struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolSnapshotPayload() *CreateResourcePoolSnapshotPayload { this := CreateResourcePoolSnapshotPayload{} return &this @@ -83,12 +98,14 @@ func NewCreateResourcePoolSnapshotPayload() *CreateResourcePoolSnapshotPayload { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) GetComment() (res CreateResourcePoolSnapshotPayloadGetCommentRetType) { res, _ = o.GetCommentOk() return @@ -97,32 +114,38 @@ func (o *CreateResourcePoolSnapshotPayload) GetComment() (res CreateResourcePool // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) GetCommentOk() (ret CreateResourcePoolSnapshotPayloadGetCommentRetType, ok bool) { return getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) SetComment(v CreateResourcePoolSnapshotPayloadGetCommentRetType) { setCreateResourcePoolSnapshotPayloadGetCommentAttributeType(&o.Comment, v) } // SetCommentNil sets the value for Comment to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) SetCommentNil() { o.Comment = nil } // UnsetComment ensures that no value is present for Comment, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) UnsetComment() { o.Comment = nil } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) GetName() (res CreateResourcePoolSnapshotPayloadGetNameRetType) { res, _ = o.GetNameOk() return @@ -130,21 +153,25 @@ func (o *CreateResourcePoolSnapshotPayload) GetName() (res CreateResourcePoolSna // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) GetNameOk() (ret CreateResourcePoolSnapshotPayloadGetNameRetType, ok bool) { return getCreateResourcePoolSnapshotPayloadGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotPayload) SetName(v CreateResourcePoolSnapshotPayloadGetNameRetType) { setCreateResourcePoolSnapshotPayloadGetNameAttributeType(&o.Name, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateResourcePoolSnapshotPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateResourcePoolSnapshotPayloadGetCommentAttributeTypeOk(o.Comment); ok { @@ -156,37 +183,45 @@ func (o CreateResourcePoolSnapshotPayload) ToMap() (map[string]interface{}, erro return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateResourcePoolSnapshotPayload struct { value *CreateResourcePoolSnapshotPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotPayload) Get() *CreateResourcePoolSnapshotPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotPayload) Set(val *CreateResourcePoolSnapshotPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateResourcePoolSnapshotPayload(val *CreateResourcePoolSnapshotPayload) *NullableCreateResourcePoolSnapshotPayload { return &NullableCreateResourcePoolSnapshotPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_resource_pool_snapshot_response.go b/services/sfs/model_create_resource_pool_snapshot_response.go index 31f0b42eb..158e30715 100644 --- a/services/sfs/model_create_resource_pool_snapshot_response.go +++ b/services/sfs/model_create_resource_pool_snapshot_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateResourcePoolSnapshotResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType = *CreateResourcePoolSnapshotResponseResourcePoolSnapshot + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotArgType = CreateResourcePoolSnapshotResponseResourcePoolSnapshot + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType = CreateResourcePoolSnapshotResponseResourcePoolSnapshot +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(arg CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType) (ret CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(arg *CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType, val CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) { *arg = &val } // CreateResourcePoolSnapshotResponse struct for CreateResourcePoolSnapshotResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponse struct { ResourcePoolSnapshot CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType `json:"resourcePoolSnapshot,omitempty"` } @@ -46,6 +55,7 @@ type CreateResourcePoolSnapshotResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolSnapshotResponse() *CreateResourcePoolSnapshotResponse { this := CreateResourcePoolSnapshotResponse{} return &this @@ -54,12 +64,14 @@ func NewCreateResourcePoolSnapshotResponse() *CreateResourcePoolSnapshotResponse // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolSnapshotResponseWithDefaults() *CreateResourcePoolSnapshotResponse { this := CreateResourcePoolSnapshotResponse{} return &this } // GetResourcePoolSnapshot returns the ResourcePoolSnapshot field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponse) GetResourcePoolSnapshot() (res CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) { res, _ = o.GetResourcePoolSnapshotOk() return @@ -67,21 +79,25 @@ func (o *CreateResourcePoolSnapshotResponse) GetResourcePoolSnapshot() (res Crea // GetResourcePoolSnapshotOk returns a tuple with the ResourcePoolSnapshot field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponse) GetResourcePoolSnapshotOk() (ret CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) { return getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot) } // HasResourcePoolSnapshot returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v CreateResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) { setCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(&o.ResourcePoolSnapshot, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot); ok { @@ -90,37 +106,45 @@ func (o CreateResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, err return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateResourcePoolSnapshotResponse struct { value *CreateResourcePoolSnapshotResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotResponse) Get() *CreateResourcePoolSnapshotResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotResponse) Set(val *CreateResourcePoolSnapshotResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateResourcePoolSnapshotResponse(val *CreateResourcePoolSnapshotResponse) *NullableCreateResourcePoolSnapshotResponse { return &NullableCreateResourcePoolSnapshotResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_resource_pool_snapshot_response_resource_pool_snapshot.go b/services/sfs/model_create_resource_pool_snapshot_response_resource_pool_snapshot.go index 45960c687..d4cfc2c65 100644 --- a/services/sfs/model_create_resource_pool_snapshot_response_resource_pool_snapshot.go +++ b/services/sfs/model_create_resource_pool_snapshot_response_resource_pool_snapshot.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &CreateResourcePoolSnapshotResponseResourcePoolSnapshot{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) { if arg == nil { return nil, false @@ -32,6 +35,7 @@ func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttribut return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -40,7 +44,10 @@ func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttribut } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType = *string /* @@ -48,10 +55,16 @@ type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType = * */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -59,6 +72,7 @@ func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) { *arg = &val } @@ -68,10 +82,16 @@ func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttrib */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -79,6 +99,7 @@ func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGiga return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { *arg = &val } @@ -88,8 +109,10 @@ func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGiga */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) { if arg == nil { return ret, false @@ -97,11 +120,15 @@ func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType = string /* @@ -109,10 +136,16 @@ type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetT */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -120,6 +153,7 @@ func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) { *arg = &val } @@ -129,8 +163,10 @@ func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAt */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType) (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) { if arg == nil { return ret, false @@ -138,14 +174,19 @@ func getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAtt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(arg *CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType, val CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType = string // CreateResourcePoolSnapshotResponseResourcePoolSnapshot Created Resource Pool Snapshot +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateResourcePoolSnapshotResponseResourcePoolSnapshot struct { // (optional) A comment to add more information about a snapshot Comment CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"` @@ -166,6 +207,7 @@ type CreateResourcePoolSnapshotResponseResourcePoolSnapshot struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateResourcePoolSnapshotResponseResourcePoolSnapshot() *CreateResourcePoolSnapshotResponseResourcePoolSnapshot { this := CreateResourcePoolSnapshotResponseResourcePoolSnapshot{} return &this @@ -174,12 +216,14 @@ func NewCreateResourcePoolSnapshotResponseResourcePoolSnapshot() *CreateResource // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetComment() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) { res, _ = o.GetCommentOk() return @@ -188,32 +232,38 @@ func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetComment() (r // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCommentOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) { return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetComment(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) { setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v) } // SetCommentNil sets the value for Comment to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetCommentNil() { o.Comment = nil } // UnsetComment ensures that no value is present for Comment, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) UnsetComment() { o.Comment = nil } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAt() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -221,22 +271,26 @@ func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAt() // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAtOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) { return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetCreatedAt(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) { setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytes() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { res, _ = o.GetLogicalSizeGigabytesOk() return @@ -244,22 +298,26 @@ func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeG // GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) { return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes) } // HasLogicalSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetLogicalSizeGigabytes(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v) } // GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolId() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) { res, _ = o.GetResourcePoolIdOk() return @@ -267,22 +325,26 @@ func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePool // GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolIdOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) { return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId) } // HasResourcePoolId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetResourcePoolId(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) { setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v) } // GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytes() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) { res, _ = o.GetSizeGigabytesOk() return @@ -290,22 +352,26 @@ func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabyte // GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytesOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) { return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes) } // HasSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetSizeGigabytes(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) { setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v) } // GetSnapshotName returns the SnapshotName field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotName() (res CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) { res, _ = o.GetSnapshotNameOk() return @@ -313,21 +379,25 @@ func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotName // GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotNameOk() (ret CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) { return getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName) } // HasSnapshotName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) SetSnapshotName(v CreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) { setCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateResourcePoolSnapshotResponseResourcePoolSnapshot) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok { @@ -351,37 +421,45 @@ func (o CreateResourcePoolSnapshotResponseResourcePoolSnapshot) ToMap() (map[str return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot struct { value *CreateResourcePoolSnapshotResponseResourcePoolSnapshot isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) Get() *CreateResourcePoolSnapshotResponseResourcePoolSnapshot { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) Set(val *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot(val *CreateResourcePoolSnapshotResponseResourcePoolSnapshot) *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot { return &NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateResourcePoolSnapshotResponseResourcePoolSnapshot) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_export_policy_payload.go b/services/sfs/model_create_share_export_policy_payload.go index c87800cb9..6ec2c1a6a 100644 --- a/services/sfs/model_create_share_export_policy_payload.go +++ b/services/sfs/model_create_share_export_policy_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateShareExportPolicyPayload{} */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(arg CreateShareExportPolicyPayloadGetLabelsAttributeType) (ret CreateShareExportPolicyPayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(arg CreateShareEx return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyPayloadGetLabelsAttributeType(arg *CreateShareExportPolicyPayloadGetLabelsAttributeType, val CreateShareExportPolicyPayloadGetLabelsRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setCreateShareExportPolicyPayloadGetLabelsAttributeType(arg *CreateShareExp */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyPayloadGetNameAttributeTypeOk(arg CreateShareExportPolicyPayloadGetNameAttributeType) (ret CreateShareExportPolicyPayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getCreateShareExportPolicyPayloadGetNameAttributeTypeOk(arg CreateShareExpo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyPayloadGetNameAttributeType(arg *CreateShareExportPolicyPayloadGetNameAttributeType, val CreateShareExportPolicyPayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetNameRetType = string /* @@ -63,10 +77,16 @@ type CreateShareExportPolicyPayloadGetNameRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetRulesAttributeType = *[]CreateShareExportPolicyRequestRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetRulesArgType = []CreateShareExportPolicyRequestRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyPayloadGetRulesRetType = []CreateShareExportPolicyRequestRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyPayloadGetRulesAttributeTypeOk(arg CreateShareExportPolicyPayloadGetRulesAttributeType) (ret CreateShareExportPolicyPayloadGetRulesRetType, ok bool) { if arg == nil { return ret, false @@ -74,11 +94,13 @@ func getCreateShareExportPolicyPayloadGetRulesAttributeTypeOk(arg CreateShareExp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyPayloadGetRulesAttributeType(arg *CreateShareExportPolicyPayloadGetRulesAttributeType, val CreateShareExportPolicyPayloadGetRulesRetType) { *arg = &val } // CreateShareExportPolicyPayload struct for CreateShareExportPolicyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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"` @@ -89,12 +111,14 @@ type CreateShareExportPolicyPayload struct { Rules CreateShareExportPolicyPayloadGetRulesAttributeType `json:"rules,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateShareExportPolicyPayload CreateShareExportPolicyPayload // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyPayload(name CreateShareExportPolicyPayloadGetNameArgType) *CreateShareExportPolicyPayload { this := CreateShareExportPolicyPayload{} setCreateShareExportPolicyPayloadGetNameAttributeType(&this.Name, name) @@ -104,12 +128,14 @@ func NewCreateShareExportPolicyPayload(name CreateShareExportPolicyPayloadGetNam // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyPayloadWithDefaults() *CreateShareExportPolicyPayload { this := CreateShareExportPolicyPayload{} return &this } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) GetLabels() (res CreateShareExportPolicyPayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -117,22 +143,26 @@ func (o *CreateShareExportPolicyPayload) GetLabels() (res CreateShareExportPolic // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) GetLabelsOk() (ret CreateShareExportPolicyPayloadGetLabelsRetType, ok bool) { return getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) SetLabels(v CreateShareExportPolicyPayloadGetLabelsRetType) { setCreateShareExportPolicyPayloadGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) GetName() (ret CreateShareExportPolicyPayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -140,16 +170,19 @@ func (o *CreateShareExportPolicyPayload) GetName() (ret CreateShareExportPolicyP // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) GetNameOk() (ret CreateShareExportPolicyPayloadGetNameRetType, ok bool) { return getCreateShareExportPolicyPayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) SetName(v CreateShareExportPolicyPayloadGetNameRetType) { setCreateShareExportPolicyPayloadGetNameAttributeType(&o.Name, v) } // GetRules returns the Rules field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) GetRules() (res CreateShareExportPolicyPayloadGetRulesRetType) { res, _ = o.GetRulesOk() return @@ -157,21 +190,25 @@ func (o *CreateShareExportPolicyPayload) GetRules() (res CreateShareExportPolicy // GetRulesOk returns a tuple with the Rules field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) GetRulesOk() (ret CreateShareExportPolicyPayloadGetRulesRetType, ok bool) { return getCreateShareExportPolicyPayloadGetRulesAttributeTypeOk(o.Rules) } // HasRules returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyPayload) SetRules(v CreateShareExportPolicyPayloadGetRulesRetType) { setCreateShareExportPolicyPayloadGetRulesAttributeType(&o.Rules, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels); ok { @@ -186,37 +223,45 @@ func (o CreateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShareExportPolicyPayload struct { value *CreateShareExportPolicyPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyPayload) Get() *CreateShareExportPolicyPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyPayload) Set(val *CreateShareExportPolicyPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShareExportPolicyPayload(val *CreateShareExportPolicyPayload) *NullableCreateShareExportPolicyPayload { return &NullableCreateShareExportPolicyPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_export_policy_request_rule.go b/services/sfs/model_create_share_export_policy_request_rule.go index a0cfd1c69..14e724bce 100644 --- a/services/sfs/model_create_share_export_policy_request_rule.go +++ b/services/sfs/model_create_share_export_policy_request_rule.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateShareExportPolicyRequestRule{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetDescriptionAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(arg CreateShareExportPolicyRequestRuleGetDescriptionAttributeType) (ret CreateShareExportPolicyRequestRuleGetDescriptionRetType, ok bool) { if arg == nil { return nil, false @@ -31,6 +34,7 @@ func getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(arg Crea return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyRequestRuleGetDescriptionAttributeType(arg *CreateShareExportPolicyRequestRuleGetDescriptionAttributeType, val CreateShareExportPolicyRequestRuleGetDescriptionRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -39,7 +43,10 @@ func setCreateShareExportPolicyRequestRuleGetDescriptionAttributeType(arg *Creat } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetDescriptionArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetDescriptionRetType = *string /* @@ -47,10 +54,16 @@ type CreateShareExportPolicyRequestRuleGetDescriptionRetType = *string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyRequestRuleGetIpAclAttributeTypeOk(arg CreateShareExportPolicyRequestRuleGetIpAclAttributeType) (ret CreateShareExportPolicyRequestRuleGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -58,6 +71,7 @@ func getCreateShareExportPolicyRequestRuleGetIpAclAttributeTypeOk(arg CreateShar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyRequestRuleGetIpAclAttributeType(arg *CreateShareExportPolicyRequestRuleGetIpAclAttributeType, val CreateShareExportPolicyRequestRuleGetIpAclRetType) { *arg = &val } @@ -67,10 +81,16 @@ func setCreateShareExportPolicyRequestRuleGetIpAclAttributeType(arg *CreateShare */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetOrderAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetOrderArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRuleGetOrderRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyRequestRuleGetOrderAttributeTypeOk(arg CreateShareExportPolicyRequestRuleGetOrderAttributeType) (ret CreateShareExportPolicyRequestRuleGetOrderRetType, ok bool) { if arg == nil { return ret, false @@ -78,6 +98,7 @@ func getCreateShareExportPolicyRequestRuleGetOrderAttributeTypeOk(arg CreateShar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyRequestRuleGetOrderAttributeType(arg *CreateShareExportPolicyRequestRuleGetOrderAttributeType, val CreateShareExportPolicyRequestRuleGetOrderRetType) { *arg = &val } @@ -87,10 +108,16 @@ func setCreateShareExportPolicyRequestRuleGetOrderAttributeType(arg *CreateShare */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetReadOnlyAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetReadOnlyArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetReadOnlyRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyRequestRulegetReadOnlyAttributeTypeOk(arg CreateShareExportPolicyRequestRulegetReadOnlyAttributeType) (ret CreateShareExportPolicyRequestRulegetReadOnlyRetType, ok bool) { if arg == nil { return ret, false @@ -98,6 +125,7 @@ func getCreateShareExportPolicyRequestRulegetReadOnlyAttributeTypeOk(arg CreateS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyRequestRulegetReadOnlyAttributeType(arg *CreateShareExportPolicyRequestRulegetReadOnlyAttributeType, val CreateShareExportPolicyRequestRulegetReadOnlyRetType) { *arg = &val } @@ -107,10 +135,16 @@ func setCreateShareExportPolicyRequestRulegetReadOnlyAttributeType(arg *CreateSh */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetSetUuidAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetSetUuidArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetSetUuidRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyRequestRulegetSetUuidAttributeTypeOk(arg CreateShareExportPolicyRequestRulegetSetUuidAttributeType) (ret CreateShareExportPolicyRequestRulegetSetUuidRetType, ok bool) { if arg == nil { return ret, false @@ -118,6 +152,7 @@ func getCreateShareExportPolicyRequestRulegetSetUuidAttributeTypeOk(arg CreateSh return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyRequestRulegetSetUuidAttributeType(arg *CreateShareExportPolicyRequestRulegetSetUuidAttributeType, val CreateShareExportPolicyRequestRulegetSetUuidRetType) { *arg = &val } @@ -127,10 +162,16 @@ func setCreateShareExportPolicyRequestRulegetSetUuidAttributeType(arg *CreateSha */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetSuperUserAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetSuperUserArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRulegetSuperUserRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyRequestRulegetSuperUserAttributeTypeOk(arg CreateShareExportPolicyRequestRulegetSuperUserAttributeType) (ret CreateShareExportPolicyRequestRulegetSuperUserRetType, ok bool) { if arg == nil { return ret, false @@ -138,11 +179,13 @@ func getCreateShareExportPolicyRequestRulegetSuperUserAttributeTypeOk(arg Create return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyRequestRulegetSuperUserAttributeType(arg *CreateShareExportPolicyRequestRulegetSuperUserAttributeType, val CreateShareExportPolicyRequestRulegetSuperUserRetType) { *arg = &val } // CreateShareExportPolicyRequestRule struct for CreateShareExportPolicyRequestRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyRequestRule struct { // Description of the Rule (optional) Description CreateShareExportPolicyRequestRuleGetDescriptionAttributeType `json:"description,omitempty"` @@ -163,6 +206,7 @@ type CreateShareExportPolicyRequestRule struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyRequestRule() *CreateShareExportPolicyRequestRule { this := CreateShareExportPolicyRequestRule{} return &this @@ -171,6 +215,7 @@ func NewCreateShareExportPolicyRequestRule() *CreateShareExportPolicyRequestRule // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyRequestRuleWithDefaults() *CreateShareExportPolicyRequestRule { this := CreateShareExportPolicyRequestRule{} var readOnly bool = false @@ -183,6 +228,7 @@ func NewCreateShareExportPolicyRequestRuleWithDefaults() *CreateShareExportPolic } // GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetDescription() (res CreateShareExportPolicyRequestRuleGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -191,32 +237,38 @@ func (o *CreateShareExportPolicyRequestRule) GetDescription() (res CreateShareEx // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetDescriptionOk() (ret CreateShareExportPolicyRequestRuleGetDescriptionRetType, ok bool) { return getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetDescription(v CreateShareExportPolicyRequestRuleGetDescriptionRetType) { setCreateShareExportPolicyRequestRuleGetDescriptionAttributeType(&o.Description, v) } // SetDescriptionNil sets the value for Description to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetDescriptionNil() { o.Description = nil } // UnsetDescription ensures that no value is present for Description, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) UnsetDescription() { o.Description = nil } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetIpAcl() (res CreateShareExportPolicyRequestRuleGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -224,22 +276,26 @@ func (o *CreateShareExportPolicyRequestRule) GetIpAcl() (res CreateShareExportPo // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetIpAclOk() (ret CreateShareExportPolicyRequestRuleGetIpAclRetType, ok bool) { return getCreateShareExportPolicyRequestRuleGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetIpAcl(v CreateShareExportPolicyRequestRuleGetIpAclRetType) { setCreateShareExportPolicyRequestRuleGetIpAclAttributeType(&o.IpAcl, v) } // GetOrder returns the Order field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetOrder() (res CreateShareExportPolicyRequestRuleGetOrderRetType) { res, _ = o.GetOrderOk() return @@ -247,22 +303,26 @@ func (o *CreateShareExportPolicyRequestRule) GetOrder() (res CreateShareExportPo // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetOrderOk() (ret CreateShareExportPolicyRequestRuleGetOrderRetType, ok bool) { return getCreateShareExportPolicyRequestRuleGetOrderAttributeTypeOk(o.Order) } // HasOrder returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetOrder(v CreateShareExportPolicyRequestRuleGetOrderRetType) { setCreateShareExportPolicyRequestRuleGetOrderAttributeType(&o.Order, v) } // GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetReadOnly() (res CreateShareExportPolicyRequestRulegetReadOnlyRetType) { res, _ = o.GetReadOnlyOk() return @@ -270,22 +330,26 @@ func (o *CreateShareExportPolicyRequestRule) GetReadOnly() (res CreateShareExpor // GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetReadOnlyOk() (ret CreateShareExportPolicyRequestRulegetReadOnlyRetType, ok bool) { return getCreateShareExportPolicyRequestRulegetReadOnlyAttributeTypeOk(o.ReadOnly) } // HasReadOnly returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetReadOnly(v CreateShareExportPolicyRequestRulegetReadOnlyRetType) { setCreateShareExportPolicyRequestRulegetReadOnlyAttributeType(&o.ReadOnly, v) } // GetSetUuid returns the SetUuid field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetSetUuid() (res CreateShareExportPolicyRequestRulegetSetUuidRetType) { res, _ = o.GetSetUuidOk() return @@ -293,22 +357,26 @@ func (o *CreateShareExportPolicyRequestRule) GetSetUuid() (res CreateShareExport // GetSetUuidOk returns a tuple with the SetUuid field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetSetUuidOk() (ret CreateShareExportPolicyRequestRulegetSetUuidRetType, ok bool) { return getCreateShareExportPolicyRequestRulegetSetUuidAttributeTypeOk(o.SetUuid) } // HasSetUuid returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetSetUuid(v CreateShareExportPolicyRequestRulegetSetUuidRetType) { setCreateShareExportPolicyRequestRulegetSetUuidAttributeType(&o.SetUuid, v) } // GetSuperUser returns the SuperUser field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetSuperUser() (res CreateShareExportPolicyRequestRulegetSuperUserRetType) { res, _ = o.GetSuperUserOk() return @@ -316,21 +384,25 @@ func (o *CreateShareExportPolicyRequestRule) GetSuperUser() (res CreateShareExpo // GetSuperUserOk returns a tuple with the SuperUser field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) GetSuperUserOk() (ret CreateShareExportPolicyRequestRulegetSuperUserRetType, ok bool) { return getCreateShareExportPolicyRequestRulegetSuperUserAttributeTypeOk(o.SuperUser) } // HasSuperUser returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyRequestRule) SetSuperUser(v CreateShareExportPolicyRequestRulegetSuperUserRetType) { setCreateShareExportPolicyRequestRulegetSuperUserAttributeType(&o.SuperUser, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShareExportPolicyRequestRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShareExportPolicyRequestRuleGetDescriptionAttributeTypeOk(o.Description); ok { @@ -354,37 +426,45 @@ func (o CreateShareExportPolicyRequestRule) ToMap() (map[string]interface{}, err return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShareExportPolicyRequestRule struct { value *CreateShareExportPolicyRequestRule isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyRequestRule) Get() *CreateShareExportPolicyRequestRule { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyRequestRule) Set(val *CreateShareExportPolicyRequestRule) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyRequestRule) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyRequestRule) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShareExportPolicyRequestRule(val *CreateShareExportPolicyRequestRule) *NullableCreateShareExportPolicyRequestRule { return &NullableCreateShareExportPolicyRequestRule{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyRequestRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyRequestRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_export_policy_response.go b/services/sfs/model_create_share_export_policy_response.go index 7e6104d57..85331ed9c 100644 --- a/services/sfs/model_create_share_export_policy_response.go +++ b/services/sfs/model_create_share_export_policy_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateShareExportPolicyResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseGetShareExportPolicyAttributeType = *CreateShareExportPolicyResponseShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseGetShareExportPolicyArgType = CreateShareExportPolicyResponseShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseGetShareExportPolicyRetType = CreateShareExportPolicyResponseShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg CreateShareExportPolicyResponseGetShareExportPolicyAttributeType) (ret CreateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg C return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseGetShareExportPolicyAttributeType(arg *CreateShareExportPolicyResponseGetShareExportPolicyAttributeType, val CreateShareExportPolicyResponseGetShareExportPolicyRetType) { *arg = &val } // CreateShareExportPolicyResponse struct for CreateShareExportPolicyResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponse struct { ShareExportPolicy CreateShareExportPolicyResponseGetShareExportPolicyAttributeType `json:"shareExportPolicy,omitempty"` } @@ -46,6 +55,7 @@ type CreateShareExportPolicyResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyResponse() *CreateShareExportPolicyResponse { this := CreateShareExportPolicyResponse{} return &this @@ -54,12 +64,14 @@ func NewCreateShareExportPolicyResponse() *CreateShareExportPolicyResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyResponseWithDefaults() *CreateShareExportPolicyResponse { this := CreateShareExportPolicyResponse{} return &this } // GetShareExportPolicy returns the ShareExportPolicy field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponse) GetShareExportPolicy() (res CreateShareExportPolicyResponseGetShareExportPolicyRetType) { res, _ = o.GetShareExportPolicyOk() return @@ -67,21 +79,25 @@ func (o *CreateShareExportPolicyResponse) GetShareExportPolicy() (res CreateShar // GetShareExportPolicyOk returns a tuple with the ShareExportPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponse) GetShareExportPolicyOk() (ret CreateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) { return getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy) } // HasShareExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponse) SetShareExportPolicy(v CreateShareExportPolicyResponseGetShareExportPolicyRetType) { setCreateShareExportPolicyResponseGetShareExportPolicyAttributeType(&o.ShareExportPolicy, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy); ok { @@ -90,37 +106,45 @@ func (o CreateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShareExportPolicyResponse struct { value *CreateShareExportPolicyResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyResponse) Get() *CreateShareExportPolicyResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyResponse) Set(val *CreateShareExportPolicyResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShareExportPolicyResponse(val *CreateShareExportPolicyResponse) *NullableCreateShareExportPolicyResponse { return &NullableCreateShareExportPolicyResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_export_policy_response_share_export_policy.go b/services/sfs/model_create_share_export_policy_response_share_export_policy.go index e026d843c..c041a3111 100644 --- a/services/sfs/model_create_share_export_policy_response_share_export_policy.go +++ b/services/sfs/model_create_share_export_policy_response_share_export_policy.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &CreateShareExportPolicyResponseShareExportPolicy{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) { *arg = &val } @@ -43,8 +51,10 @@ func setCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTyp */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +62,15 @@ func getCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetIdRetType = string /* @@ -64,10 +78,16 @@ type CreateShareExportPolicyResponseShareExportPolicyGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(a */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(a return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetNameRetType = string /* @@ -105,10 +132,16 @@ type CreateShareExportPolicyResponseShareExportPolicyGetNameRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetRulesArgType = []ShareExportPolicyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType = []ShareExportPolicyRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(ar */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) { if arg == nil { return ret, false @@ -136,11 +176,13 @@ func getCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPoli return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(arg *CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType, val CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) { *arg = &val } // CreateShareExportPolicyResponseShareExportPolicy Created Share Export Policy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareExportPolicyResponseShareExportPolicy struct { CreatedAt CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"` // ID of the Share Export Policy @@ -160,6 +202,7 @@ type CreateShareExportPolicyResponseShareExportPolicy struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyResponseShareExportPolicy() *CreateShareExportPolicyResponseShareExportPolicy { this := CreateShareExportPolicyResponseShareExportPolicy{} return &this @@ -168,12 +211,14 @@ func NewCreateShareExportPolicyResponseShareExportPolicy() *CreateShareExportPol // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareExportPolicyResponseShareExportPolicyWithDefaults() *CreateShareExportPolicyResponseShareExportPolicy { this := CreateShareExportPolicyResponseShareExportPolicy{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetCreatedAt() (res CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -181,22 +226,26 @@ func (o *CreateShareExportPolicyResponseShareExportPolicy) GetCreatedAt() (res C // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetCreatedAtOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) { return getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) SetCreatedAt(v CreateShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) { setCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetId() (res CreateShareExportPolicyResponseShareExportPolicyGetIdRetType) { res, _ = o.GetIdOk() return @@ -204,22 +253,26 @@ func (o *CreateShareExportPolicyResponseShareExportPolicy) GetId() (res CreateSh // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetIdOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) { return getCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) SetId(v CreateShareExportPolicyResponseShareExportPolicyGetIdRetType) { setCreateShareExportPolicyResponseShareExportPolicyGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetLabels() (res CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -227,22 +280,26 @@ func (o *CreateShareExportPolicyResponseShareExportPolicy) GetLabels() (res Crea // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetLabelsOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) { return getCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) SetLabels(v CreateShareExportPolicyResponseShareExportPolicyGetLabelsRetType) { setCreateShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetName() (res CreateShareExportPolicyResponseShareExportPolicyGetNameRetType) { res, _ = o.GetNameOk() return @@ -250,22 +307,26 @@ func (o *CreateShareExportPolicyResponseShareExportPolicy) GetName() (res Create // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetNameOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) { return getCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) SetName(v CreateShareExportPolicyResponseShareExportPolicyGetNameRetType) { setCreateShareExportPolicyResponseShareExportPolicyGetNameAttributeType(&o.Name, v) } // GetRules returns the Rules field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetRules() (res CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType) { res, _ = o.GetRulesOk() return @@ -273,22 +334,26 @@ func (o *CreateShareExportPolicyResponseShareExportPolicy) GetRules() (res Creat // GetRulesOk returns a tuple with the Rules field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetRulesOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) { return getCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(o.Rules) } // HasRules returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) SetRules(v CreateShareExportPolicyResponseShareExportPolicyGetRulesRetType) { setCreateShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(&o.Rules, v) } // GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicy() (res CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) { res, _ = o.GetSharesUsingExportPolicyOk() return @@ -296,21 +361,25 @@ func (o *CreateShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportP // GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicyOk() (ret CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) { return getCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy) } // HasSharesUsingExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareExportPolicyResponseShareExportPolicy) SetSharesUsingExportPolicy(v CreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) { setCreateShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShareExportPolicyResponseShareExportPolicy) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -334,37 +403,45 @@ func (o CreateShareExportPolicyResponseShareExportPolicy) ToMap() (map[string]in return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShareExportPolicyResponseShareExportPolicy struct { value *CreateShareExportPolicyResponseShareExportPolicy isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyResponseShareExportPolicy) Get() *CreateShareExportPolicyResponseShareExportPolicy { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyResponseShareExportPolicy) Set(val *CreateShareExportPolicyResponseShareExportPolicy) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyResponseShareExportPolicy) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyResponseShareExportPolicy) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShareExportPolicyResponseShareExportPolicy(val *CreateShareExportPolicyResponseShareExportPolicy) *NullableCreateShareExportPolicyResponseShareExportPolicy { return &NullableCreateShareExportPolicyResponseShareExportPolicy{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareExportPolicyResponseShareExportPolicy) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareExportPolicyResponseShareExportPolicy) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_payload.go b/services/sfs/model_create_share_payload.go index 81572eb3a..a1e331a61 100644 --- a/services/sfs/model_create_share_payload.go +++ b/services/sfs/model_create_share_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateSharePayload{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetExportPolicyNameAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(arg CreateSharePayloadGetExportPolicyNameAttributeType) (ret CreateSharePayloadGetExportPolicyNameRetType, ok bool) { if arg == nil { return nil, false @@ -31,6 +34,7 @@ func getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(arg CreateSharePayl return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateSharePayloadGetExportPolicyNameAttributeType(arg *CreateSharePayloadGetExportPolicyNameAttributeType, val CreateSharePayloadGetExportPolicyNameRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -39,7 +43,10 @@ func setCreateSharePayloadGetExportPolicyNameAttributeType(arg *CreateSharePaylo } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetExportPolicyNameArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetExportPolicyNameRetType = *string /* @@ -47,10 +54,16 @@ type CreateSharePayloadGetExportPolicyNameRetType = *string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateSharePayloadGetLabelsAttributeTypeOk(arg CreateSharePayloadGetLabelsAttributeType) (ret CreateSharePayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -58,6 +71,7 @@ func getCreateSharePayloadGetLabelsAttributeTypeOk(arg CreateSharePayloadGetLabe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateSharePayloadGetLabelsAttributeType(arg *CreateSharePayloadGetLabelsAttributeType, val CreateSharePayloadGetLabelsRetType) { *arg = &val } @@ -67,8 +81,10 @@ func setCreateSharePayloadGetLabelsAttributeType(arg *CreateSharePayloadGetLabel */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateSharePayloadGetNameAttributeTypeOk(arg CreateSharePayloadGetNameAttributeType) (ret CreateSharePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -76,11 +92,15 @@ func getCreateSharePayloadGetNameAttributeTypeOk(arg CreateSharePayloadGetNameAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateSharePayloadGetNameAttributeType(arg *CreateSharePayloadGetNameAttributeType, val CreateSharePayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetNameRetType = string /* @@ -88,10 +108,16 @@ type CreateSharePayloadGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetSpaceHardLimitGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateSharePayloadGetSpaceHardLimitGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(arg CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType) (ret CreateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -99,11 +125,13 @@ func getCreateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(arg CreateSh return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateSharePayloadGetSpaceHardLimitGigabytesAttributeType(arg *CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType, val CreateSharePayloadGetSpaceHardLimitGigabytesRetType) { *arg = &val } // CreateSharePayload struct for CreateSharePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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"` @@ -118,12 +146,14 @@ type CreateSharePayload struct { SpaceHardLimitGigabytes CreateSharePayloadGetSpaceHardLimitGigabytesAttributeType `json:"spaceHardLimitGigabytes" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateSharePayload CreateSharePayload // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateSharePayload(name CreateSharePayloadGetNameArgType, spaceHardLimitGigabytes CreateSharePayloadGetSpaceHardLimitGigabytesArgType) *CreateSharePayload { this := CreateSharePayload{} setCreateSharePayloadGetNameAttributeType(&this.Name, name) @@ -134,12 +164,14 @@ func NewCreateSharePayload(name CreateSharePayloadGetNameArgType, spaceHardLimit // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetExportPolicyName() (res CreateSharePayloadGetExportPolicyNameRetType) { res, _ = o.GetExportPolicyNameOk() return @@ -148,32 +180,38 @@ func (o *CreateSharePayload) GetExportPolicyName() (res CreateSharePayloadGetExp // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetExportPolicyNameOk() (ret CreateSharePayloadGetExportPolicyNameRetType, ok bool) { return getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName) } // HasExportPolicyName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) SetExportPolicyName(v CreateSharePayloadGetExportPolicyNameRetType) { setCreateSharePayloadGetExportPolicyNameAttributeType(&o.ExportPolicyName, v) } // SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) SetExportPolicyNameNil() { o.ExportPolicyName = nil } // UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) UnsetExportPolicyName() { o.ExportPolicyName = nil } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetLabels() (res CreateSharePayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -181,22 +219,26 @@ func (o *CreateSharePayload) GetLabels() (res CreateSharePayloadGetLabelsRetType // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetLabelsOk() (ret CreateSharePayloadGetLabelsRetType, ok bool) { return getCreateSharePayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) SetLabels(v CreateSharePayloadGetLabelsRetType) { setCreateSharePayloadGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetName() (ret CreateSharePayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -204,16 +246,19 @@ func (o *CreateSharePayload) GetName() (ret CreateSharePayloadGetNameRetType) { // GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetNameOk() (ret CreateSharePayloadGetNameRetType, ok bool) { return getCreateSharePayloadGetNameAttributeTypeOk(o.Name) } // SetName sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) SetName(v CreateSharePayloadGetNameRetType) { setCreateSharePayloadGetNameAttributeType(&o.Name, v) } // GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetSpaceHardLimitGigabytes() (ret CreateSharePayloadGetSpaceHardLimitGigabytesRetType) { ret, _ = o.GetSpaceHardLimitGigabytesOk() return ret @@ -221,15 +266,18 @@ func (o *CreateSharePayload) GetSpaceHardLimitGigabytes() (ret CreateSharePayloa // GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) GetSpaceHardLimitGigabytesOk() (ret CreateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) { return getCreateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes) } // SetSpaceHardLimitGigabytes sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateSharePayload) SetSpaceHardLimitGigabytes(v CreateSharePayloadGetSpaceHardLimitGigabytesRetType) { setCreateSharePayloadGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateSharePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName); ok { @@ -247,37 +295,45 @@ func (o CreateSharePayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateSharePayload struct { value *CreateSharePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateSharePayload) Get() *CreateSharePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateSharePayload) Set(val *CreateSharePayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateSharePayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateSharePayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateSharePayload(val *CreateSharePayload) *NullableCreateSharePayload { return &NullableCreateSharePayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateSharePayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateSharePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_response.go b/services/sfs/model_create_share_response.go index bc8d95a7c..d8e63b61f 100644 --- a/services/sfs/model_create_share_response.go +++ b/services/sfs/model_create_share_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateShareResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseGetShareAttributeType = *CreateShareResponseShare + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseGetShareArgType = CreateShareResponseShare + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseGetShareRetType = CreateShareResponseShare +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseGetShareAttributeTypeOk(arg CreateShareResponseGetShareAttributeType) (ret CreateShareResponseGetShareRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getCreateShareResponseGetShareAttributeTypeOk(arg CreateShareResponseGetSha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseGetShareAttributeType(arg *CreateShareResponseGetShareAttributeType, val CreateShareResponseGetShareRetType) { *arg = &val } // CreateShareResponse struct for CreateShareResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponse struct { Share CreateShareResponseGetShareAttributeType `json:"share,omitempty"` } @@ -46,6 +55,7 @@ type CreateShareResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareResponse() *CreateShareResponse { this := CreateShareResponse{} return &this @@ -54,12 +64,14 @@ func NewCreateShareResponse() *CreateShareResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareResponseWithDefaults() *CreateShareResponse { this := CreateShareResponse{} return &this } // GetShare returns the Share field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponse) GetShare() (res CreateShareResponseGetShareRetType) { res, _ = o.GetShareOk() return @@ -67,21 +79,25 @@ func (o *CreateShareResponse) GetShare() (res CreateShareResponseGetShareRetType // GetShareOk returns a tuple with the Share field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponse) GetShareOk() (ret CreateShareResponseGetShareRetType, ok bool) { return getCreateShareResponseGetShareAttributeTypeOk(o.Share) } // HasShare returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponse) SetShare(v CreateShareResponseGetShareRetType) { setCreateShareResponseGetShareAttributeType(&o.Share, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShareResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShareResponseGetShareAttributeTypeOk(o.Share); ok { @@ -90,37 +106,45 @@ func (o CreateShareResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShareResponse struct { value *CreateShareResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareResponse) Get() *CreateShareResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareResponse) Set(val *CreateShareResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShareResponse(val *CreateShareResponse) *NullableCreateShareResponse { return &NullableCreateShareResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_create_share_response_share.go b/services/sfs/model_create_share_response_share.go index d97668c01..dd3f2e260 100644 --- a/services/sfs/model_create_share_response_share.go +++ b/services/sfs/model_create_share_response_share.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &CreateShareResponseShare{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetCreatedAtAttributeTypeOk(arg CreateShareResponseShareGetCreatedAtAttributeType) (ret CreateShareResponseShareGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getCreateShareResponseShareGetCreatedAtAttributeTypeOk(arg CreateShareRespo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetCreatedAtAttributeType(arg *CreateShareResponseShareGetCreatedAtAttributeType, val CreateShareResponseShareGetCreatedAtRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setCreateShareResponseShareGetCreatedAtAttributeType(arg *CreateShareRespon */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetExportPolicyAttributeTypeOk(arg CreateShareResponseShareGetExportPolicyAttributeType) (ret CreateShareResponseShareGetExportPolicyRetType, ok bool) { if arg == nil { return nil, false @@ -54,6 +68,7 @@ func getCreateShareResponseShareGetExportPolicyAttributeTypeOk(arg CreateShareRe return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetExportPolicyAttributeType(arg *CreateShareResponseShareGetExportPolicyAttributeType, val CreateShareResponseShareGetExportPolicyRetType) { *arg = val } @@ -63,8 +78,10 @@ func setCreateShareResponseShareGetExportPolicyAttributeType(arg *CreateShareRes */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetIdAttributeTypeOk(arg CreateShareResponseShareGetIdAttributeType) (ret CreateShareResponseShareGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getCreateShareResponseShareGetIdAttributeTypeOk(arg CreateShareResponseShar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetIdAttributeType(arg *CreateShareResponseShareGetIdAttributeType, val CreateShareResponseShareGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetIdRetType = string /* @@ -84,10 +105,16 @@ type CreateShareResponseShareGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetLabelsAttributeTypeOk(arg CreateShareResponseShareGetLabelsAttributeType) (ret CreateShareResponseShareGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +122,7 @@ func getCreateShareResponseShareGetLabelsAttributeTypeOk(arg CreateShareResponse return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetLabelsAttributeType(arg *CreateShareResponseShareGetLabelsAttributeType, val CreateShareResponseShareGetLabelsRetType) { *arg = &val } @@ -104,8 +132,10 @@ func setCreateShareResponseShareGetLabelsAttributeType(arg *CreateShareResponseS */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetMountPathAttributeTypeOk(arg CreateShareResponseShareGetMountPathAttributeType) (ret CreateShareResponseShareGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +143,15 @@ func getCreateShareResponseShareGetMountPathAttributeTypeOk(arg CreateShareRespo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetMountPathAttributeType(arg *CreateShareResponseShareGetMountPathAttributeType, val CreateShareResponseShareGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetMountPathRetType = string /* @@ -125,8 +159,10 @@ type CreateShareResponseShareGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetNameAttributeTypeOk(arg CreateShareResponseShareGetNameAttributeType) (ret CreateShareResponseShareGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -134,11 +170,15 @@ func getCreateShareResponseShareGetNameAttributeTypeOk(arg CreateShareResponseSh return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetNameAttributeType(arg *CreateShareResponseShareGetNameAttributeType, val CreateShareResponseShareGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetNameRetType = string /* @@ -146,10 +186,16 @@ type CreateShareResponseShareGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetSpaceHardLimitGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetSpaceHardLimitGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret CreateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -157,6 +203,7 @@ func getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg Cr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *CreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) { *arg = &val } @@ -166,8 +213,10 @@ func setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *Cre */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateShareResponseShareGetStateAttributeTypeOk(arg CreateShareResponseShareGetStateAttributeType) (ret CreateShareResponseShareGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -175,14 +224,19 @@ func getCreateShareResponseShareGetStateAttributeTypeOk(arg CreateShareResponseS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateShareResponseShareGetStateAttributeType(arg *CreateShareResponseShareGetStateAttributeType, val CreateShareResponseShareGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShareGetStateRetType = string // CreateShareResponseShare Created Share +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateShareResponseShare struct { CreatedAt CreateShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"` ExportPolicy CreateShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"` @@ -205,6 +259,7 @@ type CreateShareResponseShare struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareResponseShare() *CreateShareResponseShare { this := CreateShareResponseShare{} return &this @@ -213,12 +268,14 @@ func NewCreateShareResponseShare() *CreateShareResponseShare { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateShareResponseShareWithDefaults() *CreateShareResponseShare { this := CreateShareResponseShare{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetCreatedAt() (res CreateShareResponseShareGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -226,22 +283,26 @@ func (o *CreateShareResponseShare) GetCreatedAt() (res CreateShareResponseShareG // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetCreatedAtOk() (ret CreateShareResponseShareGetCreatedAtRetType, ok bool) { return getCreateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetExportPolicy() (res CreateShareResponseShareGetExportPolicyRetType) { res, _ = o.GetExportPolicyOk() return @@ -250,32 +311,38 @@ func (o *CreateShareResponseShare) GetExportPolicy() (res CreateShareResponseSha // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetExportPolicyOk() (ret CreateShareResponseShareGetExportPolicyRetType, ok bool) { return getCreateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy) } // HasExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetExportPolicy(v CreateShareResponseShareGetExportPolicyRetType) { setCreateShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v) } // SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetExportPolicyNil() { o.ExportPolicy = nil } // UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) UnsetExportPolicy() { o.ExportPolicy = nil } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetId() (res CreateShareResponseShareGetIdRetType) { res, _ = o.GetIdOk() return @@ -283,22 +350,26 @@ func (o *CreateShareResponseShare) GetId() (res CreateShareResponseShareGetIdRet // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetIdOk() (ret CreateShareResponseShareGetIdRetType, ok bool) { return getCreateShareResponseShareGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetId(v CreateShareResponseShareGetIdRetType) { setCreateShareResponseShareGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetLabels() (res CreateShareResponseShareGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -306,22 +377,26 @@ func (o *CreateShareResponseShare) GetLabels() (res CreateShareResponseShareGetL // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetLabelsOk() (ret CreateShareResponseShareGetLabelsRetType, ok bool) { return getCreateShareResponseShareGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetLabels(v CreateShareResponseShareGetLabelsRetType) { setCreateShareResponseShareGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetMountPath() (res CreateShareResponseShareGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -329,22 +404,26 @@ func (o *CreateShareResponseShare) GetMountPath() (res CreateShareResponseShareG // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetMountPathOk() (ret CreateShareResponseShareGetMountPathRetType, ok bool) { return getCreateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetMountPath(v CreateShareResponseShareGetMountPathRetType) { setCreateShareResponseShareGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetName() (res CreateShareResponseShareGetNameRetType) { res, _ = o.GetNameOk() return @@ -352,22 +431,26 @@ func (o *CreateShareResponseShare) GetName() (res CreateShareResponseShareGetNam // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetNameOk() (ret CreateShareResponseShareGetNameRetType, ok bool) { return getCreateShareResponseShareGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetName(v CreateShareResponseShareGetNameRetType) { setCreateShareResponseShareGetNameAttributeType(&o.Name, v) } // GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetSpaceHardLimitGigabytes() (res CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) { res, _ = o.GetSpaceHardLimitGigabytesOk() return @@ -375,22 +458,26 @@ func (o *CreateShareResponseShare) GetSpaceHardLimitGigabytes() (res CreateShare // GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret CreateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) { return getCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes) } // HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetSpaceHardLimitGigabytes(v CreateShareResponseShareGetSpaceHardLimitGigabytesRetType) { setCreateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetState() (res CreateShareResponseShareGetStateRetType) { res, _ = o.GetStateOk() return @@ -398,21 +485,25 @@ func (o *CreateShareResponseShare) GetState() (res CreateShareResponseShareGetSt // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) GetStateOk() (ret CreateShareResponseShareGetStateRetType, ok bool) { return getCreateShareResponseShareGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateShareResponseShare) SetState(v CreateShareResponseShareGetStateRetType) { setCreateShareResponseShareGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateShareResponseShare) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -442,37 +533,45 @@ func (o CreateShareResponseShare) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableCreateShareResponseShare struct { value *CreateShareResponseShare isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareResponseShare) Get() *CreateShareResponseShare { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareResponseShare) Set(val *CreateShareResponseShare) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareResponseShare) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareResponseShare) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableCreateShareResponseShare(val *CreateShareResponseShare) *NullableCreateShareResponseShare { return &NullableCreateShareResponseShare{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateShareResponseShare) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateShareResponseShare) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_error.go b/services/sfs/model_error.go index 189e32d8e..ed2c96c18 100644 --- a/services/sfs/model_error.go +++ b/services/sfs/model_error.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Error{} */ // isAny +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetErrorDescriptionAttributeType = any + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetErrorDescriptionArgType = any + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetErrorDescriptionRetType = any +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetErrorDescriptionAttributeTypeOk(arg ErrorGetErrorDescriptionAttributeType) (ret ErrorGetErrorDescriptionRetType, ok bool) { if arg == nil { return nil, false @@ -33,6 +40,7 @@ func getErrorGetErrorDescriptionAttributeTypeOk(arg ErrorGetErrorDescriptionAttr return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetErrorDescriptionAttributeType(arg *ErrorGetErrorDescriptionAttributeType, val ErrorGetErrorDescriptionRetType) { *arg = val } @@ -42,8 +50,10 @@ func setErrorGetErrorDescriptionAttributeType(arg *ErrorGetErrorDescriptionAttri */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTitleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetTitleAttributeTypeOk(arg ErrorGetTitleAttributeType) (ret ErrorGetTitleRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getErrorGetTitleAttributeTypeOk(arg ErrorGetTitleAttributeType) (ret ErrorG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetTitleAttributeType(arg *ErrorGetTitleAttributeType, val ErrorGetTitleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTitleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTitleRetType = string /* @@ -63,8 +77,10 @@ type ErrorGetTitleRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTypeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetTypeAttributeTypeOk(arg ErrorGetTypeAttributeType) (ret ErrorGetTypeRetType, ok bool) { if arg == nil { return ret, false @@ -72,14 +88,19 @@ func getErrorGetTypeAttributeTypeOk(arg ErrorGetTypeAttributeType) (ret ErrorGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetTypeAttributeType(arg *ErrorGetTypeAttributeType, val ErrorGetTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetTypeRetType = string // Error struct for Error +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Error struct { // Deprecated: Human-readable string of the error that occured ErrorDescription ErrorGetErrorDescriptionAttributeType `json:"error_description,omitempty"` @@ -91,12 +112,14 @@ type Error struct { Type ErrorGetTypeAttributeType `json:"type" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewError(title ErrorGetTitleArgType, types ErrorGetTypeArgType) *Error { this := Error{} setErrorGetTitleAttributeType(&this.Title, title) @@ -107,13 +130,14 @@ func NewError(title ErrorGetTitleArgType, types ErrorGetTypeArgType) *Error { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetErrorDescription() (res ErrorGetErrorDescriptionRetType) { res, _ = o.GetErrorDescriptionOk() return @@ -122,24 +146,26 @@ func (o *Error) GetErrorDescription() (res ErrorGetErrorDescriptionRetType) { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetErrorDescriptionOk() (ret ErrorGetErrorDescriptionRetType, ok bool) { return getErrorGetErrorDescriptionAttributeTypeOk(o.ErrorDescription) } // HasErrorDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetErrorDescription(v ErrorGetErrorDescriptionRetType) { setErrorGetErrorDescriptionAttributeType(&o.ErrorDescription, v) } // GetTitle returns the Title field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetTitle() (ret ErrorGetTitleRetType) { ret, _ = o.GetTitleOk() return ret @@ -147,16 +173,19 @@ func (o *Error) GetTitle() (ret ErrorGetTitleRetType) { // GetTitleOk returns a tuple with the Title field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetTitleOk() (ret ErrorGetTitleRetType, ok bool) { return getErrorGetTitleAttributeTypeOk(o.Title) } // SetTitle sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetTitle(v ErrorGetTitleRetType) { setErrorGetTitleAttributeType(&o.Title, v) } // GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetType() (ret ErrorGetTypeRetType) { ret, _ = o.GetTypeOk() return ret @@ -164,15 +193,18 @@ func (o *Error) GetType() (ret ErrorGetTypeRetType) { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) GetTypeOk() (ret ErrorGetTypeRetType, ok bool) { return getErrorGetTypeAttributeTypeOk(o.Type) } // SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetType(v ErrorGetTypeRetType) { setErrorGetTypeAttributeType(&o.Type, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Error) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getErrorGetErrorDescriptionAttributeTypeOk(o.ErrorDescription); ok { @@ -187,37 +219,45 @@ func (o Error) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableError struct { value *Error isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableError) Get() *Error { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableError) Set(val *Error) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableError) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableError) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableError(val *Error) *NullableError { return &NullableError{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_resource_pool_response.go b/services/sfs/model_get_resource_pool_response.go index 73aaf255b..4175cc5a7 100644 --- a/services/sfs/model_get_resource_pool_response.go +++ b/services/sfs/model_get_resource_pool_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetResourcePoolResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseGetResourcePoolAttributeType = *GetResourcePoolResponseResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseGetResourcePoolArgType = GetResourcePoolResponseResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseGetResourcePoolRetType = GetResourcePoolResponseResourcePool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(arg GetResourcePoolResponseGetResourcePoolAttributeType) (ret GetResourcePoolResponseGetResourcePoolRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(arg GetResourcePoo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseGetResourcePoolAttributeType(arg *GetResourcePoolResponseGetResourcePoolAttributeType, val GetResourcePoolResponseGetResourcePoolRetType) { *arg = &val } // GetResourcePoolResponse struct for GetResourcePoolResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponse struct { ResourcePool GetResourcePoolResponseGetResourcePoolAttributeType `json:"resourcePool,omitempty"` } @@ -46,6 +55,7 @@ type GetResourcePoolResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolResponse() *GetResourcePoolResponse { this := GetResourcePoolResponse{} return &this @@ -54,12 +64,14 @@ func NewGetResourcePoolResponse() *GetResourcePoolResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolResponseWithDefaults() *GetResourcePoolResponse { this := GetResourcePoolResponse{} return &this } // GetResourcePool returns the ResourcePool field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponse) GetResourcePool() (res GetResourcePoolResponseGetResourcePoolRetType) { res, _ = o.GetResourcePoolOk() return @@ -67,21 +79,25 @@ func (o *GetResourcePoolResponse) GetResourcePool() (res GetResourcePoolResponse // GetResourcePoolOk returns a tuple with the ResourcePool field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponse) GetResourcePoolOk() (ret GetResourcePoolResponseGetResourcePoolRetType, ok bool) { return getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool) } // HasResourcePool returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponse) SetResourcePool(v GetResourcePoolResponseGetResourcePoolRetType) { setGetResourcePoolResponseGetResourcePoolAttributeType(&o.ResourcePool, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetResourcePoolResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool); ok { @@ -90,37 +106,45 @@ func (o GetResourcePoolResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetResourcePoolResponse struct { value *GetResourcePoolResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolResponse) Get() *GetResourcePoolResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolResponse) Set(val *GetResourcePoolResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetResourcePoolResponse(val *GetResourcePoolResponse) *NullableGetResourcePoolResponse { return &NullableGetResourcePoolResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_resource_pool_response_resource_pool.go b/services/sfs/model_get_resource_pool_response_resource_pool.go index 3885f2228..135ae9efb 100644 --- a/services/sfs/model_get_resource_pool_response_resource_pool.go +++ b/services/sfs/model_get_resource_pool_response_resource_pool.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &GetResourcePoolResponseResourcePool{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType) (ret GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(ar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(arg *GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType, val GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetAvailabilityZoneArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string /* @@ -44,10 +51,16 @@ type GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetCountSharesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetCountSharesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetCountSharesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetCountSharesAttributeType) (ret GetResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +68,7 @@ func getGetResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg Get return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *GetResourcePoolResponseResourcePoolGetCountSharesAttributeType, val GetResourcePoolResponseResourcePoolGetCountSharesRetType) { *arg = &val } @@ -64,10 +78,16 @@ func setGetResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *GetR */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType) (ret GetResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getGetResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg GetRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *GetResourcePoolResponseResourcePoolGetCreatedAtAttributeType, val GetResourcePoolResponseResourcePoolGetCreatedAtRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setGetResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *GetRes */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetIdAttributeType) (ret GetResourcePoolResponseResourcePoolGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getGetResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg GetResourceP return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetIdAttributeType(arg *GetResourcePoolResponseResourcePoolGetIdAttributeType, val GetResourcePoolResponseResourcePoolGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetIdRetType = string /* @@ -105,10 +132,16 @@ type GetResourcePoolResponseResourcePoolGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetIpAclAttributeType) (ret GetResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getGetResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg GetResour return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *GetResourcePoolResponseResourcePoolGetIpAclAttributeType, val GetResourcePoolResponseResourcePoolGetIpAclRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setGetResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *GetResourc */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetLabelsAttributeType) (ret GetResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +176,7 @@ func getGetResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg GetResou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *GetResourcePoolResponseResourcePoolGetLabelsAttributeType, val GetResourcePoolResponseResourcePoolGetLabelsRetType) { *arg = &val } @@ -145,8 +186,10 @@ func setGetResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *GetResour */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetMountPathAttributeType) (ret GetResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -154,11 +197,15 @@ func getGetResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg GetRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetMountPathAttributeType(arg *GetResourcePoolResponseResourcePoolGetMountPathAttributeType, val GetResourcePoolResponseResourcePoolGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetMountPathRetType = string /* @@ -166,8 +213,10 @@ type GetResourcePoolResponseResourcePoolGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetNameAttributeType) (ret GetResourcePoolResponseResourcePoolGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -175,11 +224,15 @@ func getGetResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg GetResourc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetNameAttributeType(arg *GetResourcePoolResponseResourcePoolGetNameAttributeType, val GetResourcePoolResponseResourcePoolGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetNameRetType = string /* @@ -187,10 +240,16 @@ type GetResourcePoolResponseResourcePoolGetNameRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType) (ret GetResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false @@ -198,6 +257,7 @@ func getGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(ar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg *GetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType, val GetResourcePoolResponseResourcePoolGetPerformanceClassRetType) { *arg = &val } @@ -207,10 +267,16 @@ func setGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { if arg == nil { return ret, false @@ -218,6 +284,7 @@ func getGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType, val GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { *arg = &val } @@ -227,10 +294,16 @@ func setGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttr */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetSizeReducibleAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType) (ret GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) { if arg == nil { return ret, false @@ -238,6 +311,7 @@ func getGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg *GetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType, val GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { *arg = &val } @@ -247,10 +321,16 @@ func setGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg * */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType) (ret GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { if arg == nil { return ret, false @@ -258,6 +338,7 @@ func getGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(arg *GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType, val GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { *arg = &val } @@ -267,10 +348,16 @@ func setGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(a */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetSpaceAttributeType = *ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetSpaceArgType = ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetSpaceRetType = ResourcePoolSpace +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetSpaceAttributeType) (ret GetResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) { if arg == nil { return ret, false @@ -278,6 +365,7 @@ func getGetResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg GetResour return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *GetResourcePoolResponseResourcePoolGetSpaceAttributeType, val GetResourcePoolResponseResourcePoolGetSpaceRetType) { *arg = &val } @@ -287,8 +375,10 @@ func setGetResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *GetResourc */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg GetResourcePoolResponseResourcePoolGetStateAttributeType) (ret GetResourcePoolResponseResourcePoolGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -296,14 +386,19 @@ func getGetResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg GetResour return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolResponseResourcePoolGetStateAttributeType(arg *GetResourcePoolResponseResourcePoolGetStateAttributeType, val GetResourcePoolResponseResourcePoolGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePoolGetStateRetType = string // GetResourcePoolResponseResourcePool Resource Pool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolResponseResourcePool struct { // Name of the respective availability zone AvailabilityZone GetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` @@ -336,6 +431,7 @@ type GetResourcePoolResponseResourcePool struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolResponseResourcePool() *GetResourcePoolResponseResourcePool { this := GetResourcePoolResponseResourcePool{} return &this @@ -344,6 +440,7 @@ func NewGetResourcePoolResponseResourcePool() *GetResourcePoolResponseResourcePo // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolResponseResourcePoolWithDefaults() *GetResourcePoolResponseResourcePool { this := GetResourcePoolResponseResourcePool{} var snapshotsAreVisible bool = false @@ -352,6 +449,7 @@ func NewGetResourcePoolResponseResourcePoolWithDefaults() *GetResourcePoolRespon } // GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetAvailabilityZone() (res GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { res, _ = o.GetAvailabilityZoneOk() return @@ -359,22 +457,26 @@ func (o *GetResourcePoolResponseResourcePool) GetAvailabilityZone() (res GetReso // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetAvailabilityZoneOk() (ret GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) } // HasAvailabilityZone returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetAvailabilityZone(v GetResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { setGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) } // GetCountShares returns the CountShares field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetCountShares() (res GetResourcePoolResponseResourcePoolGetCountSharesRetType) { res, _ = o.GetCountSharesOk() return @@ -382,22 +484,26 @@ func (o *GetResourcePoolResponseResourcePool) GetCountShares() (res GetResourceP // GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetCountSharesOk() (ret GetResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares) } // HasCountShares returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetCountShares(v GetResourcePoolResponseResourcePoolGetCountSharesRetType) { setGetResourcePoolResponseResourcePoolGetCountSharesAttributeType(&o.CountShares, v) } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetCreatedAt() (res GetResourcePoolResponseResourcePoolGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -405,22 +511,26 @@ func (o *GetResourcePoolResponseResourcePool) GetCreatedAt() (res GetResourcePoo // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetCreatedAtOk() (ret GetResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetCreatedAt(v GetResourcePoolResponseResourcePoolGetCreatedAtRetType) { setGetResourcePoolResponseResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetId() (res GetResourcePoolResponseResourcePoolGetIdRetType) { res, _ = o.GetIdOk() return @@ -428,22 +538,26 @@ func (o *GetResourcePoolResponseResourcePool) GetId() (res GetResourcePoolRespon // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetIdOk() (ret GetResourcePoolResponseResourcePoolGetIdRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetId(v GetResourcePoolResponseResourcePoolGetIdRetType) { setGetResourcePoolResponseResourcePoolGetIdAttributeType(&o.Id, v) } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetIpAcl() (res GetResourcePoolResponseResourcePoolGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -451,22 +565,26 @@ func (o *GetResourcePoolResponseResourcePool) GetIpAcl() (res GetResourcePoolRes // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetIpAclOk() (ret GetResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetIpAcl(v GetResourcePoolResponseResourcePoolGetIpAclRetType) { setGetResourcePoolResponseResourcePoolGetIpAclAttributeType(&o.IpAcl, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetLabels() (res GetResourcePoolResponseResourcePoolGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -474,22 +592,26 @@ func (o *GetResourcePoolResponseResourcePool) GetLabels() (res GetResourcePoolRe // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetLabelsOk() (ret GetResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetLabels(v GetResourcePoolResponseResourcePoolGetLabelsRetType) { setGetResourcePoolResponseResourcePoolGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetMountPath() (res GetResourcePoolResponseResourcePoolGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -497,22 +619,26 @@ func (o *GetResourcePoolResponseResourcePool) GetMountPath() (res GetResourcePoo // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetMountPathOk() (ret GetResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetMountPath(v GetResourcePoolResponseResourcePoolGetMountPathRetType) { setGetResourcePoolResponseResourcePoolGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetName() (res GetResourcePoolResponseResourcePoolGetNameRetType) { res, _ = o.GetNameOk() return @@ -520,22 +646,26 @@ func (o *GetResourcePoolResponseResourcePool) GetName() (res GetResourcePoolResp // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetNameOk() (ret GetResourcePoolResponseResourcePoolGetNameRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetName(v GetResourcePoolResponseResourcePoolGetNameRetType) { setGetResourcePoolResponseResourcePoolGetNameAttributeType(&o.Name, v) } // GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetPerformanceClass() (res GetResourcePoolResponseResourcePoolGetPerformanceClassRetType) { res, _ = o.GetPerformanceClassOk() return @@ -543,22 +673,26 @@ func (o *GetResourcePoolResponseResourcePool) GetPerformanceClass() (res GetReso // GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetPerformanceClassOk() (ret GetResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // HasPerformanceClass returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetPerformanceClass(v GetResourcePoolResponseResourcePoolGetPerformanceClassRetType) { setGetResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v) } // GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt() (res GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { res, _ = o.GetPerformanceClassDowngradableAtOk() return @@ -566,22 +700,26 @@ func (o *GetResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt( // GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAtOk() (ret GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt) } // HasPerformanceClassDowngradableAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetPerformanceClassDowngradableAt(v GetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { setGetResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v) } // GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetSizeReducibleAt() (res GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { res, _ = o.GetSizeReducibleAtOk() return @@ -589,22 +727,26 @@ func (o *GetResourcePoolResponseResourcePool) GetSizeReducibleAt() (res GetResou // GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetSizeReducibleAtOk() (ret GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt) } // HasSizeReducibleAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetSizeReducibleAt(v GetResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { setGetResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v) } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { res, _ = o.GetSnapshotsAreVisibleOk() return @@ -612,22 +754,26 @@ func (o *GetResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res GetR // GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetSnapshotsAreVisibleOk() (ret GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { return getGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible) } // HasSnapshotsAreVisible returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetSnapshotsAreVisible(v GetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { setGetResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v) } // GetSpace returns the Space field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetSpace() (res GetResourcePoolResponseResourcePoolGetSpaceRetType) { res, _ = o.GetSpaceOk() return @@ -635,22 +781,26 @@ func (o *GetResourcePoolResponseResourcePool) GetSpace() (res GetResourcePoolRes // GetSpaceOk returns a tuple with the Space field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetSpaceOk() (ret GetResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space) } // HasSpace returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetSpace(v GetResourcePoolResponseResourcePoolGetSpaceRetType) { setGetResourcePoolResponseResourcePoolGetSpaceAttributeType(&o.Space, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetState() (res GetResourcePoolResponseResourcePoolGetStateRetType) { res, _ = o.GetStateOk() return @@ -658,21 +808,25 @@ func (o *GetResourcePoolResponseResourcePool) GetState() (res GetResourcePoolRes // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) GetStateOk() (ret GetResourcePoolResponseResourcePoolGetStateRetType, ok bool) { return getGetResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolResponseResourcePool) SetState(v GetResourcePoolResponseResourcePoolGetStateRetType) { setGetResourcePoolResponseResourcePoolGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { @@ -720,37 +874,45 @@ func (o GetResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, er return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetResourcePoolResponseResourcePool struct { value *GetResourcePoolResponseResourcePool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolResponseResourcePool) Get() *GetResourcePoolResponseResourcePool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolResponseResourcePool) Set(val *GetResourcePoolResponseResourcePool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolResponseResourcePool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolResponseResourcePool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetResourcePoolResponseResourcePool(val *GetResourcePoolResponseResourcePool) *NullableGetResourcePoolResponseResourcePool { return &NullableGetResourcePoolResponseResourcePool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolResponseResourcePool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolResponseResourcePool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_resource_pool_snapshot_response.go b/services/sfs/model_get_resource_pool_snapshot_response.go index 06c531f6d..07d89ef19 100644 --- a/services/sfs/model_get_resource_pool_snapshot_response.go +++ b/services/sfs/model_get_resource_pool_snapshot_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetResourcePoolSnapshotResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType = *GetResourcePoolSnapshotResponseResourcePoolSnapshot + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseGetResourcePoolSnapshotArgType = GetResourcePoolSnapshotResponseResourcePoolSnapshot + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType = GetResourcePoolSnapshotResponseResourcePoolSnapshot +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(arg GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType) (ret GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(ar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(arg *GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType, val GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) { *arg = &val } // GetResourcePoolSnapshotResponse struct for GetResourcePoolSnapshotResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponse struct { ResourcePoolSnapshot GetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType `json:"resourcePoolSnapshot,omitempty"` } @@ -46,6 +55,7 @@ type GetResourcePoolSnapshotResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolSnapshotResponse() *GetResourcePoolSnapshotResponse { this := GetResourcePoolSnapshotResponse{} return &this @@ -54,12 +64,14 @@ func NewGetResourcePoolSnapshotResponse() *GetResourcePoolSnapshotResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolSnapshotResponseWithDefaults() *GetResourcePoolSnapshotResponse { this := GetResourcePoolSnapshotResponse{} return &this } // GetResourcePoolSnapshot returns the ResourcePoolSnapshot field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponse) GetResourcePoolSnapshot() (res GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) { res, _ = o.GetResourcePoolSnapshotOk() return @@ -67,21 +79,25 @@ func (o *GetResourcePoolSnapshotResponse) GetResourcePoolSnapshot() (res GetReso // GetResourcePoolSnapshotOk returns a tuple with the ResourcePoolSnapshot field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponse) GetResourcePoolSnapshotOk() (ret GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType, ok bool) { return getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot) } // HasResourcePoolSnapshot returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v GetResourcePoolSnapshotResponseGetResourcePoolSnapshotRetType) { setGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeType(&o.ResourcePoolSnapshot, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetResourcePoolSnapshotResponseGetResourcePoolSnapshotAttributeTypeOk(o.ResourcePoolSnapshot); ok { @@ -90,37 +106,45 @@ func (o GetResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetResourcePoolSnapshotResponse struct { value *GetResourcePoolSnapshotResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolSnapshotResponse) Get() *GetResourcePoolSnapshotResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolSnapshotResponse) Set(val *GetResourcePoolSnapshotResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolSnapshotResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolSnapshotResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetResourcePoolSnapshotResponse(val *GetResourcePoolSnapshotResponse) *NullableGetResourcePoolSnapshotResponse { return &NullableGetResourcePoolSnapshotResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolSnapshotResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_resource_pool_snapshot_response_resource_pool_snapshot.go b/services/sfs/model_get_resource_pool_snapshot_response_resource_pool_snapshot.go index 3a50954b6..ed731e92b 100644 --- a/services/sfs/model_get_resource_pool_snapshot_response_resource_pool_snapshot.go +++ b/services/sfs/model_get_resource_pool_snapshot_response_resource_pool_snapshot.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &GetResourcePoolSnapshotResponseResourcePoolSnapshot{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) { if arg == nil { return nil, false @@ -32,6 +35,7 @@ func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTy return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -40,7 +44,10 @@ func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTy } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType = *string /* @@ -48,10 +55,16 @@ type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType = *str */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -59,6 +72,7 @@ func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttribute return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) { *arg = &val } @@ -68,10 +82,16 @@ func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttribute */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -79,6 +99,7 @@ func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabyt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { *arg = &val } @@ -88,8 +109,10 @@ func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabyt */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) { if arg == nil { return ret, false @@ -97,11 +120,15 @@ func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType = string /* @@ -109,10 +136,16 @@ type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -120,6 +153,7 @@ func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttri return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) { *arg = &val } @@ -129,8 +163,10 @@ func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttri */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType) (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) { if arg == nil { return ret, false @@ -138,14 +174,19 @@ func getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(arg *GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType, val GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType = string // GetResourcePoolSnapshotResponseResourcePoolSnapshot Resource Pool Snapshot +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetResourcePoolSnapshotResponseResourcePoolSnapshot struct { // (optional) A comment to add more information about a snapshot Comment GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"` @@ -166,6 +207,7 @@ type GetResourcePoolSnapshotResponseResourcePoolSnapshot struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetResourcePoolSnapshotResponseResourcePoolSnapshot() *GetResourcePoolSnapshotResponseResourcePoolSnapshot { this := GetResourcePoolSnapshotResponseResourcePoolSnapshot{} return &this @@ -174,12 +216,14 @@ func NewGetResourcePoolSnapshotResponseResourcePoolSnapshot() *GetResourcePoolSn // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetComment() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) { res, _ = o.GetCommentOk() return @@ -188,32 +232,38 @@ func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetComment() (res // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCommentOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType, ok bool) { return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetComment(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentRetType) { setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v) } // SetCommentNil sets the value for Comment to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetCommentNil() { o.Comment = nil } // UnsetComment ensures that no value is present for Comment, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) UnsetComment() { o.Comment = nil } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAt() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -221,22 +271,26 @@ func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAt() (re // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetCreatedAtOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType, ok bool) { return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetCreatedAt(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtRetType) { setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytes() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { res, _ = o.GetLogicalSizeGigabytesOk() return @@ -244,22 +298,26 @@ func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGiga // GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) { return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes) } // HasLogicalSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetLogicalSizeGigabytes(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v) } // GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolId() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) { res, _ = o.GetResourcePoolIdOk() return @@ -267,22 +325,26 @@ func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolId( // GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetResourcePoolIdOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) { return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId) } // HasResourcePoolId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetResourcePoolId(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdRetType) { setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v) } // GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytes() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) { res, _ = o.GetSizeGigabytesOk() return @@ -290,22 +352,26 @@ func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytes() // GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSizeGigabytesOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) { return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes) } // HasSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetSizeGigabytes(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesRetType) { setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v) } // GetSnapshotName returns the SnapshotName field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotName() (res GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) { res, _ = o.GetSnapshotNameOk() return @@ -313,21 +379,25 @@ func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotName() // GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) GetSnapshotNameOk() (ret GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType, ok bool) { return getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName) } // HasSnapshotName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetResourcePoolSnapshotResponseResourcePoolSnapshot) SetSnapshotName(v GetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameRetType) { setGetResourcePoolSnapshotResponseResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetResourcePoolSnapshotResponseResourcePoolSnapshot) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetResourcePoolSnapshotResponseResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok { @@ -351,37 +421,45 @@ func (o GetResourcePoolSnapshotResponseResourcePoolSnapshot) ToMap() (map[string return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot struct { value *GetResourcePoolSnapshotResponseResourcePoolSnapshot isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) Get() *GetResourcePoolSnapshotResponseResourcePoolSnapshot { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) Set(val *GetResourcePoolSnapshotResponseResourcePoolSnapshot) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetResourcePoolSnapshotResponseResourcePoolSnapshot(val *GetResourcePoolSnapshotResponseResourcePoolSnapshot) *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot { return &NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetResourcePoolSnapshotResponseResourcePoolSnapshot) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_share_export_policy_response.go b/services/sfs/model_get_share_export_policy_response.go index b42fb12c4..99efbce25 100644 --- a/services/sfs/model_get_share_export_policy_response.go +++ b/services/sfs/model_get_share_export_policy_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetShareExportPolicyResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseGetShareExportPolicyAttributeType = *GetShareExportPolicyResponseShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseGetShareExportPolicyArgType = GetShareExportPolicyResponseShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseGetShareExportPolicyRetType = GetShareExportPolicyResponseShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg GetShareExportPolicyResponseGetShareExportPolicyAttributeType) (ret GetShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg GetS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseGetShareExportPolicyAttributeType(arg *GetShareExportPolicyResponseGetShareExportPolicyAttributeType, val GetShareExportPolicyResponseGetShareExportPolicyRetType) { *arg = &val } // GetShareExportPolicyResponse struct for GetShareExportPolicyResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponse struct { ShareExportPolicy GetShareExportPolicyResponseGetShareExportPolicyAttributeType `json:"shareExportPolicy,omitempty"` } @@ -46,6 +55,7 @@ type GetShareExportPolicyResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareExportPolicyResponse() *GetShareExportPolicyResponse { this := GetShareExportPolicyResponse{} return &this @@ -54,12 +64,14 @@ func NewGetShareExportPolicyResponse() *GetShareExportPolicyResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareExportPolicyResponseWithDefaults() *GetShareExportPolicyResponse { this := GetShareExportPolicyResponse{} return &this } // GetShareExportPolicy returns the ShareExportPolicy field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponse) GetShareExportPolicy() (res GetShareExportPolicyResponseGetShareExportPolicyRetType) { res, _ = o.GetShareExportPolicyOk() return @@ -67,21 +79,25 @@ func (o *GetShareExportPolicyResponse) GetShareExportPolicy() (res GetShareExpor // GetShareExportPolicyOk returns a tuple with the ShareExportPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponse) GetShareExportPolicyOk() (ret GetShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) { return getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy) } // HasShareExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponse) SetShareExportPolicy(v GetShareExportPolicyResponseGetShareExportPolicyRetType) { setGetShareExportPolicyResponseGetShareExportPolicyAttributeType(&o.ShareExportPolicy, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy); ok { @@ -90,37 +106,45 @@ func (o GetShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetShareExportPolicyResponse struct { value *GetShareExportPolicyResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareExportPolicyResponse) Get() *GetShareExportPolicyResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareExportPolicyResponse) Set(val *GetShareExportPolicyResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareExportPolicyResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareExportPolicyResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetShareExportPolicyResponse(val *GetShareExportPolicyResponse) *NullableGetShareExportPolicyResponse { return &NullableGetShareExportPolicyResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareExportPolicyResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareExportPolicyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_share_export_policy_response_share_export_policy.go b/services/sfs/model_get_share_export_policy_response_share_export_policy.go index 75a26e9a9..eeeca573c 100644 --- a/services/sfs/model_get_share_export_policy_response_share_export_policy.go +++ b/services/sfs/model_get_share_export_policy_response_share_export_policy.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &GetShareExportPolicyResponseShareExportPolicy{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) { *arg = &val } @@ -43,8 +51,10 @@ func setGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(a */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +62,15 @@ func getGetShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(arg Ge return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseShareExportPolicyGetIdAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetIdAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetIdRetType = string /* @@ -64,10 +78,16 @@ type GetShareExportPolicyResponseShareExportPolicyGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(ar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(arg */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getGetShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseShareExportPolicyGetNameAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetNameAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetNameRetType = string /* @@ -105,10 +132,16 @@ type GetShareExportPolicyResponseShareExportPolicyGetNameRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetRulesArgType = []ShareExportPolicyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetRulesRetType = []ShareExportPolicyRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetRulesRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(arg * */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) { if arg == nil { return ret, false @@ -136,11 +176,13 @@ func getGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(arg *GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType, val GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) { *arg = &val } // GetShareExportPolicyResponseShareExportPolicy Share Export Policies +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareExportPolicyResponseShareExportPolicy struct { CreatedAt GetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"` // ID of the Share Export Policy @@ -160,6 +202,7 @@ type GetShareExportPolicyResponseShareExportPolicy struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareExportPolicyResponseShareExportPolicy() *GetShareExportPolicyResponseShareExportPolicy { this := GetShareExportPolicyResponseShareExportPolicy{} return &this @@ -168,12 +211,14 @@ func NewGetShareExportPolicyResponseShareExportPolicy() *GetShareExportPolicyRes // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareExportPolicyResponseShareExportPolicyWithDefaults() *GetShareExportPolicyResponseShareExportPolicy { this := GetShareExportPolicyResponseShareExportPolicy{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetCreatedAt() (res GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -181,22 +226,26 @@ func (o *GetShareExportPolicyResponseShareExportPolicy) GetCreatedAt() (res GetS // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetCreatedAtOk() (ret GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType, ok bool) { return getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) SetCreatedAt(v GetShareExportPolicyResponseShareExportPolicyGetCreatedAtRetType) { setGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetId() (res GetShareExportPolicyResponseShareExportPolicyGetIdRetType) { res, _ = o.GetIdOk() return @@ -204,22 +253,26 @@ func (o *GetShareExportPolicyResponseShareExportPolicy) GetId() (res GetShareExp // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetIdOk() (ret GetShareExportPolicyResponseShareExportPolicyGetIdRetType, ok bool) { return getGetShareExportPolicyResponseShareExportPolicyGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) SetId(v GetShareExportPolicyResponseShareExportPolicyGetIdRetType) { setGetShareExportPolicyResponseShareExportPolicyGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetLabels() (res GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -227,22 +280,26 @@ func (o *GetShareExportPolicyResponseShareExportPolicy) GetLabels() (res GetShar // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetLabelsOk() (ret GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType, ok bool) { return getGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) SetLabels(v GetShareExportPolicyResponseShareExportPolicyGetLabelsRetType) { setGetShareExportPolicyResponseShareExportPolicyGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetName() (res GetShareExportPolicyResponseShareExportPolicyGetNameRetType) { res, _ = o.GetNameOk() return @@ -250,22 +307,26 @@ func (o *GetShareExportPolicyResponseShareExportPolicy) GetName() (res GetShareE // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetNameOk() (ret GetShareExportPolicyResponseShareExportPolicyGetNameRetType, ok bool) { return getGetShareExportPolicyResponseShareExportPolicyGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) SetName(v GetShareExportPolicyResponseShareExportPolicyGetNameRetType) { setGetShareExportPolicyResponseShareExportPolicyGetNameAttributeType(&o.Name, v) } // GetRules returns the Rules field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetRules() (res GetShareExportPolicyResponseShareExportPolicyGetRulesRetType) { res, _ = o.GetRulesOk() return @@ -273,22 +334,26 @@ func (o *GetShareExportPolicyResponseShareExportPolicy) GetRules() (res GetShare // GetRulesOk returns a tuple with the Rules field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetRulesOk() (ret GetShareExportPolicyResponseShareExportPolicyGetRulesRetType, ok bool) { return getGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeTypeOk(o.Rules) } // HasRules returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) SetRules(v GetShareExportPolicyResponseShareExportPolicyGetRulesRetType) { setGetShareExportPolicyResponseShareExportPolicyGetRulesAttributeType(&o.Rules, v) } // GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicy() (res GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) { res, _ = o.GetSharesUsingExportPolicyOk() return @@ -296,21 +361,25 @@ func (o *GetShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPoli // GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) GetSharesUsingExportPolicyOk() (ret GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) { return getGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy) } // HasSharesUsingExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareExportPolicyResponseShareExportPolicy) SetSharesUsingExportPolicy(v GetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyRetType) { setGetShareExportPolicyResponseShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetShareExportPolicyResponseShareExportPolicy) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetShareExportPolicyResponseShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -334,37 +403,45 @@ func (o GetShareExportPolicyResponseShareExportPolicy) ToMap() (map[string]inter return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetShareExportPolicyResponseShareExportPolicy struct { value *GetShareExportPolicyResponseShareExportPolicy isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareExportPolicyResponseShareExportPolicy) Get() *GetShareExportPolicyResponseShareExportPolicy { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareExportPolicyResponseShareExportPolicy) Set(val *GetShareExportPolicyResponseShareExportPolicy) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareExportPolicyResponseShareExportPolicy) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareExportPolicyResponseShareExportPolicy) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetShareExportPolicyResponseShareExportPolicy(val *GetShareExportPolicyResponseShareExportPolicy) *NullableGetShareExportPolicyResponseShareExportPolicy { return &NullableGetShareExportPolicyResponseShareExportPolicy{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareExportPolicyResponseShareExportPolicy) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareExportPolicyResponseShareExportPolicy) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_share_response.go b/services/sfs/model_get_share_response.go index 974a845e4..37e550913 100644 --- a/services/sfs/model_get_share_response.go +++ b/services/sfs/model_get_share_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetShareResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseGetShareAttributeType = *GetShareResponseShare + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseGetShareArgType = GetShareResponseShare + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseGetShareRetType = GetShareResponseShare +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseGetShareAttributeTypeOk(arg GetShareResponseGetShareAttributeType) (ret GetShareResponseGetShareRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getGetShareResponseGetShareAttributeTypeOk(arg GetShareResponseGetShareAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseGetShareAttributeType(arg *GetShareResponseGetShareAttributeType, val GetShareResponseGetShareRetType) { *arg = &val } // GetShareResponse struct for GetShareResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponse struct { Share GetShareResponseGetShareAttributeType `json:"share,omitempty"` } @@ -46,6 +55,7 @@ type GetShareResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareResponse() *GetShareResponse { this := GetShareResponse{} return &this @@ -54,12 +64,14 @@ func NewGetShareResponse() *GetShareResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareResponseWithDefaults() *GetShareResponse { this := GetShareResponse{} return &this } // GetShare returns the Share field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponse) GetShare() (res GetShareResponseGetShareRetType) { res, _ = o.GetShareOk() return @@ -67,21 +79,25 @@ func (o *GetShareResponse) GetShare() (res GetShareResponseGetShareRetType) { // GetShareOk returns a tuple with the Share field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponse) GetShareOk() (ret GetShareResponseGetShareRetType, ok bool) { return getGetShareResponseGetShareAttributeTypeOk(o.Share) } // HasShare returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponse) SetShare(v GetShareResponseGetShareRetType) { setGetShareResponseGetShareAttributeType(&o.Share, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetShareResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetShareResponseGetShareAttributeTypeOk(o.Share); ok { @@ -90,37 +106,45 @@ func (o GetShareResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetShareResponse struct { value *GetShareResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareResponse) Get() *GetShareResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareResponse) Set(val *GetShareResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetShareResponse(val *GetShareResponse) *NullableGetShareResponse { return &NullableGetShareResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_get_share_response_share.go b/services/sfs/model_get_share_response_share.go index 6a9eeb23d..23946dd65 100644 --- a/services/sfs/model_get_share_response_share.go +++ b/services/sfs/model_get_share_response_share.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &GetShareResponseShare{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetCreatedAtAttributeTypeOk(arg GetShareResponseShareGetCreatedAtAttributeType) (ret GetShareResponseShareGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getGetShareResponseShareGetCreatedAtAttributeTypeOk(arg GetShareResponseSha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetCreatedAtAttributeType(arg *GetShareResponseShareGetCreatedAtAttributeType, val GetShareResponseShareGetCreatedAtRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setGetShareResponseShareGetCreatedAtAttributeType(arg *GetShareResponseShar */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetExportPolicyAttributeTypeOk(arg GetShareResponseShareGetExportPolicyAttributeType) (ret GetShareResponseShareGetExportPolicyRetType, ok bool) { if arg == nil { return nil, false @@ -54,6 +68,7 @@ func getGetShareResponseShareGetExportPolicyAttributeTypeOk(arg GetShareResponse return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetExportPolicyAttributeType(arg *GetShareResponseShareGetExportPolicyAttributeType, val GetShareResponseShareGetExportPolicyRetType) { *arg = val } @@ -63,8 +78,10 @@ func setGetShareResponseShareGetExportPolicyAttributeType(arg *GetShareResponseS */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetIdAttributeTypeOk(arg GetShareResponseShareGetIdAttributeType) (ret GetShareResponseShareGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getGetShareResponseShareGetIdAttributeTypeOk(arg GetShareResponseShareGetId return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetIdAttributeType(arg *GetShareResponseShareGetIdAttributeType, val GetShareResponseShareGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetIdRetType = string /* @@ -84,10 +105,16 @@ type GetShareResponseShareGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetLabelsAttributeTypeOk(arg GetShareResponseShareGetLabelsAttributeType) (ret GetShareResponseShareGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +122,7 @@ func getGetShareResponseShareGetLabelsAttributeTypeOk(arg GetShareResponseShareG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetLabelsAttributeType(arg *GetShareResponseShareGetLabelsAttributeType, val GetShareResponseShareGetLabelsRetType) { *arg = &val } @@ -104,8 +132,10 @@ func setGetShareResponseShareGetLabelsAttributeType(arg *GetShareResponseShareGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetMountPathAttributeTypeOk(arg GetShareResponseShareGetMountPathAttributeType) (ret GetShareResponseShareGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +143,15 @@ func getGetShareResponseShareGetMountPathAttributeTypeOk(arg GetShareResponseSha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetMountPathAttributeType(arg *GetShareResponseShareGetMountPathAttributeType, val GetShareResponseShareGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetMountPathRetType = string /* @@ -125,8 +159,10 @@ type GetShareResponseShareGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetNameAttributeTypeOk(arg GetShareResponseShareGetNameAttributeType) (ret GetShareResponseShareGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -134,11 +170,15 @@ func getGetShareResponseShareGetNameAttributeTypeOk(arg GetShareResponseShareGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetNameAttributeType(arg *GetShareResponseShareGetNameAttributeType, val GetShareResponseShareGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetNameRetType = string /* @@ -146,10 +186,16 @@ type GetShareResponseShareGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetSpaceHardLimitGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetSpaceHardLimitGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret GetShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -157,6 +203,7 @@ func getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg GetSh return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *GetShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val GetShareResponseShareGetSpaceHardLimitGigabytesRetType) { *arg = &val } @@ -166,8 +213,10 @@ func setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *GetSha */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetShareResponseShareGetStateAttributeTypeOk(arg GetShareResponseShareGetStateAttributeType) (ret GetShareResponseShareGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -175,14 +224,19 @@ func getGetShareResponseShareGetStateAttributeTypeOk(arg GetShareResponseShareGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetShareResponseShareGetStateAttributeType(arg *GetShareResponseShareGetStateAttributeType, val GetShareResponseShareGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShareGetStateRetType = string // GetShareResponseShare Share +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetShareResponseShare struct { CreatedAt GetShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"` ExportPolicy GetShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"` @@ -205,6 +259,7 @@ type GetShareResponseShare struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareResponseShare() *GetShareResponseShare { this := GetShareResponseShare{} return &this @@ -213,12 +268,14 @@ func NewGetShareResponseShare() *GetShareResponseShare { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetShareResponseShareWithDefaults() *GetShareResponseShare { this := GetShareResponseShare{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetCreatedAt() (res GetShareResponseShareGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -226,22 +283,26 @@ func (o *GetShareResponseShare) GetCreatedAt() (res GetShareResponseShareGetCrea // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetCreatedAtOk() (ret GetShareResponseShareGetCreatedAtRetType, ok bool) { return getGetShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetExportPolicy() (res GetShareResponseShareGetExportPolicyRetType) { res, _ = o.GetExportPolicyOk() return @@ -250,32 +311,38 @@ func (o *GetShareResponseShare) GetExportPolicy() (res GetShareResponseShareGetE // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetExportPolicyOk() (ret GetShareResponseShareGetExportPolicyRetType, ok bool) { return getGetShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy) } // HasExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetExportPolicy(v GetShareResponseShareGetExportPolicyRetType) { setGetShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v) } // SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetExportPolicyNil() { o.ExportPolicy = nil } // UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) UnsetExportPolicy() { o.ExportPolicy = nil } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetId() (res GetShareResponseShareGetIdRetType) { res, _ = o.GetIdOk() return @@ -283,22 +350,26 @@ func (o *GetShareResponseShare) GetId() (res GetShareResponseShareGetIdRetType) // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetIdOk() (ret GetShareResponseShareGetIdRetType, ok bool) { return getGetShareResponseShareGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetId(v GetShareResponseShareGetIdRetType) { setGetShareResponseShareGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetLabels() (res GetShareResponseShareGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -306,22 +377,26 @@ func (o *GetShareResponseShare) GetLabels() (res GetShareResponseShareGetLabelsR // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetLabelsOk() (ret GetShareResponseShareGetLabelsRetType, ok bool) { return getGetShareResponseShareGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetLabels(v GetShareResponseShareGetLabelsRetType) { setGetShareResponseShareGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetMountPath() (res GetShareResponseShareGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -329,22 +404,26 @@ func (o *GetShareResponseShare) GetMountPath() (res GetShareResponseShareGetMoun // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetMountPathOk() (ret GetShareResponseShareGetMountPathRetType, ok bool) { return getGetShareResponseShareGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetMountPath(v GetShareResponseShareGetMountPathRetType) { setGetShareResponseShareGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetName() (res GetShareResponseShareGetNameRetType) { res, _ = o.GetNameOk() return @@ -352,22 +431,26 @@ func (o *GetShareResponseShare) GetName() (res GetShareResponseShareGetNameRetTy // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetNameOk() (ret GetShareResponseShareGetNameRetType, ok bool) { return getGetShareResponseShareGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetName(v GetShareResponseShareGetNameRetType) { setGetShareResponseShareGetNameAttributeType(&o.Name, v) } // GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetSpaceHardLimitGigabytes() (res GetShareResponseShareGetSpaceHardLimitGigabytesRetType) { res, _ = o.GetSpaceHardLimitGigabytesOk() return @@ -375,22 +458,26 @@ func (o *GetShareResponseShare) GetSpaceHardLimitGigabytes() (res GetShareRespon // GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret GetShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) { return getGetShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes) } // HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetSpaceHardLimitGigabytes(v GetShareResponseShareGetSpaceHardLimitGigabytesRetType) { setGetShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetState() (res GetShareResponseShareGetStateRetType) { res, _ = o.GetStateOk() return @@ -398,21 +485,25 @@ func (o *GetShareResponseShare) GetState() (res GetShareResponseShareGetStateRet // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) GetStateOk() (ret GetShareResponseShareGetStateRetType, ok bool) { return getGetShareResponseShareGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetShareResponseShare) SetState(v GetShareResponseShareGetStateRetType) { setGetShareResponseShareGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetShareResponseShare) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -442,37 +533,45 @@ func (o GetShareResponseShare) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGetShareResponseShare struct { value *GetShareResponseShare isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareResponseShare) Get() *GetShareResponseShare { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareResponseShare) Set(val *GetShareResponseShare) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareResponseShare) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareResponseShare) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGetShareResponseShare(val *GetShareResponseShare) *NullableGetShareResponseShare { return &NullableGetShareResponseShare{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetShareResponseShare) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetShareResponseShare) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_google_protobuf_any.go b/services/sfs/model_google_protobuf_any.go index c34a3edc3..4d1edf1a8 100644 --- a/services/sfs/model_google_protobuf_any.go +++ b/services/sfs/model_google_protobuf_any.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &GoogleProtobufAny{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GoogleProtobufAnyGetTypeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttributeType) (ret GoogleProtobufAnyGetTypeRetType, ok bool) { if arg == nil { return ret, false @@ -31,26 +34,33 @@ func getGoogleProtobufAnyGetTypeAttributeTypeOk(arg GoogleProtobufAnyGetTypeAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGoogleProtobufAnyGetTypeAttributeType(arg *GoogleProtobufAnyGetTypeAttributeType, val GoogleProtobufAnyGetTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GoogleProtobufAnyGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GoogleProtobufAnyGetTypeRetType = string // GoogleProtobufAny Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GoogleProtobufAny struct { // The type of the serialized message. Type GoogleProtobufAnyGetTypeAttributeType `json:"@type,omitempty"` AdditionalProperties map[string]interface{} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGoogleProtobufAny() *GoogleProtobufAny { this := GoogleProtobufAny{} return &this @@ -59,12 +69,14 @@ func NewGoogleProtobufAny() *GoogleProtobufAny { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGoogleProtobufAnyWithDefaults() *GoogleProtobufAny { this := GoogleProtobufAny{} return &this } // GetType returns the Type field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) { res, _ = o.GetTypeOk() return @@ -72,21 +84,25 @@ func (o *GoogleProtobufAny) GetType() (res GoogleProtobufAnyGetTypeRetType) { // GetTypeOk returns a tuple with the Type field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GoogleProtobufAny) GetTypeOk() (ret GoogleProtobufAnyGetTypeRetType, ok bool) { return getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type) } // HasType returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GoogleProtobufAny) SetType(v GoogleProtobufAnyGetTypeRetType) { setGoogleProtobufAnyGetTypeAttributeType(&o.Type, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGoogleProtobufAnyGetTypeAttributeTypeOk(o.Type); ok { @@ -100,37 +116,45 @@ func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableGoogleProtobufAny struct { value *GoogleProtobufAny isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGoogleProtobufAny) Get() *GoogleProtobufAny { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGoogleProtobufAny) Set(val *GoogleProtobufAny) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGoogleProtobufAny) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGoogleProtobufAny) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableGoogleProtobufAny(val *GoogleProtobufAny) *NullableGoogleProtobufAny { return &NullableGoogleProtobufAny{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGoogleProtobufAny) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGoogleProtobufAny) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_list_performance_classes_response.go b/services/sfs/model_list_performance_classes_response.go index 1e619c27a..386aaf075 100644 --- a/services/sfs/model_list_performance_classes_response.go +++ b/services/sfs/model_list_performance_classes_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListPerformanceClassesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListPerformanceClassesResponseGetPerformanceClassesAttributeType = *[]PerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListPerformanceClassesResponseGetPerformanceClassesArgType = []PerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListPerformanceClassesResponseGetPerformanceClassesRetType = []PerformanceClass +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(arg ListPerformanceClassesResponseGetPerformanceClassesAttributeType) (ret ListPerformanceClassesResponseGetPerformanceClassesRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(arg L return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListPerformanceClassesResponseGetPerformanceClassesAttributeType(arg *ListPerformanceClassesResponseGetPerformanceClassesAttributeType, val ListPerformanceClassesResponseGetPerformanceClassesRetType) { *arg = &val } // ListPerformanceClassesResponse struct for ListPerformanceClassesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListPerformanceClassesResponse struct { // List of Performance Classes PerformanceClasses ListPerformanceClassesResponseGetPerformanceClassesAttributeType `json:"performanceClasses,omitempty"` @@ -47,6 +56,7 @@ type ListPerformanceClassesResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListPerformanceClassesResponse() *ListPerformanceClassesResponse { this := ListPerformanceClassesResponse{} return &this @@ -55,12 +65,14 @@ func NewListPerformanceClassesResponse() *ListPerformanceClassesResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListPerformanceClassesResponseWithDefaults() *ListPerformanceClassesResponse { this := ListPerformanceClassesResponse{} return &this } // GetPerformanceClasses returns the PerformanceClasses field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListPerformanceClassesResponse) GetPerformanceClasses() (res ListPerformanceClassesResponseGetPerformanceClassesRetType) { res, _ = o.GetPerformanceClassesOk() return @@ -68,21 +80,25 @@ func (o *ListPerformanceClassesResponse) GetPerformanceClasses() (res ListPerfor // GetPerformanceClassesOk returns a tuple with the PerformanceClasses field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListPerformanceClassesResponse) GetPerformanceClassesOk() (ret ListPerformanceClassesResponseGetPerformanceClassesRetType, ok bool) { return getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(o.PerformanceClasses) } // HasPerformanceClasses returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListPerformanceClassesResponse) SetPerformanceClasses(v ListPerformanceClassesResponseGetPerformanceClassesRetType) { setListPerformanceClassesResponseGetPerformanceClassesAttributeType(&o.PerformanceClasses, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListPerformanceClassesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListPerformanceClassesResponseGetPerformanceClassesAttributeTypeOk(o.PerformanceClasses); ok { @@ -91,37 +107,45 @@ func (o ListPerformanceClassesResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListPerformanceClassesResponse struct { value *ListPerformanceClassesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListPerformanceClassesResponse) Get() *ListPerformanceClassesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListPerformanceClassesResponse) Set(val *ListPerformanceClassesResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListPerformanceClassesResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListPerformanceClassesResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListPerformanceClassesResponse(val *ListPerformanceClassesResponse) *NullableListPerformanceClassesResponse { return &NullableListPerformanceClassesResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListPerformanceClassesResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListPerformanceClassesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_list_resource_pool_snapshots_response.go b/services/sfs/model_list_resource_pool_snapshots_response.go index 5a11e755f..5481bf298 100644 --- a/services/sfs/model_list_resource_pool_snapshots_response.go +++ b/services/sfs/model_list_resource_pool_snapshots_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListResourcePoolSnapshotsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType = *[]ResourcePoolSnapshot + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsArgType = []ResourcePoolSnapshot + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType = []ResourcePoolSnapshot +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk(arg ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType) (ret ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType(arg *ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType, val ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType) { *arg = &val } // ListResourcePoolSnapshotsResponse struct for ListResourcePoolSnapshotsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolSnapshotsResponse struct { // List of Resource Pool Snapshots ResourcePoolSnapshots ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType `json:"resourcePoolSnapshots,omitempty"` @@ -47,6 +56,7 @@ type ListResourcePoolSnapshotsResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListResourcePoolSnapshotsResponse() *ListResourcePoolSnapshotsResponse { this := ListResourcePoolSnapshotsResponse{} return &this @@ -55,12 +65,14 @@ func NewListResourcePoolSnapshotsResponse() *ListResourcePoolSnapshotsResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListResourcePoolSnapshotsResponseWithDefaults() *ListResourcePoolSnapshotsResponse { this := ListResourcePoolSnapshotsResponse{} return &this } // GetResourcePoolSnapshots returns the ResourcePoolSnapshots field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListResourcePoolSnapshotsResponse) GetResourcePoolSnapshots() (res ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType) { res, _ = o.GetResourcePoolSnapshotsOk() return @@ -68,21 +80,25 @@ func (o *ListResourcePoolSnapshotsResponse) GetResourcePoolSnapshots() (res List // GetResourcePoolSnapshotsOk returns a tuple with the ResourcePoolSnapshots field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListResourcePoolSnapshotsResponse) GetResourcePoolSnapshotsOk() (ret ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType, ok bool) { return getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk(o.ResourcePoolSnapshots) } // HasResourcePoolSnapshots returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListResourcePoolSnapshotsResponse) SetResourcePoolSnapshots(v ListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsRetType) { setListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeType(&o.ResourcePoolSnapshots, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListResourcePoolSnapshotsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListResourcePoolSnapshotsResponseGetResourcePoolSnapshotsAttributeTypeOk(o.ResourcePoolSnapshots); ok { @@ -91,37 +107,45 @@ func (o ListResourcePoolSnapshotsResponse) ToMap() (map[string]interface{}, erro return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListResourcePoolSnapshotsResponse struct { value *ListResourcePoolSnapshotsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListResourcePoolSnapshotsResponse) Get() *ListResourcePoolSnapshotsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListResourcePoolSnapshotsResponse) Set(val *ListResourcePoolSnapshotsResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListResourcePoolSnapshotsResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListResourcePoolSnapshotsResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListResourcePoolSnapshotsResponse(val *ListResourcePoolSnapshotsResponse) *NullableListResourcePoolSnapshotsResponse { return &NullableListResourcePoolSnapshotsResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListResourcePoolSnapshotsResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListResourcePoolSnapshotsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_list_resource_pools_response.go b/services/sfs/model_list_resource_pools_response.go index 2778b407c..3770ecd94 100644 --- a/services/sfs/model_list_resource_pools_response.go +++ b/services/sfs/model_list_resource_pools_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListResourcePoolsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolsResponseGetResourcePoolsAttributeType = *[]ResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolsResponseGetResourcePoolsArgType = []ResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolsResponseGetResourcePoolsRetType = []ResourcePool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(arg ListResourcePoolsResponseGetResourcePoolsAttributeType) (ret ListResourcePoolsResponseGetResourcePoolsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(arg ListResourc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListResourcePoolsResponseGetResourcePoolsAttributeType(arg *ListResourcePoolsResponseGetResourcePoolsAttributeType, val ListResourcePoolsResponseGetResourcePoolsRetType) { *arg = &val } // ListResourcePoolsResponse struct for ListResourcePoolsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListResourcePoolsResponse struct { // List of Resource Pools ResourcePools ListResourcePoolsResponseGetResourcePoolsAttributeType `json:"resourcePools,omitempty"` @@ -47,6 +56,7 @@ type ListResourcePoolsResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListResourcePoolsResponse() *ListResourcePoolsResponse { this := ListResourcePoolsResponse{} return &this @@ -55,12 +65,14 @@ func NewListResourcePoolsResponse() *ListResourcePoolsResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListResourcePoolsResponseWithDefaults() *ListResourcePoolsResponse { this := ListResourcePoolsResponse{} return &this } // GetResourcePools returns the ResourcePools field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListResourcePoolsResponse) GetResourcePools() (res ListResourcePoolsResponseGetResourcePoolsRetType) { res, _ = o.GetResourcePoolsOk() return @@ -68,21 +80,25 @@ func (o *ListResourcePoolsResponse) GetResourcePools() (res ListResourcePoolsRes // GetResourcePoolsOk returns a tuple with the ResourcePools field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListResourcePoolsResponse) GetResourcePoolsOk() (ret ListResourcePoolsResponseGetResourcePoolsRetType, ok bool) { return getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(o.ResourcePools) } // HasResourcePools returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListResourcePoolsResponse) SetResourcePools(v ListResourcePoolsResponseGetResourcePoolsRetType) { setListResourcePoolsResponseGetResourcePoolsAttributeType(&o.ResourcePools, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListResourcePoolsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListResourcePoolsResponseGetResourcePoolsAttributeTypeOk(o.ResourcePools); ok { @@ -91,37 +107,45 @@ func (o ListResourcePoolsResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListResourcePoolsResponse struct { value *ListResourcePoolsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListResourcePoolsResponse) Get() *ListResourcePoolsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListResourcePoolsResponse) Set(val *ListResourcePoolsResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListResourcePoolsResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListResourcePoolsResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListResourcePoolsResponse(val *ListResourcePoolsResponse) *NullableListResourcePoolsResponse { return &NullableListResourcePoolsResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListResourcePoolsResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListResourcePoolsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_list_share_export_policies_response.go b/services/sfs/model_list_share_export_policies_response.go index 4d17d9cda..87773f0c9 100644 --- a/services/sfs/model_list_share_export_policies_response.go +++ b/services/sfs/model_list_share_export_policies_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListShareExportPoliciesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType = *[]ShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListShareExportPoliciesResponseGetShareExportPoliciesArgType = []ShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListShareExportPoliciesResponseGetShareExportPoliciesRetType = []ShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(arg ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType) (ret ListShareExportPoliciesResponseGetShareExportPoliciesRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListShareExportPoliciesResponseGetShareExportPoliciesAttributeType(arg *ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType, val ListShareExportPoliciesResponseGetShareExportPoliciesRetType) { *arg = &val } // ListShareExportPoliciesResponse struct for ListShareExportPoliciesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListShareExportPoliciesResponse struct { // List of Share Export Policies ShareExportPolicies ListShareExportPoliciesResponseGetShareExportPoliciesAttributeType `json:"shareExportPolicies,omitempty"` @@ -47,6 +56,7 @@ type ListShareExportPoliciesResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListShareExportPoliciesResponse() *ListShareExportPoliciesResponse { this := ListShareExportPoliciesResponse{} return &this @@ -55,12 +65,14 @@ func NewListShareExportPoliciesResponse() *ListShareExportPoliciesResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListShareExportPoliciesResponseWithDefaults() *ListShareExportPoliciesResponse { this := ListShareExportPoliciesResponse{} return &this } // GetShareExportPolicies returns the ShareExportPolicies field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListShareExportPoliciesResponse) GetShareExportPolicies() (res ListShareExportPoliciesResponseGetShareExportPoliciesRetType) { res, _ = o.GetShareExportPoliciesOk() return @@ -68,21 +80,25 @@ func (o *ListShareExportPoliciesResponse) GetShareExportPolicies() (res ListShar // GetShareExportPoliciesOk returns a tuple with the ShareExportPolicies field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListShareExportPoliciesResponse) GetShareExportPoliciesOk() (ret ListShareExportPoliciesResponseGetShareExportPoliciesRetType, ok bool) { return getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(o.ShareExportPolicies) } // HasShareExportPolicies returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListShareExportPoliciesResponse) SetShareExportPolicies(v ListShareExportPoliciesResponseGetShareExportPoliciesRetType) { setListShareExportPoliciesResponseGetShareExportPoliciesAttributeType(&o.ShareExportPolicies, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListShareExportPoliciesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListShareExportPoliciesResponseGetShareExportPoliciesAttributeTypeOk(o.ShareExportPolicies); ok { @@ -91,37 +107,45 @@ func (o ListShareExportPoliciesResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListShareExportPoliciesResponse struct { value *ListShareExportPoliciesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListShareExportPoliciesResponse) Get() *ListShareExportPoliciesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListShareExportPoliciesResponse) Set(val *ListShareExportPoliciesResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListShareExportPoliciesResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListShareExportPoliciesResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListShareExportPoliciesResponse(val *ListShareExportPoliciesResponse) *NullableListShareExportPoliciesResponse { return &NullableListShareExportPoliciesResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListShareExportPoliciesResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListShareExportPoliciesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_list_shares_response.go b/services/sfs/model_list_shares_response.go index e564bf3f4..82064acf0 100644 --- a/services/sfs/model_list_shares_response.go +++ b/services/sfs/model_list_shares_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListSharesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListSharesResponseGetSharesAttributeType = *[]Share + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListSharesResponseGetSharesArgType = []Share + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListSharesResponseGetSharesRetType = []Share +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListSharesResponseGetSharesAttributeTypeOk(arg ListSharesResponseGetSharesAttributeType) (ret ListSharesResponseGetSharesRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListSharesResponseGetSharesAttributeTypeOk(arg ListSharesResponseGetShar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListSharesResponseGetSharesAttributeType(arg *ListSharesResponseGetSharesAttributeType, val ListSharesResponseGetSharesRetType) { *arg = &val } // ListSharesResponse struct for ListSharesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListSharesResponse struct { // List of Shares Shares ListSharesResponseGetSharesAttributeType `json:"shares,omitempty"` @@ -47,6 +56,7 @@ type ListSharesResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListSharesResponse() *ListSharesResponse { this := ListSharesResponse{} return &this @@ -55,12 +65,14 @@ func NewListSharesResponse() *ListSharesResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListSharesResponseWithDefaults() *ListSharesResponse { this := ListSharesResponse{} return &this } // GetShares returns the Shares field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListSharesResponse) GetShares() (res ListSharesResponseGetSharesRetType) { res, _ = o.GetSharesOk() return @@ -68,21 +80,25 @@ func (o *ListSharesResponse) GetShares() (res ListSharesResponseGetSharesRetType // GetSharesOk returns a tuple with the Shares field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListSharesResponse) GetSharesOk() (ret ListSharesResponseGetSharesRetType, ok bool) { return getListSharesResponseGetSharesAttributeTypeOk(o.Shares) } // HasShares returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListSharesResponse) SetShares(v ListSharesResponseGetSharesRetType) { setListSharesResponseGetSharesAttributeType(&o.Shares, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListSharesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListSharesResponseGetSharesAttributeTypeOk(o.Shares); ok { @@ -91,37 +107,45 @@ func (o ListSharesResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableListSharesResponse struct { value *ListSharesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListSharesResponse) Get() *ListSharesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListSharesResponse) Set(val *ListSharesResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListSharesResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListSharesResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableListSharesResponse(val *ListSharesResponse) *NullableListSharesResponse { return &NullableListSharesResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListSharesResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListSharesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_performance_class.go b/services/sfs/model_performance_class.go index b6ec47248..88dc985b3 100644 --- a/services/sfs/model_performance_class.go +++ b/services/sfs/model_performance_class.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &PerformanceClass{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetIopsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetIopsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetIopsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPerformanceClassGetIopsAttributeTypeOk(arg PerformanceClassGetIopsAttributeType) (ret PerformanceClassGetIopsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getPerformanceClassGetIopsAttributeTypeOk(arg PerformanceClassGetIopsAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPerformanceClassGetIopsAttributeType(arg *PerformanceClassGetIopsAttributeType, val PerformanceClassGetIopsRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setPerformanceClassGetIopsAttributeType(arg *PerformanceClassGetIopsAttribu */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPerformanceClassGetNameAttributeTypeOk(arg PerformanceClassGetNameAttributeType) (ret PerformanceClassGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getPerformanceClassGetNameAttributeTypeOk(arg PerformanceClassGetNameAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPerformanceClassGetNameAttributeType(arg *PerformanceClassGetNameAttributeType, val PerformanceClassGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetNameRetType = string /* @@ -63,10 +77,16 @@ type PerformanceClassGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetThroughputAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetThroughputArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClassGetThroughputRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPerformanceClassGetThroughputAttributeTypeOk(arg PerformanceClassGetThroughputAttributeType) (ret PerformanceClassGetThroughputRetType, ok bool) { if arg == nil { return ret, false @@ -74,11 +94,13 @@ func getPerformanceClassGetThroughputAttributeTypeOk(arg PerformanceClassGetThro return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPerformanceClassGetThroughputAttributeType(arg *PerformanceClassGetThroughputAttributeType, val PerformanceClassGetThroughputRetType) { *arg = &val } // PerformanceClass struct for PerformanceClass +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PerformanceClass struct { // IOPS of the Performance Class // Can be cast to int32 without loss of precision. @@ -94,6 +116,7 @@ type PerformanceClass struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPerformanceClass() *PerformanceClass { this := PerformanceClass{} return &this @@ -102,12 +125,14 @@ func NewPerformanceClass() *PerformanceClass { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewPerformanceClassWithDefaults() *PerformanceClass { this := PerformanceClass{} return &this } // GetIops returns the Iops field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) GetIops() (res PerformanceClassGetIopsRetType) { res, _ = o.GetIopsOk() return @@ -115,22 +140,26 @@ func (o *PerformanceClass) GetIops() (res PerformanceClassGetIopsRetType) { // GetIopsOk returns a tuple with the Iops field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) GetIopsOk() (ret PerformanceClassGetIopsRetType, ok bool) { return getPerformanceClassGetIopsAttributeTypeOk(o.Iops) } // HasIops returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) SetIops(v PerformanceClassGetIopsRetType) { setPerformanceClassGetIopsAttributeType(&o.Iops, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) GetName() (res PerformanceClassGetNameRetType) { res, _ = o.GetNameOk() return @@ -138,22 +167,26 @@ func (o *PerformanceClass) GetName() (res PerformanceClassGetNameRetType) { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) GetNameOk() (ret PerformanceClassGetNameRetType, ok bool) { return getPerformanceClassGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) SetName(v PerformanceClassGetNameRetType) { setPerformanceClassGetNameAttributeType(&o.Name, v) } // GetThroughput returns the Throughput field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) GetThroughput() (res PerformanceClassGetThroughputRetType) { res, _ = o.GetThroughputOk() return @@ -161,21 +194,25 @@ func (o *PerformanceClass) GetThroughput() (res PerformanceClassGetThroughputRet // GetThroughputOk returns a tuple with the Throughput field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) GetThroughputOk() (ret PerformanceClassGetThroughputRetType, ok bool) { return getPerformanceClassGetThroughputAttributeTypeOk(o.Throughput) } // HasThroughput returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PerformanceClass) SetThroughput(v PerformanceClassGetThroughputRetType) { setPerformanceClassGetThroughputAttributeType(&o.Throughput, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PerformanceClass) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPerformanceClassGetIopsAttributeTypeOk(o.Iops); ok { @@ -190,37 +227,45 @@ func (o PerformanceClass) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullablePerformanceClass struct { value *PerformanceClass isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePerformanceClass) Get() *PerformanceClass { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePerformanceClass) Set(val *PerformanceClass) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePerformanceClass) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePerformanceClass) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullablePerformanceClass(val *PerformanceClass) *NullablePerformanceClass { return &NullablePerformanceClass{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePerformanceClass) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePerformanceClass) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_resource_pool.go b/services/sfs/model_resource_pool.go index 939dc4f2c..02fe0591a 100644 --- a/services/sfs/model_resource_pool.go +++ b/services/sfs/model_resource_pool.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &ResourcePool{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetAvailabilityZoneAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetAvailabilityZoneAttributeTypeOk(arg ResourcePoolGetAvailabilityZoneAttributeType) (ret ResourcePoolGetAvailabilityZoneRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getResourcePoolGetAvailabilityZoneAttributeTypeOk(arg ResourcePoolGetAvaila return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetAvailabilityZoneAttributeType(arg *ResourcePoolGetAvailabilityZoneAttributeType, val ResourcePoolGetAvailabilityZoneRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetAvailabilityZoneArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetAvailabilityZoneRetType = string /* @@ -44,10 +51,16 @@ type ResourcePoolGetAvailabilityZoneRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetCountSharesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetCountSharesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetCountSharesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetCountSharesAttributeTypeOk(arg ResourcePoolGetCountSharesAttributeType) (ret ResourcePoolGetCountSharesRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +68,7 @@ func getResourcePoolGetCountSharesAttributeTypeOk(arg ResourcePoolGetCountShares return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetCountSharesAttributeType(arg *ResourcePoolGetCountSharesAttributeType, val ResourcePoolGetCountSharesRetType) { *arg = &val } @@ -64,10 +78,16 @@ func setResourcePoolGetCountSharesAttributeType(arg *ResourcePoolGetCountSharesA */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetCreatedAtAttributeTypeOk(arg ResourcePoolGetCreatedAtAttributeType) (ret ResourcePoolGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getResourcePoolGetCreatedAtAttributeTypeOk(arg ResourcePoolGetCreatedAtAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetCreatedAtAttributeType(arg *ResourcePoolGetCreatedAtAttributeType, val ResourcePoolGetCreatedAtRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setResourcePoolGetCreatedAtAttributeType(arg *ResourcePoolGetCreatedAtAttri */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetIdAttributeTypeOk(arg ResourcePoolGetIdAttributeType) (ret ResourcePoolGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getResourcePoolGetIdAttributeTypeOk(arg ResourcePoolGetIdAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetIdAttributeType(arg *ResourcePoolGetIdAttributeType, val ResourcePoolGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetIdRetType = string /* @@ -105,10 +132,16 @@ type ResourcePoolGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetIpAclAttributeTypeOk(arg ResourcePoolGetIpAclAttributeType) (ret ResourcePoolGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getResourcePoolGetIpAclAttributeTypeOk(arg ResourcePoolGetIpAclAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetIpAclAttributeType(arg *ResourcePoolGetIpAclAttributeType, val ResourcePoolGetIpAclRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setResourcePoolGetIpAclAttributeType(arg *ResourcePoolGetIpAclAttributeType */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetLabelsAttributeTypeOk(arg ResourcePoolGetLabelsAttributeType) (ret ResourcePoolGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +176,7 @@ func getResourcePoolGetLabelsAttributeTypeOk(arg ResourcePoolGetLabelsAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetLabelsAttributeType(arg *ResourcePoolGetLabelsAttributeType, val ResourcePoolGetLabelsRetType) { *arg = &val } @@ -145,8 +186,10 @@ func setResourcePoolGetLabelsAttributeType(arg *ResourcePoolGetLabelsAttributeTy */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetMountPathAttributeTypeOk(arg ResourcePoolGetMountPathAttributeType) (ret ResourcePoolGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -154,11 +197,15 @@ func getResourcePoolGetMountPathAttributeTypeOk(arg ResourcePoolGetMountPathAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetMountPathAttributeType(arg *ResourcePoolGetMountPathAttributeType, val ResourcePoolGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetMountPathRetType = string /* @@ -166,8 +213,10 @@ type ResourcePoolGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetNameAttributeTypeOk(arg ResourcePoolGetNameAttributeType) (ret ResourcePoolGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -175,11 +224,15 @@ func getResourcePoolGetNameAttributeTypeOk(arg ResourcePoolGetNameAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetNameAttributeType(arg *ResourcePoolGetNameAttributeType, val ResourcePoolGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetNameRetType = string /* @@ -187,10 +240,16 @@ type ResourcePoolGetNameRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetPerformanceClassAttributeTypeOk(arg ResourcePoolGetPerformanceClassAttributeType) (ret ResourcePoolGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false @@ -198,6 +257,7 @@ func getResourcePoolGetPerformanceClassAttributeTypeOk(arg ResourcePoolGetPerfor return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetPerformanceClassAttributeType(arg *ResourcePoolGetPerformanceClassAttributeType, val ResourcePoolGetPerformanceClassRetType) { *arg = &val } @@ -207,10 +267,16 @@ func setResourcePoolGetPerformanceClassAttributeType(arg *ResourcePoolGetPerform */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg ResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret ResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { if arg == nil { return ret, false @@ -218,6 +284,7 @@ func getResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg Resourc return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *ResourcePoolGetPerformanceClassDowngradableAtAttributeType, val ResourcePoolGetPerformanceClassDowngradableAtRetType) { *arg = &val } @@ -227,10 +294,16 @@ func setResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *Resource */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetSizeReducibleAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetSizeReducibleAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetSizeReducibleAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetSizeReducibleAtAttributeTypeOk(arg ResourcePoolGetSizeReducibleAtAttributeType) (ret ResourcePoolGetSizeReducibleAtRetType, ok bool) { if arg == nil { return ret, false @@ -238,6 +311,7 @@ func getResourcePoolGetSizeReducibleAtAttributeTypeOk(arg ResourcePoolGetSizeRed return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetSizeReducibleAtAttributeType(arg *ResourcePoolGetSizeReducibleAtAttributeType, val ResourcePoolGetSizeReducibleAtRetType) { *arg = &val } @@ -247,10 +321,16 @@ func setResourcePoolGetSizeReducibleAtAttributeType(arg *ResourcePoolGetSizeRedu */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolgetSnapshotsAreVisibleAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolgetSnapshotsAreVisibleArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolgetSnapshotsAreVisibleRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg ResourcePoolgetSnapshotsAreVisibleAttributeType) (ret ResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { if arg == nil { return ret, false @@ -258,6 +338,7 @@ func getResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg ResourcePoolgetSna return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolgetSnapshotsAreVisibleAttributeType(arg *ResourcePoolgetSnapshotsAreVisibleAttributeType, val ResourcePoolgetSnapshotsAreVisibleRetType) { *arg = &val } @@ -267,10 +348,16 @@ func setResourcePoolgetSnapshotsAreVisibleAttributeType(arg *ResourcePoolgetSnap */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetSpaceAttributeType = *ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetSpaceArgType = ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetSpaceRetType = ResourcePoolSpace +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetSpaceAttributeTypeOk(arg ResourcePoolGetSpaceAttributeType) (ret ResourcePoolGetSpaceRetType, ok bool) { if arg == nil { return ret, false @@ -278,6 +365,7 @@ func getResourcePoolGetSpaceAttributeTypeOk(arg ResourcePoolGetSpaceAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetSpaceAttributeType(arg *ResourcePoolGetSpaceAttributeType, val ResourcePoolGetSpaceRetType) { *arg = &val } @@ -287,8 +375,10 @@ func setResourcePoolGetSpaceAttributeType(arg *ResourcePoolGetSpaceAttributeType */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolGetStateAttributeTypeOk(arg ResourcePoolGetStateAttributeType) (ret ResourcePoolGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -296,14 +386,19 @@ func getResourcePoolGetStateAttributeTypeOk(arg ResourcePoolGetStateAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolGetStateAttributeType(arg *ResourcePoolGetStateAttributeType, val ResourcePoolGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolGetStateRetType = string // ResourcePool struct for ResourcePool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePool struct { // Name of the respective availability zone AvailabilityZone ResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` @@ -336,6 +431,7 @@ type ResourcePool struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewResourcePool() *ResourcePool { this := ResourcePool{} return &this @@ -344,6 +440,7 @@ func NewResourcePool() *ResourcePool { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewResourcePoolWithDefaults() *ResourcePool { this := ResourcePool{} var snapshotsAreVisible bool = false @@ -352,6 +449,7 @@ func NewResourcePoolWithDefaults() *ResourcePool { } // GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetAvailabilityZone() (res ResourcePoolGetAvailabilityZoneRetType) { res, _ = o.GetAvailabilityZoneOk() return @@ -359,22 +457,26 @@ func (o *ResourcePool) GetAvailabilityZone() (res ResourcePoolGetAvailabilityZon // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetAvailabilityZoneOk() (ret ResourcePoolGetAvailabilityZoneRetType, ok bool) { return getResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) } // HasAvailabilityZone returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetAvailabilityZone(v ResourcePoolGetAvailabilityZoneRetType) { setResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) } // GetCountShares returns the CountShares field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetCountShares() (res ResourcePoolGetCountSharesRetType) { res, _ = o.GetCountSharesOk() return @@ -382,22 +484,26 @@ func (o *ResourcePool) GetCountShares() (res ResourcePoolGetCountSharesRetType) // GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetCountSharesOk() (ret ResourcePoolGetCountSharesRetType, ok bool) { return getResourcePoolGetCountSharesAttributeTypeOk(o.CountShares) } // HasCountShares returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetCountShares(v ResourcePoolGetCountSharesRetType) { setResourcePoolGetCountSharesAttributeType(&o.CountShares, v) } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetCreatedAt() (res ResourcePoolGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -405,22 +511,26 @@ func (o *ResourcePool) GetCreatedAt() (res ResourcePoolGetCreatedAtRetType) { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetCreatedAtOk() (ret ResourcePoolGetCreatedAtRetType, ok bool) { return getResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetCreatedAt(v ResourcePoolGetCreatedAtRetType) { setResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetId() (res ResourcePoolGetIdRetType) { res, _ = o.GetIdOk() return @@ -428,22 +538,26 @@ func (o *ResourcePool) GetId() (res ResourcePoolGetIdRetType) { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetIdOk() (ret ResourcePoolGetIdRetType, ok bool) { return getResourcePoolGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetId(v ResourcePoolGetIdRetType) { setResourcePoolGetIdAttributeType(&o.Id, v) } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetIpAcl() (res ResourcePoolGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -451,22 +565,26 @@ func (o *ResourcePool) GetIpAcl() (res ResourcePoolGetIpAclRetType) { // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetIpAclOk() (ret ResourcePoolGetIpAclRetType, ok bool) { return getResourcePoolGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetIpAcl(v ResourcePoolGetIpAclRetType) { setResourcePoolGetIpAclAttributeType(&o.IpAcl, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetLabels() (res ResourcePoolGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -474,22 +592,26 @@ func (o *ResourcePool) GetLabels() (res ResourcePoolGetLabelsRetType) { // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetLabelsOk() (ret ResourcePoolGetLabelsRetType, ok bool) { return getResourcePoolGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetLabels(v ResourcePoolGetLabelsRetType) { setResourcePoolGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetMountPath() (res ResourcePoolGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -497,22 +619,26 @@ func (o *ResourcePool) GetMountPath() (res ResourcePoolGetMountPathRetType) { // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetMountPathOk() (ret ResourcePoolGetMountPathRetType, ok bool) { return getResourcePoolGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetMountPath(v ResourcePoolGetMountPathRetType) { setResourcePoolGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetName() (res ResourcePoolGetNameRetType) { res, _ = o.GetNameOk() return @@ -520,22 +646,26 @@ func (o *ResourcePool) GetName() (res ResourcePoolGetNameRetType) { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetNameOk() (ret ResourcePoolGetNameRetType, ok bool) { return getResourcePoolGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetName(v ResourcePoolGetNameRetType) { setResourcePoolGetNameAttributeType(&o.Name, v) } // GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetPerformanceClass() (res ResourcePoolGetPerformanceClassRetType) { res, _ = o.GetPerformanceClassOk() return @@ -543,22 +673,26 @@ func (o *ResourcePool) GetPerformanceClass() (res ResourcePoolGetPerformanceClas // GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetPerformanceClassOk() (ret ResourcePoolGetPerformanceClassRetType, ok bool) { return getResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // HasPerformanceClass returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetPerformanceClass(v ResourcePoolGetPerformanceClassRetType) { setResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v) } // GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetPerformanceClassDowngradableAt() (res ResourcePoolGetPerformanceClassDowngradableAtRetType) { res, _ = o.GetPerformanceClassDowngradableAtOk() return @@ -566,22 +700,26 @@ func (o *ResourcePool) GetPerformanceClassDowngradableAt() (res ResourcePoolGetP // GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetPerformanceClassDowngradableAtOk() (ret ResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { return getResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt) } // HasPerformanceClassDowngradableAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetPerformanceClassDowngradableAt(v ResourcePoolGetPerformanceClassDowngradableAtRetType) { setResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v) } // GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetSizeReducibleAt() (res ResourcePoolGetSizeReducibleAtRetType) { res, _ = o.GetSizeReducibleAtOk() return @@ -589,22 +727,26 @@ func (o *ResourcePool) GetSizeReducibleAt() (res ResourcePoolGetSizeReducibleAtR // GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetSizeReducibleAtOk() (ret ResourcePoolGetSizeReducibleAtRetType, ok bool) { return getResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt) } // HasSizeReducibleAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetSizeReducibleAt(v ResourcePoolGetSizeReducibleAtRetType) { setResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v) } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetSnapshotsAreVisible() (res ResourcePoolgetSnapshotsAreVisibleRetType) { res, _ = o.GetSnapshotsAreVisibleOk() return @@ -612,22 +754,26 @@ func (o *ResourcePool) GetSnapshotsAreVisible() (res ResourcePoolgetSnapshotsAre // GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetSnapshotsAreVisibleOk() (ret ResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { return getResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible) } // HasSnapshotsAreVisible returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetSnapshotsAreVisible(v ResourcePoolgetSnapshotsAreVisibleRetType) { setResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v) } // GetSpace returns the Space field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetSpace() (res ResourcePoolGetSpaceRetType) { res, _ = o.GetSpaceOk() return @@ -635,22 +781,26 @@ func (o *ResourcePool) GetSpace() (res ResourcePoolGetSpaceRetType) { // GetSpaceOk returns a tuple with the Space field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetSpaceOk() (ret ResourcePoolGetSpaceRetType, ok bool) { return getResourcePoolGetSpaceAttributeTypeOk(o.Space) } // HasSpace returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetSpace(v ResourcePoolGetSpaceRetType) { setResourcePoolGetSpaceAttributeType(&o.Space, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetState() (res ResourcePoolGetStateRetType) { res, _ = o.GetStateOk() return @@ -658,21 +808,25 @@ func (o *ResourcePool) GetState() (res ResourcePoolGetStateRetType) { // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) GetStateOk() (ret ResourcePoolGetStateRetType, ok bool) { return getResourcePoolGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePool) SetState(v ResourcePoolGetStateRetType) { setResourcePoolGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ResourcePool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { @@ -720,37 +874,45 @@ func (o ResourcePool) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableResourcePool struct { value *ResourcePool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePool) Get() *ResourcePool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePool) Set(val *ResourcePool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableResourcePool(val *ResourcePool) *NullableResourcePool { return &NullableResourcePool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_resource_pool_performance_class.go b/services/sfs/model_resource_pool_performance_class.go index 9886af6f5..0c1d969a8 100644 --- a/services/sfs/model_resource_pool_performance_class.go +++ b/services/sfs/model_resource_pool_performance_class.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ResourcePoolPerformanceClass{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolPerformanceClassGetNameAttributeTypeOk(arg ResourcePoolPerformanceClassGetNameAttributeType) (ret ResourcePoolPerformanceClassGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getResourcePoolPerformanceClassGetNameAttributeTypeOk(arg ResourcePoolPerfo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolPerformanceClassGetNameAttributeType(arg *ResourcePoolPerformanceClassGetNameAttributeType, val ResourcePoolPerformanceClassGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetNameRetType = string /* @@ -43,10 +50,16 @@ type ResourcePoolPerformanceClassGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetPeakIopsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetPeakIopsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetPeakIopsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(arg ResourcePoolPerformanceClassGetPeakIopsAttributeType) (ret ResourcePoolPerformanceClassGetPeakIopsRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(arg ResourcePoolP return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolPerformanceClassGetPeakIopsAttributeType(arg *ResourcePoolPerformanceClassGetPeakIopsAttributeType, val ResourcePoolPerformanceClassGetPeakIopsRetType) { *arg = &val } @@ -63,10 +77,16 @@ func setResourcePoolPerformanceClassGetPeakIopsAttributeType(arg *ResourcePoolPe */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetThroughputAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetThroughputArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClassGetThroughputRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(arg ResourcePoolPerformanceClassGetThroughputAttributeType) (ret ResourcePoolPerformanceClassGetThroughputRetType, ok bool) { if arg == nil { return ret, false @@ -74,11 +94,13 @@ func getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(arg ResourcePoo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolPerformanceClassGetThroughputAttributeType(arg *ResourcePoolPerformanceClassGetThroughputAttributeType, val ResourcePoolPerformanceClassGetThroughputRetType) { *arg = &val } // ResourcePoolPerformanceClass Information about the performance class +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolPerformanceClass struct { // Name of the performance class Name ResourcePoolPerformanceClassGetNameAttributeType `json:"name,omitempty"` @@ -94,6 +116,7 @@ type ResourcePoolPerformanceClass struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewResourcePoolPerformanceClass() *ResourcePoolPerformanceClass { this := ResourcePoolPerformanceClass{} return &this @@ -102,12 +125,14 @@ func NewResourcePoolPerformanceClass() *ResourcePoolPerformanceClass { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewResourcePoolPerformanceClassWithDefaults() *ResourcePoolPerformanceClass { this := ResourcePoolPerformanceClass{} return &this } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) GetName() (res ResourcePoolPerformanceClassGetNameRetType) { res, _ = o.GetNameOk() return @@ -115,22 +140,26 @@ func (o *ResourcePoolPerformanceClass) GetName() (res ResourcePoolPerformanceCla // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) GetNameOk() (ret ResourcePoolPerformanceClassGetNameRetType, ok bool) { return getResourcePoolPerformanceClassGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) SetName(v ResourcePoolPerformanceClassGetNameRetType) { setResourcePoolPerformanceClassGetNameAttributeType(&o.Name, v) } // GetPeakIops returns the PeakIops field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) GetPeakIops() (res ResourcePoolPerformanceClassGetPeakIopsRetType) { res, _ = o.GetPeakIopsOk() return @@ -138,22 +167,26 @@ func (o *ResourcePoolPerformanceClass) GetPeakIops() (res ResourcePoolPerformanc // GetPeakIopsOk returns a tuple with the PeakIops field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) GetPeakIopsOk() (ret ResourcePoolPerformanceClassGetPeakIopsRetType, ok bool) { return getResourcePoolPerformanceClassGetPeakIopsAttributeTypeOk(o.PeakIops) } // HasPeakIops returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) SetPeakIops(v ResourcePoolPerformanceClassGetPeakIopsRetType) { setResourcePoolPerformanceClassGetPeakIopsAttributeType(&o.PeakIops, v) } // GetThroughput returns the Throughput field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) GetThroughput() (res ResourcePoolPerformanceClassGetThroughputRetType) { res, _ = o.GetThroughputOk() return @@ -161,21 +194,25 @@ func (o *ResourcePoolPerformanceClass) GetThroughput() (res ResourcePoolPerforma // GetThroughputOk returns a tuple with the Throughput field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) GetThroughputOk() (ret ResourcePoolPerformanceClassGetThroughputRetType, ok bool) { return getResourcePoolPerformanceClassGetThroughputAttributeTypeOk(o.Throughput) } // HasThroughput returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolPerformanceClass) SetThroughput(v ResourcePoolPerformanceClassGetThroughputRetType) { setResourcePoolPerformanceClassGetThroughputAttributeType(&o.Throughput, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ResourcePoolPerformanceClass) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getResourcePoolPerformanceClassGetNameAttributeTypeOk(o.Name); ok { @@ -190,37 +227,45 @@ func (o ResourcePoolPerformanceClass) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableResourcePoolPerformanceClass struct { value *ResourcePoolPerformanceClass isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolPerformanceClass) Get() *ResourcePoolPerformanceClass { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolPerformanceClass) Set(val *ResourcePoolPerformanceClass) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolPerformanceClass) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolPerformanceClass) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableResourcePoolPerformanceClass(val *ResourcePoolPerformanceClass) *NullableResourcePoolPerformanceClass { return &NullableResourcePoolPerformanceClass{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolPerformanceClass) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolPerformanceClass) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_resource_pool_snapshot.go b/services/sfs/model_resource_pool_snapshot.go index 0ced29207..76533f323 100644 --- a/services/sfs/model_resource_pool_snapshot.go +++ b/services/sfs/model_resource_pool_snapshot.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &ResourcePoolSnapshot{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetCommentAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSnapshotGetCommentAttributeTypeOk(arg ResourcePoolSnapshotGetCommentAttributeType) (ret ResourcePoolSnapshotGetCommentRetType, ok bool) { if arg == nil { return nil, false @@ -32,6 +35,7 @@ func getResourcePoolSnapshotGetCommentAttributeTypeOk(arg ResourcePoolSnapshotGe return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSnapshotGetCommentAttributeType(arg *ResourcePoolSnapshotGetCommentAttributeType, val ResourcePoolSnapshotGetCommentRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -40,7 +44,10 @@ func setResourcePoolSnapshotGetCommentAttributeType(arg *ResourcePoolSnapshotGet } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetCommentArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetCommentRetType = *string /* @@ -48,10 +55,16 @@ type ResourcePoolSnapshotGetCommentRetType = *string */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg ResourcePoolSnapshotGetCreatedAtAttributeType) (ret ResourcePoolSnapshotGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -59,6 +72,7 @@ func getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(arg ResourcePoolSnapshot return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSnapshotGetCreatedAtAttributeType(arg *ResourcePoolSnapshotGetCreatedAtAttributeType, val ResourcePoolSnapshotGetCreatedAtRetType) { *arg = &val } @@ -68,10 +82,16 @@ func setResourcePoolSnapshotGetCreatedAtAttributeType(arg *ResourcePoolSnapshotG */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetLogicalSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetLogicalSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType) (ret ResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -79,6 +99,7 @@ func getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(arg ResourceP return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *ResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType, val ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { *arg = &val } @@ -88,8 +109,10 @@ func setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(arg *ResourcePo */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetResourcePoolIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg ResourcePoolSnapshotGetResourcePoolIdAttributeType) (ret ResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) { if arg == nil { return ret, false @@ -97,11 +120,15 @@ func getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(arg ResourcePoolSna return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSnapshotGetResourcePoolIdAttributeType(arg *ResourcePoolSnapshotGetResourcePoolIdAttributeType, val ResourcePoolSnapshotGetResourcePoolIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetResourcePoolIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetResourcePoolIdRetType = string /* @@ -109,10 +136,16 @@ type ResourcePoolSnapshotGetResourcePoolIdRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSnapshotGetSizeGigabytesAttributeType) (ret ResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -120,6 +153,7 @@ func getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSnap return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *ResourcePoolSnapshotGetSizeGigabytesAttributeType, val ResourcePoolSnapshotGetSizeGigabytesRetType) { *arg = &val } @@ -129,8 +163,10 @@ func setResourcePoolSnapshotGetSizeGigabytesAttributeType(arg *ResourcePoolSnaps */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetSnapshotNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg ResourcePoolSnapshotGetSnapshotNameAttributeType) (ret ResourcePoolSnapshotGetSnapshotNameRetType, ok bool) { if arg == nil { return ret, false @@ -138,14 +174,19 @@ func getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(arg ResourcePoolSnaps return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSnapshotGetSnapshotNameAttributeType(arg *ResourcePoolSnapshotGetSnapshotNameAttributeType, val ResourcePoolSnapshotGetSnapshotNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetSnapshotNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshotGetSnapshotNameRetType = string // ResourcePoolSnapshot struct for ResourcePoolSnapshot +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSnapshot struct { // (optional) A comment to add more information about a snapshot Comment ResourcePoolSnapshotGetCommentAttributeType `json:"comment,omitempty"` @@ -166,6 +207,7 @@ type ResourcePoolSnapshot struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewResourcePoolSnapshot() *ResourcePoolSnapshot { this := ResourcePoolSnapshot{} return &this @@ -174,12 +216,14 @@ func NewResourcePoolSnapshot() *ResourcePoolSnapshot { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetComment() (res ResourcePoolSnapshotGetCommentRetType) { res, _ = o.GetCommentOk() return @@ -188,32 +232,38 @@ func (o *ResourcePoolSnapshot) GetComment() (res ResourcePoolSnapshotGetCommentR // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetCommentOk() (ret ResourcePoolSnapshotGetCommentRetType, ok bool) { return getResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment) } // HasComment returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetComment(v ResourcePoolSnapshotGetCommentRetType) { setResourcePoolSnapshotGetCommentAttributeType(&o.Comment, v) } // SetCommentNil sets the value for Comment to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetCommentNil() { o.Comment = nil } // UnsetComment ensures that no value is present for Comment, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) UnsetComment() { o.Comment = nil } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetCreatedAt() (res ResourcePoolSnapshotGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -221,22 +271,26 @@ func (o *ResourcePoolSnapshot) GetCreatedAt() (res ResourcePoolSnapshotGetCreate // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetCreatedAtOk() (ret ResourcePoolSnapshotGetCreatedAtRetType, ok bool) { return getResourcePoolSnapshotGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetCreatedAt(v ResourcePoolSnapshotGetCreatedAtRetType) { setResourcePoolSnapshotGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytes() (res ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { res, _ = o.GetLogicalSizeGigabytesOk() return @@ -244,22 +298,26 @@ func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytes() (res ResourcePoolSnapsh // GetLogicalSizeGigabytesOk returns a tuple with the LogicalSizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytesOk() (ret ResourcePoolSnapshotGetLogicalSizeGigabytesRetType, ok bool) { return getResourcePoolSnapshotGetLogicalSizeGigabytesAttributeTypeOk(o.LogicalSizeGigabytes) } // HasLogicalSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetLogicalSizeGigabytes(v ResourcePoolSnapshotGetLogicalSizeGigabytesRetType) { setResourcePoolSnapshotGetLogicalSizeGigabytesAttributeType(&o.LogicalSizeGigabytes, v) } // GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetResourcePoolId() (res ResourcePoolSnapshotGetResourcePoolIdRetType) { res, _ = o.GetResourcePoolIdOk() return @@ -267,22 +325,26 @@ func (o *ResourcePoolSnapshot) GetResourcePoolId() (res ResourcePoolSnapshotGetR // GetResourcePoolIdOk returns a tuple with the ResourcePoolId field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetResourcePoolIdOk() (ret ResourcePoolSnapshotGetResourcePoolIdRetType, ok bool) { return getResourcePoolSnapshotGetResourcePoolIdAttributeTypeOk(o.ResourcePoolId) } // HasResourcePoolId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetResourcePoolId(v ResourcePoolSnapshotGetResourcePoolIdRetType) { setResourcePoolSnapshotGetResourcePoolIdAttributeType(&o.ResourcePoolId, v) } // GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetSizeGigabytes() (res ResourcePoolSnapshotGetSizeGigabytesRetType) { res, _ = o.GetSizeGigabytesOk() return @@ -290,22 +352,26 @@ func (o *ResourcePoolSnapshot) GetSizeGigabytes() (res ResourcePoolSnapshotGetSi // GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetSizeGigabytesOk() (ret ResourcePoolSnapshotGetSizeGigabytesRetType, ok bool) { return getResourcePoolSnapshotGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes) } // HasSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetSizeGigabytes(v ResourcePoolSnapshotGetSizeGigabytesRetType) { setResourcePoolSnapshotGetSizeGigabytesAttributeType(&o.SizeGigabytes, v) } // GetSnapshotName returns the SnapshotName field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetSnapshotName() (res ResourcePoolSnapshotGetSnapshotNameRetType) { res, _ = o.GetSnapshotNameOk() return @@ -313,21 +379,25 @@ func (o *ResourcePoolSnapshot) GetSnapshotName() (res ResourcePoolSnapshotGetSna // GetSnapshotNameOk returns a tuple with the SnapshotName field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) GetSnapshotNameOk() (ret ResourcePoolSnapshotGetSnapshotNameRetType, ok bool) { return getResourcePoolSnapshotGetSnapshotNameAttributeTypeOk(o.SnapshotName) } // HasSnapshotName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSnapshot) SetSnapshotName(v ResourcePoolSnapshotGetSnapshotNameRetType) { setResourcePoolSnapshotGetSnapshotNameAttributeType(&o.SnapshotName, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ResourcePoolSnapshot) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getResourcePoolSnapshotGetCommentAttributeTypeOk(o.Comment); ok { @@ -351,37 +421,45 @@ func (o ResourcePoolSnapshot) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableResourcePoolSnapshot struct { value *ResourcePoolSnapshot isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolSnapshot) Get() *ResourcePoolSnapshot { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolSnapshot) Set(val *ResourcePoolSnapshot) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolSnapshot) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolSnapshot) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableResourcePoolSnapshot(val *ResourcePoolSnapshot) *NullableResourcePoolSnapshot { return &NullableResourcePoolSnapshot{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolSnapshot) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolSnapshot) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_resource_pool_space.go b/services/sfs/model_resource_pool_space.go index 71e46d52f..6a7edbecb 100644 --- a/services/sfs/model_resource_pool_space.go +++ b/services/sfs/model_resource_pool_space.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ResourcePoolSpace{} */ // isDouble +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetAvailableGigabytesAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetAvailableGigabytesArgType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetAvailableGigabytesRetType = *float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetAvailableGigabytesAttributeType) (ret ResourcePoolSpaceGetAvailableGigabytesRetType, ok bool) { if arg == nil { return nil, false @@ -33,6 +40,7 @@ func getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(arg ResourcePoolSp return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSpaceGetAvailableGigabytesAttributeType(arg *ResourcePoolSpaceGetAvailableGigabytesAttributeType, val ResourcePoolSpaceGetAvailableGigabytesRetType) { *arg = val } @@ -42,10 +50,16 @@ func setResourcePoolSpaceGetAvailableGigabytesAttributeType(arg *ResourcePoolSpa */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetSizeGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetSizeGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetSizeGigabytesAttributeType) (ret ResourcePoolSpaceGetSizeGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(arg ResourcePoolSpaceGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSpaceGetSizeGigabytesAttributeType(arg *ResourcePoolSpaceGetSizeGigabytesAttributeType, val ResourcePoolSpaceGetSizeGigabytesRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setResourcePoolSpaceGetSizeGigabytesAttributeType(arg *ResourcePoolSpaceGet */ // isDouble +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetUsedGigabytesAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetUsedGigabytesArgType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpaceGetUsedGigabytesRetType = *float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(arg ResourcePoolSpaceGetUsedGigabytesAttributeType) (ret ResourcePoolSpaceGetUsedGigabytesRetType, ok bool) { if arg == nil { return nil, false @@ -73,11 +94,13 @@ func getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(arg ResourcePoolSpaceGe return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setResourcePoolSpaceGetUsedGigabytesAttributeType(arg *ResourcePoolSpaceGetUsedGigabytesAttributeType, val ResourcePoolSpaceGetUsedGigabytesRetType) { *arg = val } // ResourcePoolSpace Space information +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ResourcePoolSpace struct { // Available space of the Resource Pool (only available when retrieving a single Resource Pool by ID) AvailableGigabytes ResourcePoolSpaceGetAvailableGigabytesAttributeType `json:"availableGigabytes,omitempty"` @@ -92,6 +115,7 @@ type ResourcePoolSpace struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewResourcePoolSpace() *ResourcePoolSpace { this := ResourcePoolSpace{} return &this @@ -100,12 +124,14 @@ func NewResourcePoolSpace() *ResourcePoolSpace { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) GetAvailableGigabytes() (res ResourcePoolSpaceGetAvailableGigabytesRetType) { res, _ = o.GetAvailableGigabytesOk() return @@ -114,32 +140,38 @@ func (o *ResourcePoolSpace) GetAvailableGigabytes() (res ResourcePoolSpaceGetAva // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) GetAvailableGigabytesOk() (ret ResourcePoolSpaceGetAvailableGigabytesRetType, ok bool) { return getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(o.AvailableGigabytes) } // HasAvailableGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) SetAvailableGigabytes(v ResourcePoolSpaceGetAvailableGigabytesRetType) { setResourcePoolSpaceGetAvailableGigabytesAttributeType(&o.AvailableGigabytes, v) } // SetAvailableGigabytesNil sets the value for AvailableGigabytes to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) SetAvailableGigabytesNil() { o.AvailableGigabytes = nil } // UnsetAvailableGigabytes ensures that no value is present for AvailableGigabytes, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) UnsetAvailableGigabytes() { o.AvailableGigabytes = nil } // GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) GetSizeGigabytes() (res ResourcePoolSpaceGetSizeGigabytesRetType) { res, _ = o.GetSizeGigabytesOk() return @@ -147,22 +179,26 @@ func (o *ResourcePoolSpace) GetSizeGigabytes() (res ResourcePoolSpaceGetSizeGiga // GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) GetSizeGigabytesOk() (ret ResourcePoolSpaceGetSizeGigabytesRetType, ok bool) { return getResourcePoolSpaceGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes) } // HasSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) GetUsedGigabytes() (res ResourcePoolSpaceGetUsedGigabytesRetType) { res, _ = o.GetUsedGigabytesOk() return @@ -171,31 +207,37 @@ func (o *ResourcePoolSpace) GetUsedGigabytes() (res ResourcePoolSpaceGetUsedGiga // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) GetUsedGigabytesOk() (ret ResourcePoolSpaceGetUsedGigabytesRetType, ok bool) { return getResourcePoolSpaceGetUsedGigabytesAttributeTypeOk(o.UsedGigabytes) } // HasUsedGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) SetUsedGigabytes(v ResourcePoolSpaceGetUsedGigabytesRetType) { setResourcePoolSpaceGetUsedGigabytesAttributeType(&o.UsedGigabytes, v) } // SetUsedGigabytesNil sets the value for UsedGigabytes to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) SetUsedGigabytesNil() { o.UsedGigabytes = nil } // UnsetUsedGigabytes ensures that no value is present for UsedGigabytes, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ResourcePoolSpace) UnsetUsedGigabytes() { o.UsedGigabytes = nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ResourcePoolSpace) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getResourcePoolSpaceGetAvailableGigabytesAttributeTypeOk(o.AvailableGigabytes); ok { @@ -210,37 +252,45 @@ func (o ResourcePoolSpace) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableResourcePoolSpace struct { value *ResourcePoolSpace isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolSpace) Get() *ResourcePoolSpace { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolSpace) Set(val *ResourcePoolSpace) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolSpace) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolSpace) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableResourcePoolSpace(val *ResourcePoolSpace) *NullableResourcePoolSpace { return &NullableResourcePoolSpace{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableResourcePoolSpace) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableResourcePoolSpace) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_share.go b/services/sfs/model_share.go index acf07c5f0..1af2f7231 100644 --- a/services/sfs/model_share.go +++ b/services/sfs/model_share.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &Share{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetCreatedAtAttributeTypeOk(arg ShareGetCreatedAtAttributeType) (ret ShareGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getShareGetCreatedAtAttributeTypeOk(arg ShareGetCreatedAtAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetCreatedAtAttributeType(arg *ShareGetCreatedAtAttributeType, val ShareGetCreatedAtRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setShareGetCreatedAtAttributeType(arg *ShareGetCreatedAtAttributeType, val */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetExportPolicyAttributeType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetExportPolicyArgType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetExportPolicyRetType = *NullableShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetExportPolicyAttributeTypeOk(arg ShareGetExportPolicyAttributeType) (ret ShareGetExportPolicyRetType, ok bool) { if arg == nil { return nil, false @@ -54,6 +68,7 @@ func getShareGetExportPolicyAttributeTypeOk(arg ShareGetExportPolicyAttributeTyp return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetExportPolicyAttributeType(arg *ShareGetExportPolicyAttributeType, val ShareGetExportPolicyRetType) { *arg = val } @@ -63,8 +78,10 @@ func setShareGetExportPolicyAttributeType(arg *ShareGetExportPolicyAttributeType */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetIdAttributeTypeOk(arg ShareGetIdAttributeType) (ret ShareGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getShareGetIdAttributeTypeOk(arg ShareGetIdAttributeType) (ret ShareGetIdRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetIdAttributeType(arg *ShareGetIdAttributeType, val ShareGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetIdRetType = string /* @@ -84,10 +105,16 @@ type ShareGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetLabelsAttributeTypeOk(arg ShareGetLabelsAttributeType) (ret ShareGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +122,7 @@ func getShareGetLabelsAttributeTypeOk(arg ShareGetLabelsAttributeType) (ret Shar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetLabelsAttributeType(arg *ShareGetLabelsAttributeType, val ShareGetLabelsRetType) { *arg = &val } @@ -104,8 +132,10 @@ func setShareGetLabelsAttributeType(arg *ShareGetLabelsAttributeType, val ShareG */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetMountPathAttributeTypeOk(arg ShareGetMountPathAttributeType) (ret ShareGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +143,15 @@ func getShareGetMountPathAttributeTypeOk(arg ShareGetMountPathAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetMountPathAttributeType(arg *ShareGetMountPathAttributeType, val ShareGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetMountPathRetType = string /* @@ -125,8 +159,10 @@ type ShareGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetNameAttributeTypeOk(arg ShareGetNameAttributeType) (ret ShareGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -134,11 +170,15 @@ func getShareGetNameAttributeTypeOk(arg ShareGetNameAttributeType) (ret ShareGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetNameAttributeType(arg *ShareGetNameAttributeType, val ShareGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetNameRetType = string /* @@ -146,10 +186,16 @@ type ShareGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetSpaceHardLimitGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetSpaceHardLimitGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetSpaceHardLimitGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg ShareGetSpaceHardLimitGigabytesAttributeType) (ret ShareGetSpaceHardLimitGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -157,6 +203,7 @@ func getShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg ShareGetSpaceHardLimi return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetSpaceHardLimitGigabytesAttributeType(arg *ShareGetSpaceHardLimitGigabytesAttributeType, val ShareGetSpaceHardLimitGigabytesRetType) { *arg = &val } @@ -166,8 +213,10 @@ func setShareGetSpaceHardLimitGigabytesAttributeType(arg *ShareGetSpaceHardLimit */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareGetStateAttributeTypeOk(arg ShareGetStateAttributeType) (ret ShareGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -175,14 +224,19 @@ func getShareGetStateAttributeTypeOk(arg ShareGetStateAttributeType) (ret ShareG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareGetStateAttributeType(arg *ShareGetStateAttributeType, val ShareGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareGetStateRetType = string // Share struct for Share +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Share struct { CreatedAt ShareGetCreatedAtAttributeType `json:"createdAt,omitempty"` ExportPolicy ShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"` @@ -205,6 +259,7 @@ type Share struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewShare() *Share { this := Share{} return &this @@ -213,12 +268,14 @@ func NewShare() *Share { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewShareWithDefaults() *Share { this := Share{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetCreatedAt() (res ShareGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -226,22 +283,26 @@ func (o *Share) GetCreatedAt() (res ShareGetCreatedAtRetType) { // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetCreatedAtOk() (ret ShareGetCreatedAtRetType, ok bool) { return getShareGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetExportPolicy() (res ShareGetExportPolicyRetType) { res, _ = o.GetExportPolicyOk() return @@ -250,32 +311,38 @@ func (o *Share) GetExportPolicy() (res ShareGetExportPolicyRetType) { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetExportPolicyOk() (ret ShareGetExportPolicyRetType, ok bool) { return getShareGetExportPolicyAttributeTypeOk(o.ExportPolicy) } // HasExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetExportPolicy(v ShareGetExportPolicyRetType) { setShareGetExportPolicyAttributeType(&o.ExportPolicy, v) } // SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetExportPolicyNil() { o.ExportPolicy = nil } // UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) UnsetExportPolicy() { o.ExportPolicy = nil } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetId() (res ShareGetIdRetType) { res, _ = o.GetIdOk() return @@ -283,22 +350,26 @@ func (o *Share) GetId() (res ShareGetIdRetType) { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetIdOk() (ret ShareGetIdRetType, ok bool) { return getShareGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetId(v ShareGetIdRetType) { setShareGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetLabels() (res ShareGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -306,22 +377,26 @@ func (o *Share) GetLabels() (res ShareGetLabelsRetType) { // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetLabelsOk() (ret ShareGetLabelsRetType, ok bool) { return getShareGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetLabels(v ShareGetLabelsRetType) { setShareGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetMountPath() (res ShareGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -329,22 +404,26 @@ func (o *Share) GetMountPath() (res ShareGetMountPathRetType) { // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetMountPathOk() (ret ShareGetMountPathRetType, ok bool) { return getShareGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetMountPath(v ShareGetMountPathRetType) { setShareGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetName() (res ShareGetNameRetType) { res, _ = o.GetNameOk() return @@ -352,22 +431,26 @@ func (o *Share) GetName() (res ShareGetNameRetType) { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetNameOk() (ret ShareGetNameRetType, ok bool) { return getShareGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetName(v ShareGetNameRetType) { setShareGetNameAttributeType(&o.Name, v) } // GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetSpaceHardLimitGigabytes() (res ShareGetSpaceHardLimitGigabytesRetType) { res, _ = o.GetSpaceHardLimitGigabytesOk() return @@ -375,22 +458,26 @@ func (o *Share) GetSpaceHardLimitGigabytes() (res ShareGetSpaceHardLimitGigabyte // GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetSpaceHardLimitGigabytesOk() (ret ShareGetSpaceHardLimitGigabytesRetType, ok bool) { return getShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes) } // HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetSpaceHardLimitGigabytes(v ShareGetSpaceHardLimitGigabytesRetType) { setShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetState() (res ShareGetStateRetType) { res, _ = o.GetStateOk() return @@ -398,21 +485,25 @@ func (o *Share) GetState() (res ShareGetStateRetType) { // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) GetStateOk() (ret ShareGetStateRetType, ok bool) { return getShareGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Share) SetState(v ShareGetStateRetType) { setShareGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Share) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -442,37 +533,45 @@ func (o Share) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableShare struct { value *Share isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShare) Get() *Share { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShare) Set(val *Share) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShare) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShare) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableShare(val *Share) *NullableShare { return &NullableShare{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShare) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShare) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_share_export_policy.go b/services/sfs/model_share_export_policy.go index 0cb949a30..86656b987 100644 --- a/services/sfs/model_share_export_policy.go +++ b/services/sfs/model_share_export_policy.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &ShareExportPolicy{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyGetCreatedAtAttributeTypeOk(arg ShareExportPolicyGetCreatedAtAttributeType) (ret ShareExportPolicyGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getShareExportPolicyGetCreatedAtAttributeTypeOk(arg ShareExportPolicyGetCre return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyGetCreatedAtAttributeType(arg *ShareExportPolicyGetCreatedAtAttributeType, val ShareExportPolicyGetCreatedAtRetType) { *arg = &val } @@ -43,8 +51,10 @@ func setShareExportPolicyGetCreatedAtAttributeType(arg *ShareExportPolicyGetCrea */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyGetIdAttributeTypeOk(arg ShareExportPolicyGetIdAttributeType) (ret ShareExportPolicyGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +62,15 @@ func getShareExportPolicyGetIdAttributeTypeOk(arg ShareExportPolicyGetIdAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyGetIdAttributeType(arg *ShareExportPolicyGetIdAttributeType, val ShareExportPolicyGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetIdRetType = string /* @@ -64,10 +78,16 @@ type ShareExportPolicyGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyGetLabelsAttributeTypeOk(arg ShareExportPolicyGetLabelsAttributeType) (ret ShareExportPolicyGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getShareExportPolicyGetLabelsAttributeTypeOk(arg ShareExportPolicyGetLabels return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyGetLabelsAttributeType(arg *ShareExportPolicyGetLabelsAttributeType, val ShareExportPolicyGetLabelsRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setShareExportPolicyGetLabelsAttributeType(arg *ShareExportPolicyGetLabelsA */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyGetNameAttributeTypeOk(arg ShareExportPolicyGetNameAttributeType) (ret ShareExportPolicyGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getShareExportPolicyGetNameAttributeTypeOk(arg ShareExportPolicyGetNameAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyGetNameAttributeType(arg *ShareExportPolicyGetNameAttributeType, val ShareExportPolicyGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetNameRetType = string /* @@ -105,10 +132,16 @@ type ShareExportPolicyGetNameRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetRulesAttributeType = *[]ShareExportPolicyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetRulesArgType = []ShareExportPolicyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetRulesRetType = []ShareExportPolicyRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyGetRulesAttributeTypeOk(arg ShareExportPolicyGetRulesAttributeType) (ret ShareExportPolicyGetRulesRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getShareExportPolicyGetRulesAttributeTypeOk(arg ShareExportPolicyGetRulesAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyGetRulesAttributeType(arg *ShareExportPolicyGetRulesAttributeType, val ShareExportPolicyGetRulesRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setShareExportPolicyGetRulesAttributeType(arg *ShareExportPolicyGetRulesAtt */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetSharesUsingExportPolicyAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetSharesUsingExportPolicyArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyGetSharesUsingExportPolicyRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg ShareExportPolicyGetSharesUsingExportPolicyAttributeType) (ret ShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) { if arg == nil { return ret, false @@ -136,11 +176,13 @@ func getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(arg ShareExpo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicy struct { CreatedAt ShareExportPolicyGetCreatedAtAttributeType `json:"createdAt,omitempty"` // ID of the Share Export Policy @@ -160,6 +202,7 @@ type ShareExportPolicy struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewShareExportPolicy() *ShareExportPolicy { this := ShareExportPolicy{} return &this @@ -168,12 +211,14 @@ func NewShareExportPolicy() *ShareExportPolicy { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewShareExportPolicyWithDefaults() *ShareExportPolicy { this := ShareExportPolicy{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetCreatedAt() (res ShareExportPolicyGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -181,22 +226,26 @@ func (o *ShareExportPolicy) GetCreatedAt() (res ShareExportPolicyGetCreatedAtRet // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetCreatedAtOk() (ret ShareExportPolicyGetCreatedAtRetType, ok bool) { return getShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) SetCreatedAt(v ShareExportPolicyGetCreatedAtRetType) { setShareExportPolicyGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetId() (res ShareExportPolicyGetIdRetType) { res, _ = o.GetIdOk() return @@ -204,22 +253,26 @@ func (o *ShareExportPolicy) GetId() (res ShareExportPolicyGetIdRetType) { // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetIdOk() (ret ShareExportPolicyGetIdRetType, ok bool) { return getShareExportPolicyGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) SetId(v ShareExportPolicyGetIdRetType) { setShareExportPolicyGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetLabels() (res ShareExportPolicyGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -227,22 +280,26 @@ func (o *ShareExportPolicy) GetLabels() (res ShareExportPolicyGetLabelsRetType) // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetLabelsOk() (ret ShareExportPolicyGetLabelsRetType, ok bool) { return getShareExportPolicyGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) SetLabels(v ShareExportPolicyGetLabelsRetType) { setShareExportPolicyGetLabelsAttributeType(&o.Labels, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetName() (res ShareExportPolicyGetNameRetType) { res, _ = o.GetNameOk() return @@ -250,22 +307,26 @@ func (o *ShareExportPolicy) GetName() (res ShareExportPolicyGetNameRetType) { // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetNameOk() (ret ShareExportPolicyGetNameRetType, ok bool) { return getShareExportPolicyGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) SetName(v ShareExportPolicyGetNameRetType) { setShareExportPolicyGetNameAttributeType(&o.Name, v) } // GetRules returns the Rules field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetRules() (res ShareExportPolicyGetRulesRetType) { res, _ = o.GetRulesOk() return @@ -273,22 +334,26 @@ func (o *ShareExportPolicy) GetRules() (res ShareExportPolicyGetRulesRetType) { // GetRulesOk returns a tuple with the Rules field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetRulesOk() (ret ShareExportPolicyGetRulesRetType, ok bool) { return getShareExportPolicyGetRulesAttributeTypeOk(o.Rules) } // HasRules returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) SetRules(v ShareExportPolicyGetRulesRetType) { setShareExportPolicyGetRulesAttributeType(&o.Rules, v) } // GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetSharesUsingExportPolicy() (res ShareExportPolicyGetSharesUsingExportPolicyRetType) { res, _ = o.GetSharesUsingExportPolicyOk() return @@ -296,21 +361,25 @@ func (o *ShareExportPolicy) GetSharesUsingExportPolicy() (res ShareExportPolicyG // GetSharesUsingExportPolicyOk returns a tuple with the SharesUsingExportPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) GetSharesUsingExportPolicyOk() (ret ShareExportPolicyGetSharesUsingExportPolicyRetType, ok bool) { return getShareExportPolicyGetSharesUsingExportPolicyAttributeTypeOk(o.SharesUsingExportPolicy) } // HasSharesUsingExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicy) SetSharesUsingExportPolicy(v ShareExportPolicyGetSharesUsingExportPolicyRetType) { setShareExportPolicyGetSharesUsingExportPolicyAttributeType(&o.SharesUsingExportPolicy, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ShareExportPolicy) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getShareExportPolicyGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -334,37 +403,45 @@ func (o ShareExportPolicy) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableShareExportPolicy struct { value *ShareExportPolicy isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShareExportPolicy) Get() *ShareExportPolicy { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShareExportPolicy) Set(val *ShareExportPolicy) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShareExportPolicy) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShareExportPolicy) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableShareExportPolicy(val *ShareExportPolicy) *NullableShareExportPolicy { return &NullableShareExportPolicy{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShareExportPolicy) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShareExportPolicy) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_share_export_policy_rule.go b/services/sfs/model_share_export_policy_rule.go index b0b32f433..f2246e29a 100644 --- a/services/sfs/model_share_export_policy_rule.go +++ b/services/sfs/model_share_export_policy_rule.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &ShareExportPolicyRule{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(arg ShareExportPolicyRuleGetCreatedAtAttributeType) (ret ShareExportPolicyRuleGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(arg ShareExportPolicyRu return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRuleGetCreatedAtAttributeType(arg *ShareExportPolicyRuleGetCreatedAtAttributeType, val ShareExportPolicyRuleGetCreatedAtRetType) { *arg = &val } @@ -43,8 +51,10 @@ func setShareExportPolicyRuleGetCreatedAtAttributeType(arg *ShareExportPolicyRul */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetDescriptionAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRuleGetDescriptionAttributeTypeOk(arg ShareExportPolicyRuleGetDescriptionAttributeType) (ret ShareExportPolicyRuleGetDescriptionRetType, ok bool) { if arg == nil { return nil, false @@ -52,6 +62,7 @@ func getShareExportPolicyRuleGetDescriptionAttributeTypeOk(arg ShareExportPolicy return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRuleGetDescriptionAttributeType(arg *ShareExportPolicyRuleGetDescriptionAttributeType, val ShareExportPolicyRuleGetDescriptionRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -60,7 +71,10 @@ func setShareExportPolicyRuleGetDescriptionAttributeType(arg *ShareExportPolicyR } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetDescriptionArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetDescriptionRetType = *string /* @@ -68,8 +82,10 @@ type ShareExportPolicyRuleGetDescriptionRetType = *string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRuleGetIdAttributeTypeOk(arg ShareExportPolicyRuleGetIdAttributeType) (ret ShareExportPolicyRuleGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -77,11 +93,15 @@ func getShareExportPolicyRuleGetIdAttributeTypeOk(arg ShareExportPolicyRuleGetId return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRuleGetIdAttributeType(arg *ShareExportPolicyRuleGetIdAttributeType, val ShareExportPolicyRuleGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetIdRetType = string /* @@ -89,10 +109,16 @@ type ShareExportPolicyRuleGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRuleGetIpAclAttributeTypeOk(arg ShareExportPolicyRuleGetIpAclAttributeType) (ret ShareExportPolicyRuleGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -100,6 +126,7 @@ func getShareExportPolicyRuleGetIpAclAttributeTypeOk(arg ShareExportPolicyRuleGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRuleGetIpAclAttributeType(arg *ShareExportPolicyRuleGetIpAclAttributeType, val ShareExportPolicyRuleGetIpAclRetType) { *arg = &val } @@ -109,10 +136,16 @@ func setShareExportPolicyRuleGetIpAclAttributeType(arg *ShareExportPolicyRuleGet */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetOrderAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetOrderArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRuleGetOrderRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRuleGetOrderAttributeTypeOk(arg ShareExportPolicyRuleGetOrderAttributeType) (ret ShareExportPolicyRuleGetOrderRetType, ok bool) { if arg == nil { return ret, false @@ -120,6 +153,7 @@ func getShareExportPolicyRuleGetOrderAttributeTypeOk(arg ShareExportPolicyRuleGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRuleGetOrderAttributeType(arg *ShareExportPolicyRuleGetOrderAttributeType, val ShareExportPolicyRuleGetOrderRetType) { *arg = &val } @@ -129,10 +163,16 @@ func setShareExportPolicyRuleGetOrderAttributeType(arg *ShareExportPolicyRuleGet */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetReadOnlyAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetReadOnlyArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetReadOnlyRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRulegetReadOnlyAttributeTypeOk(arg ShareExportPolicyRulegetReadOnlyAttributeType) (ret ShareExportPolicyRulegetReadOnlyRetType, ok bool) { if arg == nil { return ret, false @@ -140,6 +180,7 @@ func getShareExportPolicyRulegetReadOnlyAttributeTypeOk(arg ShareExportPolicyRul return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRulegetReadOnlyAttributeType(arg *ShareExportPolicyRulegetReadOnlyAttributeType, val ShareExportPolicyRulegetReadOnlyRetType) { *arg = &val } @@ -149,10 +190,16 @@ func setShareExportPolicyRulegetReadOnlyAttributeType(arg *ShareExportPolicyRule */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetSetUuidAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetSetUuidArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetSetUuidRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRulegetSetUuidAttributeTypeOk(arg ShareExportPolicyRulegetSetUuidAttributeType) (ret ShareExportPolicyRulegetSetUuidRetType, ok bool) { if arg == nil { return ret, false @@ -160,6 +207,7 @@ func getShareExportPolicyRulegetSetUuidAttributeTypeOk(arg ShareExportPolicyRule return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRulegetSetUuidAttributeType(arg *ShareExportPolicyRulegetSetUuidAttributeType, val ShareExportPolicyRulegetSetUuidRetType) { *arg = &val } @@ -169,10 +217,16 @@ func setShareExportPolicyRulegetSetUuidAttributeType(arg *ShareExportPolicyRuleg */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetSuperUserAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetSuperUserArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRulegetSuperUserRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShareExportPolicyRulegetSuperUserAttributeTypeOk(arg ShareExportPolicyRulegetSuperUserAttributeType) (ret ShareExportPolicyRulegetSuperUserRetType, ok bool) { if arg == nil { return ret, false @@ -180,11 +234,13 @@ func getShareExportPolicyRulegetSuperUserAttributeTypeOk(arg ShareExportPolicyRu return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShareExportPolicyRulegetSuperUserAttributeType(arg *ShareExportPolicyRulegetSuperUserAttributeType, val ShareExportPolicyRulegetSuperUserRetType) { *arg = &val } // ShareExportPolicyRule struct for ShareExportPolicyRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShareExportPolicyRule struct { CreatedAt ShareExportPolicyRuleGetCreatedAtAttributeType `json:"createdAt,omitempty"` // Description of the Rule (optional) @@ -208,6 +264,7 @@ type ShareExportPolicyRule struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewShareExportPolicyRule() *ShareExportPolicyRule { this := ShareExportPolicyRule{} return &this @@ -216,12 +273,14 @@ func NewShareExportPolicyRule() *ShareExportPolicyRule { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewShareExportPolicyRuleWithDefaults() *ShareExportPolicyRule { this := ShareExportPolicyRule{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetCreatedAt() (res ShareExportPolicyRuleGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -229,22 +288,26 @@ func (o *ShareExportPolicyRule) GetCreatedAt() (res ShareExportPolicyRuleGetCrea // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetCreatedAtOk() (ret ShareExportPolicyRuleGetCreatedAtRetType, ok bool) { return getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetDescription() (res ShareExportPolicyRuleGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -253,32 +316,38 @@ func (o *ShareExportPolicyRule) GetDescription() (res ShareExportPolicyRuleGetDe // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetDescriptionOk() (ret ShareExportPolicyRuleGetDescriptionRetType, ok bool) { return getShareExportPolicyRuleGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetDescription(v ShareExportPolicyRuleGetDescriptionRetType) { setShareExportPolicyRuleGetDescriptionAttributeType(&o.Description, v) } // SetDescriptionNil sets the value for Description to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetDescriptionNil() { o.Description = nil } // UnsetDescription ensures that no value is present for Description, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) UnsetDescription() { o.Description = nil } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetId() (res ShareExportPolicyRuleGetIdRetType) { res, _ = o.GetIdOk() return @@ -286,22 +355,26 @@ func (o *ShareExportPolicyRule) GetId() (res ShareExportPolicyRuleGetIdRetType) // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetIdOk() (ret ShareExportPolicyRuleGetIdRetType, ok bool) { return getShareExportPolicyRuleGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetId(v ShareExportPolicyRuleGetIdRetType) { setShareExportPolicyRuleGetIdAttributeType(&o.Id, v) } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetIpAcl() (res ShareExportPolicyRuleGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -309,22 +382,26 @@ func (o *ShareExportPolicyRule) GetIpAcl() (res ShareExportPolicyRuleGetIpAclRet // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetIpAclOk() (ret ShareExportPolicyRuleGetIpAclRetType, ok bool) { return getShareExportPolicyRuleGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetIpAcl(v ShareExportPolicyRuleGetIpAclRetType) { setShareExportPolicyRuleGetIpAclAttributeType(&o.IpAcl, v) } // GetOrder returns the Order field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetOrder() (res ShareExportPolicyRuleGetOrderRetType) { res, _ = o.GetOrderOk() return @@ -332,22 +409,26 @@ func (o *ShareExportPolicyRule) GetOrder() (res ShareExportPolicyRuleGetOrderRet // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetOrderOk() (ret ShareExportPolicyRuleGetOrderRetType, ok bool) { return getShareExportPolicyRuleGetOrderAttributeTypeOk(o.Order) } // HasOrder returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetOrder(v ShareExportPolicyRuleGetOrderRetType) { setShareExportPolicyRuleGetOrderAttributeType(&o.Order, v) } // GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetReadOnly() (res ShareExportPolicyRulegetReadOnlyRetType) { res, _ = o.GetReadOnlyOk() return @@ -355,22 +436,26 @@ func (o *ShareExportPolicyRule) GetReadOnly() (res ShareExportPolicyRulegetReadO // GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetReadOnlyOk() (ret ShareExportPolicyRulegetReadOnlyRetType, ok bool) { return getShareExportPolicyRulegetReadOnlyAttributeTypeOk(o.ReadOnly) } // HasReadOnly returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetReadOnly(v ShareExportPolicyRulegetReadOnlyRetType) { setShareExportPolicyRulegetReadOnlyAttributeType(&o.ReadOnly, v) } // GetSetUuid returns the SetUuid field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetSetUuid() (res ShareExportPolicyRulegetSetUuidRetType) { res, _ = o.GetSetUuidOk() return @@ -378,22 +463,26 @@ func (o *ShareExportPolicyRule) GetSetUuid() (res ShareExportPolicyRulegetSetUui // GetSetUuidOk returns a tuple with the SetUuid field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetSetUuidOk() (ret ShareExportPolicyRulegetSetUuidRetType, ok bool) { return getShareExportPolicyRulegetSetUuidAttributeTypeOk(o.SetUuid) } // HasSetUuid returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetSetUuid(v ShareExportPolicyRulegetSetUuidRetType) { setShareExportPolicyRulegetSetUuidAttributeType(&o.SetUuid, v) } // GetSuperUser returns the SuperUser field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetSuperUser() (res ShareExportPolicyRulegetSuperUserRetType) { res, _ = o.GetSuperUserOk() return @@ -401,21 +490,25 @@ func (o *ShareExportPolicyRule) GetSuperUser() (res ShareExportPolicyRulegetSupe // GetSuperUserOk returns a tuple with the SuperUser field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) GetSuperUserOk() (ret ShareExportPolicyRulegetSuperUserRetType, ok bool) { return getShareExportPolicyRulegetSuperUserAttributeTypeOk(o.SuperUser) } // HasSuperUser returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ShareExportPolicyRule) SetSuperUser(v ShareExportPolicyRulegetSuperUserRetType) { setShareExportPolicyRulegetSuperUserAttributeType(&o.SuperUser, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ShareExportPolicyRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getShareExportPolicyRuleGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -445,37 +538,45 @@ func (o ShareExportPolicyRule) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableShareExportPolicyRule struct { value *ShareExportPolicyRule isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShareExportPolicyRule) Get() *ShareExportPolicyRule { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShareExportPolicyRule) Set(val *ShareExportPolicyRule) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShareExportPolicyRule) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShareExportPolicyRule) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableShareExportPolicyRule(val *ShareExportPolicyRule) *NullableShareExportPolicyRule { return &NullableShareExportPolicyRule{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShareExportPolicyRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShareExportPolicyRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_status.go b/services/sfs/model_status.go index 48f4d3db7..bc1cea2f9 100644 --- a/services/sfs/model_status.go +++ b/services/sfs/model_status.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Status{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetCodeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetCodeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetCodeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret StatusGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getStatusGetCodeAttributeTypeOk(arg StatusGetCodeAttributeType) (ret Status return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGetCodeRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setStatusGetCodeAttributeType(arg *StatusGetCodeAttributeType, val StatusGe */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetDetailsAttributeType = *[]GoogleProtobufAny + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetDetailsArgType = []GoogleProtobufAny + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetDetailsRetType = []GoogleProtobufAny +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret StatusGetDetailsRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getStatusGetDetailsAttributeTypeOk(arg StatusGetDetailsAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val StatusGetDetailsRetType) { *arg = &val } @@ -62,8 +77,10 @@ func setStatusGetDetailsAttributeType(arg *StatusGetDetailsAttributeType, val St */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret StatusGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -71,14 +88,19 @@ func getStatusGetMessageAttributeTypeOk(arg StatusGetMessageAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStatusGetMessageAttributeType(arg *StatusGetMessageAttributeType, val StatusGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StatusGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. @@ -93,6 +115,7 @@ type Status struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewStatus() *Status { this := Status{} return &this @@ -101,12 +124,14 @@ func NewStatus() *Status { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewStatusWithDefaults() *Status { this := Status{} return &this } // GetCode returns the Code field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) GetCode() (res StatusGetCodeRetType) { res, _ = o.GetCodeOk() return @@ -114,22 +139,26 @@ func (o *Status) GetCode() (res StatusGetCodeRetType) { // GetCodeOk returns a tuple with the Code field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) GetCodeOk() (ret StatusGetCodeRetType, ok bool) { return getStatusGetCodeAttributeTypeOk(o.Code) } // HasCode returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) SetCode(v StatusGetCodeRetType) { setStatusGetCodeAttributeType(&o.Code, v) } // GetDetails returns the Details field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) GetDetails() (res StatusGetDetailsRetType) { res, _ = o.GetDetailsOk() return @@ -137,22 +166,26 @@ func (o *Status) GetDetails() (res StatusGetDetailsRetType) { // GetDetailsOk returns a tuple with the Details field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) GetDetailsOk() (ret StatusGetDetailsRetType, ok bool) { return getStatusGetDetailsAttributeTypeOk(o.Details) } // HasDetails returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) SetDetails(v StatusGetDetailsRetType) { setStatusGetDetailsAttributeType(&o.Details, v) } // GetMessage returns the Message field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) GetMessage() (res StatusGetMessageRetType) { res, _ = o.GetMessageOk() return @@ -160,21 +193,25 @@ func (o *Status) GetMessage() (res StatusGetMessageRetType) { // GetMessageOk returns a tuple with the Message field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) GetMessageOk() (ret StatusGetMessageRetType, ok bool) { return getStatusGetMessageAttributeTypeOk(o.Message) } // HasMessage returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Status) SetMessage(v StatusGetMessageRetType) { setStatusGetMessageAttributeType(&o.Message, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Status) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getStatusGetCodeAttributeTypeOk(o.Code); ok { @@ -189,37 +226,45 @@ func (o Status) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableStatus struct { value *Status isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableStatus) Get() *Status { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableStatus) Set(val *Status) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableStatus) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableStatus) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableStatus(val *Status) *NullableStatus { return &NullableStatus{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableStatus) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_resource_pool_payload.go b/services/sfs/model_update_resource_pool_payload.go index 44706e3bb..4d1102e2f 100644 --- a/services/sfs/model_update_resource_pool_payload.go +++ b/services/sfs/model_update_resource_pool_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateResourcePoolPayload{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(arg UpdateResourcePoolPayloadGetIpAclAttributeType) (ret UpdateResourcePoolPayloadGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(arg UpdateResourcePoolP return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolPayloadGetIpAclAttributeType(arg *UpdateResourcePoolPayloadGetIpAclAttributeType, val UpdateResourcePoolPayloadGetIpAclRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setUpdateResourcePoolPayloadGetIpAclAttributeType(arg *UpdateResourcePoolPa */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(arg UpdateResourcePoolPayloadGetLabelsAttributeType) (ret UpdateResourcePoolPayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(arg UpdateResourcePool return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolPayloadGetLabelsAttributeType(arg *UpdateResourcePoolPayloadGetLabelsAttributeType, val UpdateResourcePoolPayloadGetLabelsRetType) { *arg = &val } @@ -62,8 +77,10 @@ func setUpdateResourcePoolPayloadGetLabelsAttributeType(arg *UpdateResourcePoolP */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetPerformanceClassAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg UpdateResourcePoolPayloadGetPerformanceClassAttributeType) (ret UpdateResourcePoolPayloadGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false @@ -71,11 +88,15 @@ func getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(arg UpdateRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolPayloadGetPerformanceClassAttributeType(arg *UpdateResourcePoolPayloadGetPerformanceClassAttributeType, val UpdateResourcePoolPayloadGetPerformanceClassRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetPerformanceClassArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetPerformanceClassRetType = string /* @@ -83,10 +104,16 @@ type UpdateResourcePoolPayloadGetPerformanceClassRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetSizeGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetSizeGigabytesArgType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadGetSizeGigabytesRetType = *int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg UpdateResourcePoolPayloadGetSizeGigabytesAttributeType) (ret UpdateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) { if arg == nil { return nil, false @@ -94,6 +121,7 @@ func getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(arg UpdateResou return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *UpdateResourcePoolPayloadGetSizeGigabytesAttributeType, val UpdateResourcePoolPayloadGetSizeGigabytesRetType) { *arg = val } @@ -103,10 +131,16 @@ func setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(arg *UpdateResour */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadgetSnapshotsAreVisibleArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType) (ret UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) { if arg == nil { return ret, false @@ -114,11 +148,13 @@ func getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(arg Updat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(arg *UpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType, val UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { *arg = &val } // UpdateResourcePoolPayload struct for UpdateResourcePoolPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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"` @@ -137,6 +173,7 @@ type UpdateResourcePoolPayload struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateResourcePoolPayload() *UpdateResourcePoolPayload { this := UpdateResourcePoolPayload{} return &this @@ -145,12 +182,14 @@ func NewUpdateResourcePoolPayload() *UpdateResourcePoolPayload { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateResourcePoolPayloadWithDefaults() *UpdateResourcePoolPayload { this := UpdateResourcePoolPayload{} return &this } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetIpAcl() (res UpdateResourcePoolPayloadGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -158,22 +197,26 @@ func (o *UpdateResourcePoolPayload) GetIpAcl() (res UpdateResourcePoolPayloadGet // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetIpAclOk() (ret UpdateResourcePoolPayloadGetIpAclRetType, ok bool) { return getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) SetIpAcl(v UpdateResourcePoolPayloadGetIpAclRetType) { setUpdateResourcePoolPayloadGetIpAclAttributeType(&o.IpAcl, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetLabels() (res UpdateResourcePoolPayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -181,22 +224,26 @@ func (o *UpdateResourcePoolPayload) GetLabels() (res UpdateResourcePoolPayloadGe // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetLabelsOk() (ret UpdateResourcePoolPayloadGetLabelsRetType, ok bool) { return getUpdateResourcePoolPayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) SetLabels(v UpdateResourcePoolPayloadGetLabelsRetType) { setUpdateResourcePoolPayloadGetLabelsAttributeType(&o.Labels, v) } // GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetPerformanceClass() (res UpdateResourcePoolPayloadGetPerformanceClassRetType) { res, _ = o.GetPerformanceClassOk() return @@ -204,22 +251,26 @@ func (o *UpdateResourcePoolPayload) GetPerformanceClass() (res UpdateResourcePoo // GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetPerformanceClassOk() (ret UpdateResourcePoolPayloadGetPerformanceClassRetType, ok bool) { return getUpdateResourcePoolPayloadGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // HasPerformanceClass returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetSizeGigabytes() (res UpdateResourcePoolPayloadGetSizeGigabytesRetType) { res, _ = o.GetSizeGigabytesOk() return @@ -228,32 +279,38 @@ func (o *UpdateResourcePoolPayload) GetSizeGigabytes() (res UpdateResourcePoolPa // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetSizeGigabytesOk() (ret UpdateResourcePoolPayloadGetSizeGigabytesRetType, ok bool) { return getUpdateResourcePoolPayloadGetSizeGigabytesAttributeTypeOk(o.SizeGigabytes) } // HasSizeGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) SetSizeGigabytes(v UpdateResourcePoolPayloadGetSizeGigabytesRetType) { setUpdateResourcePoolPayloadGetSizeGigabytesAttributeType(&o.SizeGigabytes, v) } // SetSizeGigabytesNil sets the value for SizeGigabytes to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) SetSizeGigabytesNil() { o.SizeGigabytes = nil } // UnsetSizeGigabytes ensures that no value is present for SizeGigabytes, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() { o.SizeGigabytes = nil } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisible() (res UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { res, _ = o.GetSnapshotsAreVisibleOk() return @@ -261,21 +318,25 @@ func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisible() (res UpdateResource // GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisibleOk() (ret UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType, ok bool) { return getUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible) } // HasSnapshotsAreVisible returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolPayload) SetSnapshotsAreVisible(v UpdateResourcePoolPayloadgetSnapshotsAreVisibleRetType) { setUpdateResourcePoolPayloadgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateResourcePoolPayloadGetIpAclAttributeTypeOk(o.IpAcl); ok { @@ -296,37 +357,45 @@ func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateResourcePoolPayload struct { value *UpdateResourcePoolPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolPayload) Get() *UpdateResourcePoolPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolPayload) Set(val *UpdateResourcePoolPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateResourcePoolPayload(val *UpdateResourcePoolPayload) *NullableUpdateResourcePoolPayload { return &NullableUpdateResourcePoolPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_resource_pool_response.go b/services/sfs/model_update_resource_pool_response.go index c270f21e9..ed805fb33 100644 --- a/services/sfs/model_update_resource_pool_response.go +++ b/services/sfs/model_update_resource_pool_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateResourcePoolResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseGetResourcePoolAttributeType = *UpdateResourcePoolResponseResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseGetResourcePoolArgType = UpdateResourcePoolResponseResourcePool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseGetResourcePoolRetType = UpdateResourcePoolResponseResourcePool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(arg UpdateResourcePoolResponseGetResourcePoolAttributeType) (ret UpdateResourcePoolResponseGetResourcePoolRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(arg UpdateResou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseGetResourcePoolAttributeType(arg *UpdateResourcePoolResponseGetResourcePoolAttributeType, val UpdateResourcePoolResponseGetResourcePoolRetType) { *arg = &val } // UpdateResourcePoolResponse struct for UpdateResourcePoolResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponse struct { ResourcePool UpdateResourcePoolResponseGetResourcePoolAttributeType `json:"resourcePool,omitempty"` } @@ -46,6 +55,7 @@ type UpdateResourcePoolResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateResourcePoolResponse() *UpdateResourcePoolResponse { this := UpdateResourcePoolResponse{} return &this @@ -54,12 +64,14 @@ func NewUpdateResourcePoolResponse() *UpdateResourcePoolResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateResourcePoolResponseWithDefaults() *UpdateResourcePoolResponse { this := UpdateResourcePoolResponse{} return &this } // GetResourcePool returns the ResourcePool field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponse) GetResourcePool() (res UpdateResourcePoolResponseGetResourcePoolRetType) { res, _ = o.GetResourcePoolOk() return @@ -67,21 +79,25 @@ func (o *UpdateResourcePoolResponse) GetResourcePool() (res UpdateResourcePoolRe // GetResourcePoolOk returns a tuple with the ResourcePool field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponse) GetResourcePoolOk() (ret UpdateResourcePoolResponseGetResourcePoolRetType, ok bool) { return getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool) } // HasResourcePool returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponse) SetResourcePool(v UpdateResourcePoolResponseGetResourcePoolRetType) { setUpdateResourcePoolResponseGetResourcePoolAttributeType(&o.ResourcePool, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateResourcePoolResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateResourcePoolResponseGetResourcePoolAttributeTypeOk(o.ResourcePool); ok { @@ -90,37 +106,45 @@ func (o UpdateResourcePoolResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateResourcePoolResponse struct { value *UpdateResourcePoolResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolResponse) Get() *UpdateResourcePoolResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolResponse) Set(val *UpdateResourcePoolResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateResourcePoolResponse(val *UpdateResourcePoolResponse) *NullableUpdateResourcePoolResponse { return &NullableUpdateResourcePoolResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_resource_pool_response_resource_pool.go b/services/sfs/model_update_resource_pool_response_resource_pool.go index e327bbe16..f5d970ec2 100644 --- a/services/sfs/model_update_resource_pool_response_resource_pool.go +++ b/services/sfs/model_update_resource_pool_response_resource_pool.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &UpdateResourcePoolResponseResourcePool{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType, val UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string /* @@ -44,10 +51,16 @@ type UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetCountSharesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetCountSharesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) { if arg == nil { return ret, false @@ -55,6 +68,7 @@ func getUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType, val UpdateResourcePoolResponseResourcePoolGetCountSharesRetType) { *arg = &val } @@ -64,10 +78,16 @@ func setUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType(arg *U */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(arg Up return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType, val UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(arg *Upd */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetIdAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getUpdateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(arg UpdateRes return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetIdAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetIdAttributeType, val UpdateResourcePoolResponseResourcePoolGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetIdRetType = string /* @@ -105,10 +132,16 @@ type UpdateResourcePoolResponseResourcePoolGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +149,7 @@ func getUpdateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(arg Update return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetIpAclAttributeType, val UpdateResourcePoolResponseResourcePoolGetIpAclRetType) { *arg = &val } @@ -125,10 +159,16 @@ func setUpdateResourcePoolResponseResourcePoolGetIpAclAttributeType(arg *UpdateR */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +176,7 @@ func getUpdateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(arg Updat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetLabelsAttributeType, val UpdateResourcePoolResponseResourcePoolGetLabelsRetType) { *arg = &val } @@ -145,8 +186,10 @@ func setUpdateResourcePoolResponseResourcePoolGetLabelsAttributeType(arg *Update */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -154,11 +197,15 @@ func getUpdateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(arg Up return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetMountPathAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetMountPathAttributeType, val UpdateResourcePoolResponseResourcePoolGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetMountPathRetType = string /* @@ -166,8 +213,10 @@ type UpdateResourcePoolResponseResourcePoolGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetNameAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -175,11 +224,15 @@ func getUpdateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(arg UpdateR return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetNameAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetNameAttributeType, val UpdateResourcePoolResponseResourcePoolGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetNameRetType = string /* @@ -187,10 +240,16 @@ type UpdateResourcePoolResponseResourcePoolGetNameRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType = *ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetPerformanceClassArgType = ResourcePoolPerformanceClass + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType = ResourcePoolPerformanceClass +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) { if arg == nil { return ret, false @@ -198,6 +257,7 @@ func getUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType, val UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType) { *arg = &val } @@ -207,10 +267,16 @@ func setUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(a */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { if arg == nil { return ret, false @@ -218,6 +284,7 @@ func getUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType, val UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { *arg = &val } @@ -227,10 +294,16 @@ func setUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtA */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) { if arg == nil { return ret, false @@ -238,6 +311,7 @@ func getUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType, val UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { *arg = &val } @@ -247,10 +321,16 @@ func setUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(ar */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType) (ret UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { if arg == nil { return ret, false @@ -258,6 +338,7 @@ func getUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(arg *UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType, val UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { *arg = &val } @@ -267,10 +348,16 @@ func setUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTyp */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType = *ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetSpaceArgType = ResourcePoolSpace + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetSpaceRetType = ResourcePoolSpace +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) { if arg == nil { return ret, false @@ -278,6 +365,7 @@ func getUpdateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(arg Update return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetSpaceAttributeType, val UpdateResourcePoolResponseResourcePoolGetSpaceRetType) { *arg = &val } @@ -287,8 +375,10 @@ func setUpdateResourcePoolResponseResourcePoolGetSpaceAttributeType(arg *UpdateR */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg UpdateResourcePoolResponseResourcePoolGetStateAttributeType) (ret UpdateResourcePoolResponseResourcePoolGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -296,14 +386,19 @@ func getUpdateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(arg Update return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateResourcePoolResponseResourcePoolGetStateAttributeType(arg *UpdateResourcePoolResponseResourcePoolGetStateAttributeType, val UpdateResourcePoolResponseResourcePoolGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePoolGetStateRetType = string // UpdateResourcePoolResponseResourcePool Updated Resource Pool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateResourcePoolResponseResourcePool struct { // Name of the respective availability zone AvailabilityZone UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType `json:"availabilityZone,omitempty"` @@ -336,6 +431,7 @@ type UpdateResourcePoolResponseResourcePool struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateResourcePoolResponseResourcePool() *UpdateResourcePoolResponseResourcePool { this := UpdateResourcePoolResponseResourcePool{} return &this @@ -344,6 +440,7 @@ func NewUpdateResourcePoolResponseResourcePool() *UpdateResourcePoolResponseReso // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateResourcePoolResponseResourcePoolWithDefaults() *UpdateResourcePoolResponseResourcePool { this := UpdateResourcePoolResponseResourcePool{} var snapshotsAreVisible bool = false @@ -352,6 +449,7 @@ func NewUpdateResourcePoolResponseResourcePoolWithDefaults() *UpdateResourcePool } // GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetAvailabilityZone() (res UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { res, _ = o.GetAvailabilityZoneOk() return @@ -359,22 +457,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetAvailabilityZone() (res Upda // GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetAvailabilityZoneOk() (ret UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone) } // HasAvailabilityZone returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetAvailabilityZone(v UpdateResourcePoolResponseResourcePoolGetAvailabilityZoneRetType) { setUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeType(&o.AvailabilityZone, v) } // GetCountShares returns the CountShares field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetCountShares() (res UpdateResourcePoolResponseResourcePoolGetCountSharesRetType) { res, _ = o.GetCountSharesOk() return @@ -382,22 +484,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetCountShares() (res UpdateRes // GetCountSharesOk returns a tuple with the CountShares field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetCountSharesOk() (ret UpdateResourcePoolResponseResourcePoolGetCountSharesRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeTypeOk(o.CountShares) } // HasCountShares returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetCountShares(v UpdateResourcePoolResponseResourcePoolGetCountSharesRetType) { setUpdateResourcePoolResponseResourcePoolGetCountSharesAttributeType(&o.CountShares, v) } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetCreatedAt() (res UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -405,22 +511,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetCreatedAt() (res UpdateResou // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetCreatedAtOk() (ret UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetCreatedAt(v UpdateResourcePoolResponseResourcePoolGetCreatedAtRetType) { setUpdateResourcePoolResponseResourcePoolGetCreatedAtAttributeType(&o.CreatedAt, v) } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetId() (res UpdateResourcePoolResponseResourcePoolGetIdRetType) { res, _ = o.GetIdOk() return @@ -428,22 +538,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetId() (res UpdateResourcePool // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetIdOk() (ret UpdateResourcePoolResponseResourcePoolGetIdRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetId(v UpdateResourcePoolResponseResourcePoolGetIdRetType) { setUpdateResourcePoolResponseResourcePoolGetIdAttributeType(&o.Id, v) } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetIpAcl() (res UpdateResourcePoolResponseResourcePoolGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -451,22 +565,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetIpAcl() (res UpdateResourceP // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetIpAclOk() (ret UpdateResourcePoolResponseResourcePoolGetIpAclRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetIpAcl(v UpdateResourcePoolResponseResourcePoolGetIpAclRetType) { setUpdateResourcePoolResponseResourcePoolGetIpAclAttributeType(&o.IpAcl, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetLabels() (res UpdateResourcePoolResponseResourcePoolGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -474,22 +592,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetLabels() (res UpdateResource // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetLabelsOk() (ret UpdateResourcePoolResponseResourcePoolGetLabelsRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetLabels(v UpdateResourcePoolResponseResourcePoolGetLabelsRetType) { setUpdateResourcePoolResponseResourcePoolGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetMountPath() (res UpdateResourcePoolResponseResourcePoolGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -497,22 +619,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetMountPath() (res UpdateResou // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetMountPathOk() (ret UpdateResourcePoolResponseResourcePoolGetMountPathRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetMountPath(v UpdateResourcePoolResponseResourcePoolGetMountPathRetType) { setUpdateResourcePoolResponseResourcePoolGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetName() (res UpdateResourcePoolResponseResourcePoolGetNameRetType) { res, _ = o.GetNameOk() return @@ -520,22 +646,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetName() (res UpdateResourcePo // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetNameOk() (ret UpdateResourcePoolResponseResourcePoolGetNameRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetName(v UpdateResourcePoolResponseResourcePoolGetNameRetType) { setUpdateResourcePoolResponseResourcePoolGetNameAttributeType(&o.Name, v) } // GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClass() (res UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType) { res, _ = o.GetPerformanceClassOk() return @@ -543,22 +673,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClass() (res Upda // GetPerformanceClassOk returns a tuple with the PerformanceClass field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClassOk() (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeTypeOk(o.PerformanceClass) } // HasPerformanceClass returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetPerformanceClass(v UpdateResourcePoolResponseResourcePoolGetPerformanceClassRetType) { setUpdateResourcePoolResponseResourcePoolGetPerformanceClassAttributeType(&o.PerformanceClass, v) } // GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAt() (res UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { res, _ = o.GetPerformanceClassDowngradableAtOk() return @@ -566,22 +700,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClassDowngradable // GetPerformanceClassDowngradableAtOk returns a tuple with the PerformanceClassDowngradableAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetPerformanceClassDowngradableAtOk() (ret UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeTypeOk(o.PerformanceClassDowngradableAt) } // HasPerformanceClassDowngradableAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetPerformanceClassDowngradableAt(v UpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtRetType) { setUpdateResourcePoolResponseResourcePoolGetPerformanceClassDowngradableAtAttributeType(&o.PerformanceClassDowngradableAt, v) } // GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetSizeReducibleAt() (res UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { res, _ = o.GetSizeReducibleAtOk() return @@ -589,22 +727,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetSizeReducibleAt() (res Updat // GetSizeReducibleAtOk returns a tuple with the SizeReducibleAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetSizeReducibleAtOk() (ret UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeTypeOk(o.SizeReducibleAt) } // HasSizeReducibleAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetSizeReducibleAt(v UpdateResourcePoolResponseResourcePoolGetSizeReducibleAtRetType) { setUpdateResourcePoolResponseResourcePoolGetSizeReducibleAtAttributeType(&o.SizeReducibleAt, v) } // GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { res, _ = o.GetSnapshotsAreVisibleOk() return @@ -612,22 +754,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotsAreVisible() (res U // GetSnapshotsAreVisibleOk returns a tuple with the SnapshotsAreVisible field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetSnapshotsAreVisibleOk() (ret UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeTypeOk(o.SnapshotsAreVisible) } // HasSnapshotsAreVisible returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetSnapshotsAreVisible(v UpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleRetType) { setUpdateResourcePoolResponseResourcePoolgetSnapshotsAreVisibleAttributeType(&o.SnapshotsAreVisible, v) } // GetSpace returns the Space field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetSpace() (res UpdateResourcePoolResponseResourcePoolGetSpaceRetType) { res, _ = o.GetSpaceOk() return @@ -635,22 +781,26 @@ func (o *UpdateResourcePoolResponseResourcePool) GetSpace() (res UpdateResourceP // GetSpaceOk returns a tuple with the Space field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetSpaceOk() (ret UpdateResourcePoolResponseResourcePoolGetSpaceRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetSpaceAttributeTypeOk(o.Space) } // HasSpace returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetSpace(v UpdateResourcePoolResponseResourcePoolGetSpaceRetType) { setUpdateResourcePoolResponseResourcePoolGetSpaceAttributeType(&o.Space, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetState() (res UpdateResourcePoolResponseResourcePoolGetStateRetType) { res, _ = o.GetStateOk() return @@ -658,21 +808,25 @@ func (o *UpdateResourcePoolResponseResourcePool) GetState() (res UpdateResourceP // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) GetStateOk() (ret UpdateResourcePoolResponseResourcePoolGetStateRetType, ok bool) { return getUpdateResourcePoolResponseResourcePoolGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateResourcePoolResponseResourcePool) SetState(v UpdateResourcePoolResponseResourcePoolGetStateRetType) { setUpdateResourcePoolResponseResourcePoolGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateResourcePoolResponseResourcePoolGetAvailabilityZoneAttributeTypeOk(o.AvailabilityZone); ok { @@ -720,37 +874,45 @@ func (o UpdateResourcePoolResponseResourcePool) ToMap() (map[string]interface{}, return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateResourcePoolResponseResourcePool struct { value *UpdateResourcePoolResponseResourcePool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolResponseResourcePool) Get() *UpdateResourcePoolResponseResourcePool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolResponseResourcePool) Set(val *UpdateResourcePoolResponseResourcePool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolResponseResourcePool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolResponseResourcePool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateResourcePoolResponseResourcePool(val *UpdateResourcePoolResponseResourcePool) *NullableUpdateResourcePoolResponseResourcePool { return &NullableUpdateResourcePoolResponseResourcePool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateResourcePoolResponseResourcePool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateResourcePoolResponseResourcePool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_share_export_policy_body_rule.go b/services/sfs/model_update_share_export_policy_body_rule.go index 3faed0681..53efa3870 100644 --- a/services/sfs/model_update_share_export_policy_body_rule.go +++ b/services/sfs/model_update_share_export_policy_body_rule.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateShareExportPolicyBodyRule{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(arg UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType) (ret UpdateShareExportPolicyBodyRuleGetDescriptionRetType, ok bool) { if arg == nil { return nil, false @@ -31,6 +34,7 @@ func getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(arg UpdateS return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyBodyRuleGetDescriptionAttributeType(arg *UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType, val UpdateShareExportPolicyBodyRuleGetDescriptionRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -39,7 +43,10 @@ func setUpdateShareExportPolicyBodyRuleGetDescriptionAttributeType(arg *UpdateSh } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetDescriptionArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetDescriptionRetType = *string /* @@ -47,10 +54,16 @@ type UpdateShareExportPolicyBodyRuleGetDescriptionRetType = *string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetIpAclAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetIpAclArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetIpAclRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyBodyRuleGetIpAclAttributeTypeOk(arg UpdateShareExportPolicyBodyRuleGetIpAclAttributeType) (ret UpdateShareExportPolicyBodyRuleGetIpAclRetType, ok bool) { if arg == nil { return ret, false @@ -58,6 +71,7 @@ func getUpdateShareExportPolicyBodyRuleGetIpAclAttributeTypeOk(arg UpdateShareEx return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyBodyRuleGetIpAclAttributeType(arg *UpdateShareExportPolicyBodyRuleGetIpAclAttributeType, val UpdateShareExportPolicyBodyRuleGetIpAclRetType) { *arg = &val } @@ -67,10 +81,16 @@ func setUpdateShareExportPolicyBodyRuleGetIpAclAttributeType(arg *UpdateShareExp */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetOrderAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetOrderArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRuleGetOrderRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyBodyRuleGetOrderAttributeTypeOk(arg UpdateShareExportPolicyBodyRuleGetOrderAttributeType) (ret UpdateShareExportPolicyBodyRuleGetOrderRetType, ok bool) { if arg == nil { return ret, false @@ -78,6 +98,7 @@ func getUpdateShareExportPolicyBodyRuleGetOrderAttributeTypeOk(arg UpdateShareEx return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyBodyRuleGetOrderAttributeType(arg *UpdateShareExportPolicyBodyRuleGetOrderAttributeType, val UpdateShareExportPolicyBodyRuleGetOrderRetType) { *arg = &val } @@ -87,10 +108,16 @@ func setUpdateShareExportPolicyBodyRuleGetOrderAttributeType(arg *UpdateShareExp */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetReadOnlyArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetReadOnlyRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyBodyRulegetReadOnlyAttributeTypeOk(arg UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType) (ret UpdateShareExportPolicyBodyRulegetReadOnlyRetType, ok bool) { if arg == nil { return ret, false @@ -98,6 +125,7 @@ func getUpdateShareExportPolicyBodyRulegetReadOnlyAttributeTypeOk(arg UpdateShar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyBodyRulegetReadOnlyAttributeType(arg *UpdateShareExportPolicyBodyRulegetReadOnlyAttributeType, val UpdateShareExportPolicyBodyRulegetReadOnlyRetType) { *arg = &val } @@ -107,10 +135,16 @@ func setUpdateShareExportPolicyBodyRulegetReadOnlyAttributeType(arg *UpdateShare */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetSetUuidAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetSetUuidArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetSetUuidRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyBodyRulegetSetUuidAttributeTypeOk(arg UpdateShareExportPolicyBodyRulegetSetUuidAttributeType) (ret UpdateShareExportPolicyBodyRulegetSetUuidRetType, ok bool) { if arg == nil { return ret, false @@ -118,6 +152,7 @@ func getUpdateShareExportPolicyBodyRulegetSetUuidAttributeTypeOk(arg UpdateShare return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyBodyRulegetSetUuidAttributeType(arg *UpdateShareExportPolicyBodyRulegetSetUuidAttributeType, val UpdateShareExportPolicyBodyRulegetSetUuidRetType) { *arg = &val } @@ -127,10 +162,16 @@ func setUpdateShareExportPolicyBodyRulegetSetUuidAttributeType(arg *UpdateShareE */ // isBoolean +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetSuperUserAttributeType = *bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetSuperUserArgType = bool + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRulegetSuperUserRetType = bool +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyBodyRulegetSuperUserAttributeTypeOk(arg UpdateShareExportPolicyBodyRulegetSuperUserAttributeType) (ret UpdateShareExportPolicyBodyRulegetSuperUserRetType, ok bool) { if arg == nil { return ret, false @@ -138,11 +179,13 @@ func getUpdateShareExportPolicyBodyRulegetSuperUserAttributeTypeOk(arg UpdateSha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyBodyRulegetSuperUserAttributeType(arg *UpdateShareExportPolicyBodyRulegetSuperUserAttributeType, val UpdateShareExportPolicyBodyRulegetSuperUserRetType) { *arg = &val } // UpdateShareExportPolicyBodyRule struct for UpdateShareExportPolicyBodyRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyBodyRule struct { // Description of the Rule (optional) Description UpdateShareExportPolicyBodyRuleGetDescriptionAttributeType `json:"description,omitempty"` @@ -163,6 +206,7 @@ type UpdateShareExportPolicyBodyRule struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareExportPolicyBodyRule() *UpdateShareExportPolicyBodyRule { this := UpdateShareExportPolicyBodyRule{} return &this @@ -171,6 +215,7 @@ func NewUpdateShareExportPolicyBodyRule() *UpdateShareExportPolicyBodyRule { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareExportPolicyBodyRuleWithDefaults() *UpdateShareExportPolicyBodyRule { this := UpdateShareExportPolicyBodyRule{} var readOnly bool = false @@ -183,6 +228,7 @@ func NewUpdateShareExportPolicyBodyRuleWithDefaults() *UpdateShareExportPolicyBo } // GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetDescription() (res UpdateShareExportPolicyBodyRuleGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -191,32 +237,38 @@ func (o *UpdateShareExportPolicyBodyRule) GetDescription() (res UpdateShareExpor // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetDescriptionOk() (ret UpdateShareExportPolicyBodyRuleGetDescriptionRetType, ok bool) { return getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(o.Description) } // HasDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetDescription(v UpdateShareExportPolicyBodyRuleGetDescriptionRetType) { setUpdateShareExportPolicyBodyRuleGetDescriptionAttributeType(&o.Description, v) } // SetDescriptionNil sets the value for Description to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetDescriptionNil() { o.Description = nil } // UnsetDescription ensures that no value is present for Description, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) UnsetDescription() { o.Description = nil } // GetIpAcl returns the IpAcl field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetIpAcl() (res UpdateShareExportPolicyBodyRuleGetIpAclRetType) { res, _ = o.GetIpAclOk() return @@ -224,22 +276,26 @@ func (o *UpdateShareExportPolicyBodyRule) GetIpAcl() (res UpdateShareExportPolic // GetIpAclOk returns a tuple with the IpAcl field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetIpAclOk() (ret UpdateShareExportPolicyBodyRuleGetIpAclRetType, ok bool) { return getUpdateShareExportPolicyBodyRuleGetIpAclAttributeTypeOk(o.IpAcl) } // HasIpAcl returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetIpAcl(v UpdateShareExportPolicyBodyRuleGetIpAclRetType) { setUpdateShareExportPolicyBodyRuleGetIpAclAttributeType(&o.IpAcl, v) } // GetOrder returns the Order field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetOrder() (res UpdateShareExportPolicyBodyRuleGetOrderRetType) { res, _ = o.GetOrderOk() return @@ -247,22 +303,26 @@ func (o *UpdateShareExportPolicyBodyRule) GetOrder() (res UpdateShareExportPolic // GetOrderOk returns a tuple with the Order field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetOrderOk() (ret UpdateShareExportPolicyBodyRuleGetOrderRetType, ok bool) { return getUpdateShareExportPolicyBodyRuleGetOrderAttributeTypeOk(o.Order) } // HasOrder returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetOrder(v UpdateShareExportPolicyBodyRuleGetOrderRetType) { setUpdateShareExportPolicyBodyRuleGetOrderAttributeType(&o.Order, v) } // GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetReadOnly() (res UpdateShareExportPolicyBodyRulegetReadOnlyRetType) { res, _ = o.GetReadOnlyOk() return @@ -270,22 +330,26 @@ func (o *UpdateShareExportPolicyBodyRule) GetReadOnly() (res UpdateShareExportPo // GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetReadOnlyOk() (ret UpdateShareExportPolicyBodyRulegetReadOnlyRetType, ok bool) { return getUpdateShareExportPolicyBodyRulegetReadOnlyAttributeTypeOk(o.ReadOnly) } // HasReadOnly returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetReadOnly(v UpdateShareExportPolicyBodyRulegetReadOnlyRetType) { setUpdateShareExportPolicyBodyRulegetReadOnlyAttributeType(&o.ReadOnly, v) } // GetSetUuid returns the SetUuid field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetSetUuid() (res UpdateShareExportPolicyBodyRulegetSetUuidRetType) { res, _ = o.GetSetUuidOk() return @@ -293,22 +357,26 @@ func (o *UpdateShareExportPolicyBodyRule) GetSetUuid() (res UpdateShareExportPol // GetSetUuidOk returns a tuple with the SetUuid field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetSetUuidOk() (ret UpdateShareExportPolicyBodyRulegetSetUuidRetType, ok bool) { return getUpdateShareExportPolicyBodyRulegetSetUuidAttributeTypeOk(o.SetUuid) } // HasSetUuid returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetSetUuid(v UpdateShareExportPolicyBodyRulegetSetUuidRetType) { setUpdateShareExportPolicyBodyRulegetSetUuidAttributeType(&o.SetUuid, v) } // GetSuperUser returns the SuperUser field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetSuperUser() (res UpdateShareExportPolicyBodyRulegetSuperUserRetType) { res, _ = o.GetSuperUserOk() return @@ -316,21 +384,25 @@ func (o *UpdateShareExportPolicyBodyRule) GetSuperUser() (res UpdateShareExportP // GetSuperUserOk returns a tuple with the SuperUser field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) GetSuperUserOk() (ret UpdateShareExportPolicyBodyRulegetSuperUserRetType, ok bool) { return getUpdateShareExportPolicyBodyRulegetSuperUserAttributeTypeOk(o.SuperUser) } // HasSuperUser returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyBodyRule) SetSuperUser(v UpdateShareExportPolicyBodyRulegetSuperUserRetType) { setUpdateShareExportPolicyBodyRulegetSuperUserAttributeType(&o.SuperUser, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateShareExportPolicyBodyRule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateShareExportPolicyBodyRuleGetDescriptionAttributeTypeOk(o.Description); ok { @@ -354,37 +426,45 @@ func (o UpdateShareExportPolicyBodyRule) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateShareExportPolicyBodyRule struct { value *UpdateShareExportPolicyBodyRule isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyBodyRule) Get() *UpdateShareExportPolicyBodyRule { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyBodyRule) Set(val *UpdateShareExportPolicyBodyRule) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyBodyRule) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyBodyRule) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateShareExportPolicyBodyRule(val *UpdateShareExportPolicyBodyRule) *NullableUpdateShareExportPolicyBodyRule { return &NullableUpdateShareExportPolicyBodyRule{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyBodyRule) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyBodyRule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_share_export_policy_payload.go b/services/sfs/model_update_share_export_policy_payload.go index 2822282f2..7f67c3913 100644 --- a/services/sfs/model_update_share_export_policy_payload.go +++ b/services/sfs/model_update_share_export_policy_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateShareExportPolicyPayload{} */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyPayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyPayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyPayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(arg UpdateShareExportPolicyPayloadGetLabelsAttributeType) (ret UpdateShareExportPolicyPayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(arg UpdateShareEx return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyPayloadGetLabelsAttributeType(arg *UpdateShareExportPolicyPayloadGetLabelsAttributeType, val UpdateShareExportPolicyPayloadGetLabelsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setUpdateShareExportPolicyPayloadGetLabelsAttributeType(arg *UpdateShareExp */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyPayloadGetRulesAttributeType = *[]UpdateShareExportPolicyBodyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyPayloadGetRulesArgType = *[]UpdateShareExportPolicyBodyRule + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyPayloadGetRulesRetType = *[]UpdateShareExportPolicyBodyRule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyPayloadGetRulesAttributeTypeOk(arg UpdateShareExportPolicyPayloadGetRulesAttributeType) (ret UpdateShareExportPolicyPayloadGetRulesRetType, ok bool) { if arg == nil { return nil, false @@ -53,11 +67,13 @@ func getUpdateShareExportPolicyPayloadGetRulesAttributeTypeOk(arg UpdateShareExp return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyPayloadGetRulesAttributeType(arg *UpdateShareExportPolicyPayloadGetRulesAttributeType, val UpdateShareExportPolicyPayloadGetRulesRetType) { *arg = val } // UpdateShareExportPolicyPayload struct for UpdateShareExportPolicyPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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"` @@ -69,6 +85,7 @@ type UpdateShareExportPolicyPayload struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareExportPolicyPayload() *UpdateShareExportPolicyPayload { this := UpdateShareExportPolicyPayload{} return &this @@ -77,12 +94,14 @@ func NewUpdateShareExportPolicyPayload() *UpdateShareExportPolicyPayload { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareExportPolicyPayloadWithDefaults() *UpdateShareExportPolicyPayload { this := UpdateShareExportPolicyPayload{} return &this } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyPayload) GetLabels() (res UpdateShareExportPolicyPayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -90,22 +109,26 @@ func (o *UpdateShareExportPolicyPayload) GetLabels() (res UpdateShareExportPolic // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyPayload) GetLabelsOk() (ret UpdateShareExportPolicyPayloadGetLabelsRetType, ok bool) { return getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyPayload) GetRules() (res UpdateShareExportPolicyPayloadGetRulesRetType) { res, _ = o.GetRulesOk() return @@ -114,21 +137,25 @@ func (o *UpdateShareExportPolicyPayload) GetRules() (res UpdateShareExportPolicy // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyPayload) GetRulesOk() (ret UpdateShareExportPolicyPayloadGetRulesRetType, ok bool) { return getUpdateShareExportPolicyPayloadGetRulesAttributeTypeOk(o.Rules) } // HasRules returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyPayload) SetRules(v UpdateShareExportPolicyPayloadGetRulesRetType) { setUpdateShareExportPolicyPayloadGetRulesAttributeType(&o.Rules, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateShareExportPolicyPayloadGetLabelsAttributeTypeOk(o.Labels); ok { @@ -140,37 +167,45 @@ func (o UpdateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateShareExportPolicyPayload struct { value *UpdateShareExportPolicyPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyPayload) Get() *UpdateShareExportPolicyPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyPayload) Set(val *UpdateShareExportPolicyPayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyPayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyPayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateShareExportPolicyPayload(val *UpdateShareExportPolicyPayload) *NullableUpdateShareExportPolicyPayload { return &NullableUpdateShareExportPolicyPayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyPayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_share_export_policy_response.go b/services/sfs/model_update_share_export_policy_response.go index 65bbcdc25..81c246e06 100644 --- a/services/sfs/model_update_share_export_policy_response.go +++ b/services/sfs/model_update_share_export_policy_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateShareExportPolicyResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType = *ShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyResponseGetShareExportPolicyArgType = ShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyResponseGetShareExportPolicyRetType = ShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType) (ret UpdateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(arg U return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareExportPolicyResponseGetShareExportPolicyAttributeType(arg *UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType, val UpdateShareExportPolicyResponseGetShareExportPolicyRetType) { *arg = &val } // UpdateShareExportPolicyResponse struct for UpdateShareExportPolicyResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareExportPolicyResponse struct { ShareExportPolicy UpdateShareExportPolicyResponseGetShareExportPolicyAttributeType `json:"shareExportPolicy,omitempty"` } @@ -46,6 +55,7 @@ type UpdateShareExportPolicyResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareExportPolicyResponse() *UpdateShareExportPolicyResponse { this := UpdateShareExportPolicyResponse{} return &this @@ -54,12 +64,14 @@ func NewUpdateShareExportPolicyResponse() *UpdateShareExportPolicyResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareExportPolicyResponseWithDefaults() *UpdateShareExportPolicyResponse { this := UpdateShareExportPolicyResponse{} return &this } // GetShareExportPolicy returns the ShareExportPolicy field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyResponse) GetShareExportPolicy() (res UpdateShareExportPolicyResponseGetShareExportPolicyRetType) { res, _ = o.GetShareExportPolicyOk() return @@ -67,21 +79,25 @@ func (o *UpdateShareExportPolicyResponse) GetShareExportPolicy() (res UpdateShar // GetShareExportPolicyOk returns a tuple with the ShareExportPolicy field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyResponse) GetShareExportPolicyOk() (ret UpdateShareExportPolicyResponseGetShareExportPolicyRetType, ok bool) { return getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy) } // HasShareExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareExportPolicyResponse) SetShareExportPolicy(v UpdateShareExportPolicyResponseGetShareExportPolicyRetType) { setUpdateShareExportPolicyResponseGetShareExportPolicyAttributeType(&o.ShareExportPolicy, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateShareExportPolicyResponseGetShareExportPolicyAttributeTypeOk(o.ShareExportPolicy); ok { @@ -90,37 +106,45 @@ func (o UpdateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateShareExportPolicyResponse struct { value *UpdateShareExportPolicyResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyResponse) Get() *UpdateShareExportPolicyResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyResponse) Set(val *UpdateShareExportPolicyResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateShareExportPolicyResponse(val *UpdateShareExportPolicyResponse) *NullableUpdateShareExportPolicyResponse { return &NullableUpdateShareExportPolicyResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareExportPolicyResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareExportPolicyResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_share_payload.go b/services/sfs/model_update_share_payload.go index 9675d0529..65b482ecb 100644 --- a/services/sfs/model_update_share_payload.go +++ b/services/sfs/model_update_share_payload.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateSharePayload{} */ // isNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetExportPolicyNameAttributeType = *NullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(arg UpdateSharePayloadGetExportPolicyNameAttributeType) (ret UpdateSharePayloadGetExportPolicyNameRetType, ok bool) { if arg == nil { return nil, false @@ -31,6 +34,7 @@ func getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(arg UpdateSharePayl return arg.Get(), true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateSharePayloadGetExportPolicyNameAttributeType(arg *UpdateSharePayloadGetExportPolicyNameAttributeType, val UpdateSharePayloadGetExportPolicyNameRetType) { if IsNil(*arg) { *arg = NewNullableString(val) @@ -39,7 +43,10 @@ func setUpdateSharePayloadGetExportPolicyNameAttributeType(arg *UpdateSharePaylo } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetExportPolicyNameArgType = *string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetExportPolicyNameRetType = *string /* @@ -47,10 +54,16 @@ type UpdateSharePayloadGetExportPolicyNameRetType = *string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateSharePayloadGetLabelsAttributeTypeOk(arg UpdateSharePayloadGetLabelsAttributeType) (ret UpdateSharePayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -58,6 +71,7 @@ func getUpdateSharePayloadGetLabelsAttributeTypeOk(arg UpdateSharePayloadGetLabe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateSharePayloadGetLabelsAttributeType(arg *UpdateSharePayloadGetLabelsAttributeType, val UpdateSharePayloadGetLabelsRetType) { *arg = &val } @@ -67,10 +81,16 @@ func setUpdateSharePayloadGetLabelsAttributeType(arg *UpdateSharePayloadGetLabel */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetSpaceHardLimitGigabytesArgType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateSharePayloadGetSpaceHardLimitGigabytesRetType = *int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(arg UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType) (ret UpdateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) { if arg == nil { return nil, false @@ -78,11 +98,13 @@ func getUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(arg UpdateSh return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType(arg *UpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType, val UpdateSharePayloadGetSpaceHardLimitGigabytesRetType) { *arg = val } // UpdateSharePayload struct for UpdateSharePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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"` @@ -97,6 +119,7 @@ type UpdateSharePayload struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateSharePayload() *UpdateSharePayload { this := UpdateSharePayload{} return &this @@ -105,12 +128,14 @@ func NewUpdateSharePayload() *UpdateSharePayload { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) GetExportPolicyName() (res UpdateSharePayloadGetExportPolicyNameRetType) { res, _ = o.GetExportPolicyNameOk() return @@ -119,32 +144,38 @@ func (o *UpdateSharePayload) GetExportPolicyName() (res UpdateSharePayloadGetExp // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) GetExportPolicyNameOk() (ret UpdateSharePayloadGetExportPolicyNameRetType, ok bool) { return getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName) } // HasExportPolicyName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) SetExportPolicyName(v UpdateSharePayloadGetExportPolicyNameRetType) { setUpdateSharePayloadGetExportPolicyNameAttributeType(&o.ExportPolicyName, v) } // SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) SetExportPolicyNameNil() { o.ExportPolicyName = nil } // UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) UnsetExportPolicyName() { o.ExportPolicyName = nil } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) GetLabels() (res UpdateSharePayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -152,22 +183,26 @@ func (o *UpdateSharePayload) GetLabels() (res UpdateSharePayloadGetLabelsRetType // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) GetLabelsOk() (ret UpdateSharePayloadGetLabelsRetType, ok bool) { return getUpdateSharePayloadGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) GetSpaceHardLimitGigabytes() (res UpdateSharePayloadGetSpaceHardLimitGigabytesRetType) { res, _ = o.GetSpaceHardLimitGigabytesOk() return @@ -176,31 +211,37 @@ func (o *UpdateSharePayload) GetSpaceHardLimitGigabytes() (res UpdateSharePayloa // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) GetSpaceHardLimitGigabytesOk() (ret UpdateSharePayloadGetSpaceHardLimitGigabytesRetType, ok bool) { return getUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes) } // HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) SetSpaceHardLimitGigabytes(v UpdateSharePayloadGetSpaceHardLimitGigabytesRetType) { setUpdateSharePayloadGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v) } // SetSpaceHardLimitGigabytesNil sets the value for SpaceHardLimitGigabytes to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) SetSpaceHardLimitGigabytesNil() { o.SpaceHardLimitGigabytes = nil } // UnsetSpaceHardLimitGigabytes ensures that no value is present for SpaceHardLimitGigabytes, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateSharePayload) UnsetSpaceHardLimitGigabytes() { o.SpaceHardLimitGigabytes = nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateSharePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateSharePayloadGetExportPolicyNameAttributeTypeOk(o.ExportPolicyName); ok { @@ -215,37 +256,45 @@ func (o UpdateSharePayload) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateSharePayload struct { value *UpdateSharePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateSharePayload) Get() *UpdateSharePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateSharePayload) Set(val *UpdateSharePayload) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateSharePayload) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateSharePayload) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateSharePayload(val *UpdateSharePayload) *NullableUpdateSharePayload { return &NullableUpdateSharePayload{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateSharePayload) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateSharePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_share_response.go b/services/sfs/model_update_share_response.go index 09166d6ec..5e0692d0f 100644 --- a/services/sfs/model_update_share_response.go +++ b/services/sfs/model_update_share_response.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateShareResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseGetShareAttributeType = *UpdateShareResponseShare + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseGetShareArgType = UpdateShareResponseShare + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseGetShareRetType = UpdateShareResponseShare +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseGetShareAttributeTypeOk(arg UpdateShareResponseGetShareAttributeType) (ret UpdateShareResponseGetShareRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getUpdateShareResponseGetShareAttributeTypeOk(arg UpdateShareResponseGetSha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseGetShareAttributeType(arg *UpdateShareResponseGetShareAttributeType, val UpdateShareResponseGetShareRetType) { *arg = &val } // UpdateShareResponse struct for UpdateShareResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponse struct { Share UpdateShareResponseGetShareAttributeType `json:"share,omitempty"` } @@ -46,6 +55,7 @@ type UpdateShareResponse struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareResponse() *UpdateShareResponse { this := UpdateShareResponse{} return &this @@ -54,12 +64,14 @@ func NewUpdateShareResponse() *UpdateShareResponse { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareResponseWithDefaults() *UpdateShareResponse { this := UpdateShareResponse{} return &this } // GetShare returns the Share field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponse) GetShare() (res UpdateShareResponseGetShareRetType) { res, _ = o.GetShareOk() return @@ -67,21 +79,25 @@ func (o *UpdateShareResponse) GetShare() (res UpdateShareResponseGetShareRetType // GetShareOk returns a tuple with the Share field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponse) GetShareOk() (ret UpdateShareResponseGetShareRetType, ok bool) { return getUpdateShareResponseGetShareAttributeTypeOk(o.Share) } // HasShare returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponse) SetShare(v UpdateShareResponseGetShareRetType) { setUpdateShareResponseGetShareAttributeType(&o.Share, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateShareResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateShareResponseGetShareAttributeTypeOk(o.Share); ok { @@ -90,37 +106,45 @@ func (o UpdateShareResponse) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateShareResponse struct { value *UpdateShareResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareResponse) Get() *UpdateShareResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareResponse) Set(val *UpdateShareResponse) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareResponse) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareResponse) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateShareResponse(val *UpdateShareResponse) *NullableUpdateShareResponse { return &NullableUpdateShareResponse{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_update_share_response_share.go b/services/sfs/model_update_share_response_share.go index 813e880e2..b37f63211 100644 --- a/services/sfs/model_update_share_response_share.go +++ b/services/sfs/model_update_share_response_share.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &UpdateShareResponseShare{} */ // isDateTime +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetCreatedAtAttributeType = *time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetCreatedAtArgType = time.Time + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetCreatedAtRetType = time.Time +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(arg UpdateShareResponseShareGetCreatedAtAttributeType) (ret UpdateShareResponseShareGetCreatedAtRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(arg UpdateShareRespo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetCreatedAtAttributeType(arg *UpdateShareResponseShareGetCreatedAtAttributeType, val UpdateShareResponseShareGetCreatedAtRetType) { *arg = &val } @@ -43,10 +51,16 @@ func setUpdateShareResponseShareGetCreatedAtAttributeType(arg *UpdateShareRespon */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetExportPolicyAttributeType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetExportPolicyArgType = *NullableShareExportPolicy + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetExportPolicyRetType = *NullableShareExportPolicy +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(arg UpdateShareResponseShareGetExportPolicyAttributeType) (ret UpdateShareResponseShareGetExportPolicyRetType, ok bool) { if arg == nil { return nil, false @@ -54,6 +68,7 @@ func getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(arg UpdateShareRe return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetExportPolicyAttributeType(arg *UpdateShareResponseShareGetExportPolicyAttributeType, val UpdateShareResponseShareGetExportPolicyRetType) { *arg = val } @@ -63,8 +78,10 @@ func setUpdateShareResponseShareGetExportPolicyAttributeType(arg *UpdateShareRes */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetIdAttributeTypeOk(arg UpdateShareResponseShareGetIdAttributeType) (ret UpdateShareResponseShareGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +89,15 @@ func getUpdateShareResponseShareGetIdAttributeTypeOk(arg UpdateShareResponseShar return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetIdAttributeType(arg *UpdateShareResponseShareGetIdAttributeType, val UpdateShareResponseShareGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetIdRetType = string /* @@ -84,10 +105,16 @@ type UpdateShareResponseShareGetIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetLabelsAttributeTypeOk(arg UpdateShareResponseShareGetLabelsAttributeType) (ret UpdateShareResponseShareGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +122,7 @@ func getUpdateShareResponseShareGetLabelsAttributeTypeOk(arg UpdateShareResponse return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetLabelsAttributeType(arg *UpdateShareResponseShareGetLabelsAttributeType, val UpdateShareResponseShareGetLabelsRetType) { *arg = &val } @@ -104,8 +132,10 @@ func setUpdateShareResponseShareGetLabelsAttributeType(arg *UpdateShareResponseS */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetMountPathAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetMountPathAttributeTypeOk(arg UpdateShareResponseShareGetMountPathAttributeType) (ret UpdateShareResponseShareGetMountPathRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +143,15 @@ func getUpdateShareResponseShareGetMountPathAttributeTypeOk(arg UpdateShareRespo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetMountPathAttributeType(arg *UpdateShareResponseShareGetMountPathAttributeType, val UpdateShareResponseShareGetMountPathRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetMountPathArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetMountPathRetType = string /* @@ -125,8 +159,10 @@ type UpdateShareResponseShareGetMountPathRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetNameAttributeTypeOk(arg UpdateShareResponseShareGetNameAttributeType) (ret UpdateShareResponseShareGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -134,11 +170,15 @@ func getUpdateShareResponseShareGetNameAttributeTypeOk(arg UpdateShareResponseSh return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetNameAttributeType(arg *UpdateShareResponseShareGetNameAttributeType, val UpdateShareResponseShareGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetNameRetType = string /* @@ -146,10 +186,16 @@ type UpdateShareResponseShareGetNameRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetSpaceHardLimitGigabytesArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType) (ret UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) { if arg == nil { return ret, false @@ -157,6 +203,7 @@ func getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(arg Up return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *UpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType, val UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) { *arg = &val } @@ -166,8 +213,10 @@ func setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(arg *Upd */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetStateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateShareResponseShareGetStateAttributeTypeOk(arg UpdateShareResponseShareGetStateAttributeType) (ret UpdateShareResponseShareGetStateRetType, ok bool) { if arg == nil { return ret, false @@ -175,14 +224,19 @@ func getUpdateShareResponseShareGetStateAttributeTypeOk(arg UpdateShareResponseS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateShareResponseShareGetStateAttributeType(arg *UpdateShareResponseShareGetStateAttributeType, val UpdateShareResponseShareGetStateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetStateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShareGetStateRetType = string // UpdateShareResponseShare Updated Share +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateShareResponseShare struct { CreatedAt UpdateShareResponseShareGetCreatedAtAttributeType `json:"createdAt,omitempty"` ExportPolicy UpdateShareResponseShareGetExportPolicyAttributeType `json:"exportPolicy,omitempty"` @@ -205,6 +259,7 @@ type UpdateShareResponseShare struct { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareResponseShare() *UpdateShareResponseShare { this := UpdateShareResponseShare{} return &this @@ -213,12 +268,14 @@ func NewUpdateShareResponseShare() *UpdateShareResponseShare { // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewUpdateShareResponseShareWithDefaults() *UpdateShareResponseShare { this := UpdateShareResponseShare{} return &this } // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetCreatedAt() (res UpdateShareResponseShareGetCreatedAtRetType) { res, _ = o.GetCreatedAtOk() return @@ -226,22 +283,26 @@ func (o *UpdateShareResponseShare) GetCreatedAt() (res UpdateShareResponseShareG // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetCreatedAtOk() (ret UpdateShareResponseShareGetCreatedAtRetType, ok bool) { return getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt) } // HasCreatedAt returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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). +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetExportPolicy() (res UpdateShareResponseShareGetExportPolicyRetType) { res, _ = o.GetExportPolicyOk() return @@ -250,32 +311,38 @@ func (o *UpdateShareResponseShare) GetExportPolicy() (res UpdateShareResponseSha // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetExportPolicyOk() (ret UpdateShareResponseShareGetExportPolicyRetType, ok bool) { return getUpdateShareResponseShareGetExportPolicyAttributeTypeOk(o.ExportPolicy) } // HasExportPolicy returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetExportPolicy(v UpdateShareResponseShareGetExportPolicyRetType) { setUpdateShareResponseShareGetExportPolicyAttributeType(&o.ExportPolicy, v) } // SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetExportPolicyNil() { o.ExportPolicy = nil } // UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) UnsetExportPolicy() { o.ExportPolicy = nil } // GetId returns the Id field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetId() (res UpdateShareResponseShareGetIdRetType) { res, _ = o.GetIdOk() return @@ -283,22 +350,26 @@ func (o *UpdateShareResponseShare) GetId() (res UpdateShareResponseShareGetIdRet // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetIdOk() (ret UpdateShareResponseShareGetIdRetType, ok bool) { return getUpdateShareResponseShareGetIdAttributeTypeOk(o.Id) } // HasId returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetId(v UpdateShareResponseShareGetIdRetType) { setUpdateShareResponseShareGetIdAttributeType(&o.Id, v) } // GetLabels returns the Labels field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetLabels() (res UpdateShareResponseShareGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -306,22 +377,26 @@ func (o *UpdateShareResponseShare) GetLabels() (res UpdateShareResponseShareGetL // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetLabelsOk() (ret UpdateShareResponseShareGetLabelsRetType, ok bool) { return getUpdateShareResponseShareGetLabelsAttributeTypeOk(o.Labels) } // HasLabels returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetLabels(v UpdateShareResponseShareGetLabelsRetType) { setUpdateShareResponseShareGetLabelsAttributeType(&o.Labels, v) } // GetMountPath returns the MountPath field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetMountPath() (res UpdateShareResponseShareGetMountPathRetType) { res, _ = o.GetMountPathOk() return @@ -329,22 +404,26 @@ func (o *UpdateShareResponseShare) GetMountPath() (res UpdateShareResponseShareG // GetMountPathOk returns a tuple with the MountPath field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetMountPathOk() (ret UpdateShareResponseShareGetMountPathRetType, ok bool) { return getUpdateShareResponseShareGetMountPathAttributeTypeOk(o.MountPath) } // HasMountPath returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetMountPath(v UpdateShareResponseShareGetMountPathRetType) { setUpdateShareResponseShareGetMountPathAttributeType(&o.MountPath, v) } // GetName returns the Name field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetName() (res UpdateShareResponseShareGetNameRetType) { res, _ = o.GetNameOk() return @@ -352,22 +431,26 @@ func (o *UpdateShareResponseShare) GetName() (res UpdateShareResponseShareGetNam // GetNameOk returns a tuple with the Name field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetNameOk() (ret UpdateShareResponseShareGetNameRetType, ok bool) { return getUpdateShareResponseShareGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetName(v UpdateShareResponseShareGetNameRetType) { setUpdateShareResponseShareGetNameAttributeType(&o.Name, v) } // GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytes() (res UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) { res, _ = o.GetSpaceHardLimitGigabytesOk() return @@ -375,22 +458,26 @@ func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytes() (res UpdateShare // GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetSpaceHardLimitGigabytesOk() (ret UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType, ok bool) { return getUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeTypeOk(o.SpaceHardLimitGigabytes) } // HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetSpaceHardLimitGigabytes(v UpdateShareResponseShareGetSpaceHardLimitGigabytesRetType) { setUpdateShareResponseShareGetSpaceHardLimitGigabytesAttributeType(&o.SpaceHardLimitGigabytes, v) } // GetState returns the State field value if set, zero value otherwise. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetState() (res UpdateShareResponseShareGetStateRetType) { res, _ = o.GetStateOk() return @@ -398,21 +485,25 @@ func (o *UpdateShareResponseShare) GetState() (res UpdateShareResponseShareGetSt // GetStateOk returns a tuple with the State field value if set, nil otherwise // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) GetStateOk() (ret UpdateShareResponseShareGetStateRetType, ok bool) { return getUpdateShareResponseShareGetStateAttributeTypeOk(o.State) } // HasState returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead 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. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateShareResponseShare) SetState(v UpdateShareResponseShareGetStateRetType) { setUpdateShareResponseShareGetStateAttributeType(&o.State, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateShareResponseShare) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateShareResponseShareGetCreatedAtAttributeTypeOk(o.CreatedAt); ok { @@ -442,37 +533,45 @@ func (o UpdateShareResponseShare) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableUpdateShareResponseShare struct { value *UpdateShareResponseShare isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareResponseShare) Get() *UpdateShareResponseShare { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareResponseShare) Set(val *UpdateShareResponseShare) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareResponseShare) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareResponseShare) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableUpdateShareResponseShare(val *UpdateShareResponseShare) *NullableUpdateShareResponseShare { return &NullableUpdateShareResponseShare{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateShareResponseShare) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateShareResponseShare) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_validation_error.go b/services/sfs/model_validation_error.go index feb7bbc76..6cea07a6a 100644 --- a/services/sfs/model_validation_error.go +++ b/services/sfs/model_validation_error.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ValidationError{} */ // isAny +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetErrorDescriptionAttributeType = any + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetErrorDescriptionArgType = any + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetErrorDescriptionRetType = any +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorGetErrorDescriptionAttributeTypeOk(arg ValidationErrorGetErrorDescriptionAttributeType) (ret ValidationErrorGetErrorDescriptionRetType, ok bool) { if arg == nil { return nil, false @@ -33,6 +40,7 @@ func getValidationErrorGetErrorDescriptionAttributeTypeOk(arg ValidationErrorGet return arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorGetErrorDescriptionAttributeType(arg *ValidationErrorGetErrorDescriptionAttributeType, val ValidationErrorGetErrorDescriptionRetType) { *arg = val } @@ -42,8 +50,10 @@ func setValidationErrorGetErrorDescriptionAttributeType(arg *ValidationErrorGetE */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetTitleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorGetTitleAttributeTypeOk(arg ValidationErrorGetTitleAttributeType) (ret ValidationErrorGetTitleRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getValidationErrorGetTitleAttributeTypeOk(arg ValidationErrorGetTitleAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorGetTitleAttributeType(arg *ValidationErrorGetTitleAttributeType, val ValidationErrorGetTitleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetTitleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetTitleRetType = string /* @@ -63,8 +77,10 @@ type ValidationErrorGetTitleRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetTypeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorGetTypeAttributeTypeOk(arg ValidationErrorGetTypeAttributeType) (ret ValidationErrorGetTypeRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +88,15 @@ func getValidationErrorGetTypeAttributeTypeOk(arg ValidationErrorGetTypeAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorGetTypeAttributeType(arg *ValidationErrorGetTypeAttributeType, val ValidationErrorGetTypeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetTypeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetTypeRetType = string /* @@ -84,10 +104,16 @@ type ValidationErrorGetTypeRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetFieldsAttributeType = *[]ValidationErrorField + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetFieldsArgType = []ValidationErrorField + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorGetFieldsRetType = []ValidationErrorField +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorGetFieldsAttributeTypeOk(arg ValidationErrorGetFieldsAttributeType) (ret ValidationErrorGetFieldsRetType, ok bool) { if arg == nil { return ret, false @@ -95,11 +121,13 @@ func getValidationErrorGetFieldsAttributeTypeOk(arg ValidationErrorGetFieldsAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorGetFieldsAttributeType(arg *ValidationErrorGetFieldsAttributeType, val ValidationErrorGetFieldsRetType) { *arg = &val } // ValidationError struct for ValidationError +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationError struct { // Deprecated: Human-readable string of the error that occured ErrorDescription ValidationErrorGetErrorDescriptionAttributeType `json:"error_description,omitempty"` @@ -113,12 +141,14 @@ type ValidationError struct { Fields ValidationErrorGetFieldsAttributeType `json:"fields" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ValidationError ValidationError // NewValidationError instantiates a new ValidationError 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewValidationError(title ValidationErrorGetTitleArgType, types ValidationErrorGetTypeArgType, fields ValidationErrorGetFieldsArgType) *ValidationError { this := ValidationError{} setValidationErrorGetTitleAttributeType(&this.Title, title) @@ -130,13 +160,14 @@ func NewValidationError(title ValidationErrorGetTitleArgType, types ValidationEr // NewValidationErrorWithDefaults instantiates a new ValidationError 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewValidationErrorWithDefaults() *ValidationError { this := ValidationError{} return &this } // GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise (both if not set or set to explicit null). -// Deprecated +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetErrorDescription() (res ValidationErrorGetErrorDescriptionRetType) { res, _ = o.GetErrorDescriptionOk() return @@ -145,24 +176,26 @@ func (o *ValidationError) GetErrorDescription() (res ValidationErrorGetErrorDesc // 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetErrorDescriptionOk() (ret ValidationErrorGetErrorDescriptionRetType, ok bool) { return getValidationErrorGetErrorDescriptionAttributeTypeOk(o.ErrorDescription) } // HasErrorDescription returns a boolean if a field has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) HasErrorDescription() bool { _, ok := o.GetErrorDescriptionOk() return ok } // SetErrorDescription gets a reference to the given interface{} and assigns it to the ErrorDescription field. -// Deprecated +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) SetErrorDescription(v ValidationErrorGetErrorDescriptionRetType) { setValidationErrorGetErrorDescriptionAttributeType(&o.ErrorDescription, v) } // GetTitle returns the Title field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetTitle() (ret ValidationErrorGetTitleRetType) { ret, _ = o.GetTitleOk() return ret @@ -170,16 +203,19 @@ func (o *ValidationError) GetTitle() (ret ValidationErrorGetTitleRetType) { // GetTitleOk returns a tuple with the Title field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetTitleOk() (ret ValidationErrorGetTitleRetType, ok bool) { return getValidationErrorGetTitleAttributeTypeOk(o.Title) } // SetTitle sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) SetTitle(v ValidationErrorGetTitleRetType) { setValidationErrorGetTitleAttributeType(&o.Title, v) } // GetType returns the Type field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetType() (ret ValidationErrorGetTypeRetType) { ret, _ = o.GetTypeOk() return ret @@ -187,16 +223,19 @@ func (o *ValidationError) GetType() (ret ValidationErrorGetTypeRetType) { // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetTypeOk() (ret ValidationErrorGetTypeRetType, ok bool) { return getValidationErrorGetTypeAttributeTypeOk(o.Type) } // SetType sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) SetType(v ValidationErrorGetTypeRetType) { setValidationErrorGetTypeAttributeType(&o.Type, v) } // GetFields returns the Fields field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetFields() (ret ValidationErrorGetFieldsRetType) { ret, _ = o.GetFieldsOk() return ret @@ -204,15 +243,18 @@ func (o *ValidationError) GetFields() (ret ValidationErrorGetFieldsRetType) { // GetFieldsOk returns a tuple with the Fields field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) GetFieldsOk() (ret ValidationErrorGetFieldsRetType, ok bool) { return getValidationErrorGetFieldsAttributeTypeOk(o.Fields) } // SetFields sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationError) SetFields(v ValidationErrorGetFieldsRetType) { setValidationErrorGetFieldsAttributeType(&o.Fields, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ValidationError) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getValidationErrorGetErrorDescriptionAttributeTypeOk(o.ErrorDescription); ok { @@ -230,37 +272,45 @@ func (o ValidationError) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValidationError struct { value *ValidationError isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationError) Get() *ValidationError { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationError) Set(val *ValidationError) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationError) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationError) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableValidationError(val *ValidationError) *NullableValidationError { return &NullableValidationError{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationError) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationError) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_validation_error_all_of.go b/services/sfs/model_validation_error_all_of.go index 38df249be..4aa0ed257 100644 --- a/services/sfs/model_validation_error_all_of.go +++ b/services/sfs/model_validation_error_all_of.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ValidationErrorAllOf{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorAllOfGetFieldsAttributeType = *[]ValidationErrorField + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorAllOfGetFieldsArgType = []ValidationErrorField + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorAllOfGetFieldsRetType = []ValidationErrorField +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorAllOfGetFieldsAttributeTypeOk(arg ValidationErrorAllOfGetFieldsAttributeType) (ret ValidationErrorAllOfGetFieldsRetType, ok bool) { if arg == nil { return ret, false @@ -33,22 +40,26 @@ func getValidationErrorAllOfGetFieldsAttributeTypeOk(arg ValidationErrorAllOfGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorAllOfGetFieldsAttributeType(arg *ValidationErrorAllOfGetFieldsAttributeType, val ValidationErrorAllOfGetFieldsRetType) { *arg = &val } // ValidationErrorAllOf struct for ValidationErrorAllOf +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorAllOf struct { // REQUIRED Fields ValidationErrorAllOfGetFieldsAttributeType `json:"fields" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ValidationErrorAllOf ValidationErrorAllOf // NewValidationErrorAllOf instantiates a new ValidationErrorAllOf 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewValidationErrorAllOf(fields ValidationErrorAllOfGetFieldsArgType) *ValidationErrorAllOf { this := ValidationErrorAllOf{} setValidationErrorAllOfGetFieldsAttributeType(&this.Fields, fields) @@ -58,12 +69,14 @@ func NewValidationErrorAllOf(fields ValidationErrorAllOfGetFieldsArgType) *Valid // NewValidationErrorAllOfWithDefaults instantiates a new ValidationErrorAllOf 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewValidationErrorAllOfWithDefaults() *ValidationErrorAllOf { this := ValidationErrorAllOf{} return &this } // GetFields returns the Fields field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorAllOf) GetFields() (ret ValidationErrorAllOfGetFieldsRetType) { ret, _ = o.GetFieldsOk() return ret @@ -71,15 +84,18 @@ func (o *ValidationErrorAllOf) GetFields() (ret ValidationErrorAllOfGetFieldsRet // GetFieldsOk returns a tuple with the Fields field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorAllOf) GetFieldsOk() (ret ValidationErrorAllOfGetFieldsRetType, ok bool) { return getValidationErrorAllOfGetFieldsAttributeTypeOk(o.Fields) } // SetFields sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorAllOf) SetFields(v ValidationErrorAllOfGetFieldsRetType) { setValidationErrorAllOfGetFieldsAttributeType(&o.Fields, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ValidationErrorAllOf) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getValidationErrorAllOfGetFieldsAttributeTypeOk(o.Fields); ok { @@ -88,37 +104,45 @@ func (o ValidationErrorAllOf) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValidationErrorAllOf struct { value *ValidationErrorAllOf isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationErrorAllOf) Get() *ValidationErrorAllOf { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationErrorAllOf) Set(val *ValidationErrorAllOf) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationErrorAllOf) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationErrorAllOf) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableValidationErrorAllOf(val *ValidationErrorAllOf) *NullableValidationErrorAllOf { return &NullableValidationErrorAllOf{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationErrorAllOf) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationErrorAllOf) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/model_validation_error_field.go b/services/sfs/model_validation_error_field.go index 35657ab4a..36e43b15a 100644 --- a/services/sfs/model_validation_error_field.go +++ b/services/sfs/model_validation_error_field.go @@ -8,6 +8,7 @@ API version: 1.0.0 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead package sfs import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ValidationErrorField{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorFieldGetFieldAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorFieldGetFieldAttributeTypeOk(arg ValidationErrorFieldGetFieldAttributeType) (ret ValidationErrorFieldGetFieldRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getValidationErrorFieldGetFieldAttributeTypeOk(arg ValidationErrorFieldGetF return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorFieldGetFieldAttributeType(arg *ValidationErrorFieldGetFieldAttributeType, val ValidationErrorFieldGetFieldRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorFieldGetFieldArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorFieldGetFieldRetType = string /* @@ -43,8 +50,10 @@ type ValidationErrorFieldGetFieldRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorFieldGetReasonAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getValidationErrorFieldGetReasonAttributeTypeOk(arg ValidationErrorFieldGetReasonAttributeType) (ret ValidationErrorFieldGetReasonRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getValidationErrorFieldGetReasonAttributeTypeOk(arg ValidationErrorFieldGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setValidationErrorFieldGetReasonAttributeType(arg *ValidationErrorFieldGetReasonAttributeType, val ValidationErrorFieldGetReasonRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorFieldGetReasonArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorFieldGetReasonRetType = string // ValidationErrorField struct for ValidationErrorField +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ValidationErrorField struct { // The name of the field in the request that has failed the validation // REQUIRED @@ -69,12 +83,14 @@ type ValidationErrorField struct { Reason ValidationErrorFieldGetReasonAttributeType `json:"reason" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _ValidationErrorField ValidationErrorField // NewValidationErrorField instantiates a new ValidationErrorField 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewValidationErrorField(field ValidationErrorFieldGetFieldArgType, reason ValidationErrorFieldGetReasonArgType) *ValidationErrorField { this := ValidationErrorField{} setValidationErrorFieldGetFieldAttributeType(&this.Field, field) @@ -85,12 +101,14 @@ func NewValidationErrorField(field ValidationErrorFieldGetFieldArgType, reason V // NewValidationErrorFieldWithDefaults instantiates a new ValidationErrorField 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 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewValidationErrorFieldWithDefaults() *ValidationErrorField { this := ValidationErrorField{} return &this } // GetField returns the Field field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorField) GetField() (ret ValidationErrorFieldGetFieldRetType) { ret, _ = o.GetFieldOk() return ret @@ -98,16 +116,19 @@ func (o *ValidationErrorField) GetField() (ret ValidationErrorFieldGetFieldRetTy // GetFieldOk returns a tuple with the Field field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorField) GetFieldOk() (ret ValidationErrorFieldGetFieldRetType, ok bool) { return getValidationErrorFieldGetFieldAttributeTypeOk(o.Field) } // SetField sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorField) SetField(v ValidationErrorFieldGetFieldRetType) { setValidationErrorFieldGetFieldAttributeType(&o.Field, v) } // GetReason returns the Reason field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorField) GetReason() (ret ValidationErrorFieldGetReasonRetType) { ret, _ = o.GetReasonOk() return ret @@ -115,15 +136,18 @@ func (o *ValidationErrorField) GetReason() (ret ValidationErrorFieldGetReasonRet // GetReasonOk returns a tuple with the Reason field value // and a boolean to check if the value has been set. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorField) GetReasonOk() (ret ValidationErrorFieldGetReasonRetType, ok bool) { return getValidationErrorFieldGetReasonAttributeTypeOk(o.Reason) } // SetReason sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ValidationErrorField) SetReason(v ValidationErrorFieldGetReasonRetType) { setValidationErrorFieldGetReasonAttributeType(&o.Reason, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ValidationErrorField) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getValidationErrorFieldGetFieldAttributeTypeOk(o.Field); ok { @@ -135,37 +159,45 @@ func (o ValidationErrorField) ToMap() (map[string]interface{}, error) { return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValidationErrorField struct { value *ValidationErrorField isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationErrorField) Get() *ValidationErrorField { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationErrorField) Set(val *ValidationErrorField) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationErrorField) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationErrorField) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableValidationErrorField(val *ValidationErrorField) *NullableValidationErrorField { return &NullableValidationErrorField{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValidationErrorField) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValidationErrorField) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/sfs/oas_commit b/services/sfs/oas_commit index 5c20c2052..853627d06 100644 --- a/services/sfs/oas_commit +++ b/services/sfs/oas_commit @@ -1 +1 @@ -fe212a12ec79a23b81cb53d9a7728f5706bddc23 +335aa32af4d6c0d2a036b8567773da2f051f7efb diff --git a/services/sfs/utils.go b/services/sfs/utils.go index 143320758..348c445fb 100644 --- a/services/sfs/utils.go +++ b/services/sfs/utils.go @@ -18,341 +18,419 @@ import ( ) // PtrBool is a helper routine that returns a pointer to given boolean value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrBool(v bool) *bool { return &v } // PtrInt is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt(v int) *int { return &v } // PtrInt32 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt32(v int32) *int32 { return &v } // PtrInt64 is a helper routine that returns a pointer to given integer value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrInt64(v int64) *int64 { return &v } // PtrFloat32 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat32(v float32) *float32 { return &v } // PtrFloat64 is a helper routine that returns a pointer to given float value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrFloat64(v float64) *float64 { return &v } // PtrString is a helper routine that returns a pointer to given string value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrString(v string) *string { return &v } // PtrTime is helper routine that returns a pointer to given Time value. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func PtrTime(v time.Time) *time.Time { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableValue[T any] struct { value *T isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) Get() *T { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Set(val *T) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableValue[T]) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableValue[T]) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableBool struct { value *bool isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) Get() *bool { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Set(val *bool) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableBool(val *bool) *NullableBool { return &NullableBool{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBool) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBool) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt struct { value *int isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) Get() *int { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Set(val *int) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt(val *int) *NullableInt { return &NullableInt{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt32 struct { value *int32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) Get() *int32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Set(val *int32) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt32(val *int32) *NullableInt32 { return &NullableInt32{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt32) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInt64 struct { value *int64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) Get() *int64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Set(val *int64) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableInt64(val *int64) *NullableInt64 { return &NullableInt64{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInt64) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInt64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat32 struct { value *float32 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) Get() *float32 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Set(val *float32) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFloat32(val *float32) *NullableFloat32 { return &NullableFloat32{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat32) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat32) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableFloat64 struct { value *float64 isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) Get() *float64 { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Set(val *float64) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableFloat64(val *float64) *NullableFloat64 { return &NullableFloat64{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFloat64) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFloat64) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableString struct { value *string isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) Get() *string { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Set(val *string) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableString(val *string) *NullableString { return &NullableString{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableString) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableString) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableTime struct { value *time.Time isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) Get() *time.Time { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Set(val *time.Time) { v.value = val v.isSet = true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) IsSet() bool { return v.isSet } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) Unset() { v.value = nil v.isSet = false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewNullableTime(val *time.Time) *NullableTime { return &NullableTime{value: val, isSet: true} } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableTime) MarshalJSON() ([]byte, error) { return v.value.MarshalJSON() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableTime) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) } // IsNil checks if an input is nil +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func IsNil(i interface{}) bool { if i == nil { return true @@ -369,13 +447,16 @@ func IsNil(i interface{}) bool { return false } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MappedNullable interface { ToMap() (map[string]interface{}, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead const letterRunes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" // randString returns a random string with a specified length. It panics if n <= 0. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func randString(n int) string { b := make([]byte, n) for i := range b { diff --git a/services/sfs/v1api/api_default.go b/services/sfs/v1api/api_default.go new file mode 100644 index 000000000..39fc33fc4 --- /dev/null +++ b/services/sfs/v1api/api_default.go @@ -0,0 +1,3595 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CreateResourcePool Create Resource Pool + + Create a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateResourcePoolRequest + */ + CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest + + // CreateResourcePoolExecute executes the request + // @return CreateResourcePoolResponse + CreateResourcePoolExecute(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) + + /* + CreateResourcePoolSnapshot Create Resource Pool Snapshot + + Creates a Snapshot of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateResourcePoolSnapshotRequest + */ + CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest + + // CreateResourcePoolSnapshotExecute executes the request + // @return CreateResourcePoolSnapshotResponse + CreateResourcePoolSnapshotExecute(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) + + /* + CreateShare Create Share + + Creates a Share in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateShareRequest + */ + CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest + + // CreateShareExecute executes the request + // @return CreateShareResponse + CreateShareExecute(r ApiCreateShareRequest) (*CreateShareResponse, error) + + /* + CreateShareExportPolicy Create Share Export Policy + + Creates a ShareExportPolicy in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateShareExportPolicyRequest + */ + CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest + + // CreateShareExportPolicyExecute executes the request + // @return CreateShareExportPolicyResponse + CreateShareExportPolicyExecute(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) + + /* + DeleteResourcePool Delete Resource Pool + + Deletes a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiDeleteResourcePoolRequest + */ + DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest + + // DeleteResourcePoolExecute executes the request + // @return map[string]interface{} + DeleteResourcePoolExecute(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) + + /* + DeleteResourcePoolSnapshot Delete Resource Pool Snapshot + + Deletes a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiDeleteResourcePoolSnapshotRequest + */ + DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest + + // DeleteResourcePoolSnapshotExecute executes the request + // @return map[string]interface{} + DeleteResourcePoolSnapshotExecute(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) + + /* + DeleteShare Delete Share + + Deletes a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiDeleteShareRequest + */ + DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest + + // DeleteShareExecute executes the request + // @return map[string]interface{} + DeleteShareExecute(r ApiDeleteShareRequest) (map[string]interface{}, error) + + /* + DeleteShareExportPolicy Delete Share Export Policy + + Deletes a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiDeleteShareExportPolicyRequest + */ + DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest + + // DeleteShareExportPolicyExecute executes the request + // @return map[string]interface{} + DeleteShareExportPolicyExecute(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) + + /* + GetResourcePool Get Resource Pool + + Retrieves a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiGetResourcePoolRequest + */ + GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest + + // GetResourcePoolExecute executes the request + // @return GetResourcePoolResponse + GetResourcePoolExecute(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) + + /* + GetResourcePoolSnapshot Get Resource Pool Snapshot + + Retrieves a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiGetResourcePoolSnapshotRequest + */ + GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest + + // GetResourcePoolSnapshotExecute executes the request + // @return GetResourcePoolSnapshotResponse + GetResourcePoolSnapshotExecute(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) + + /* + GetShare Get Share + + Retrieves a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiGetShareRequest + */ + GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest + + // GetShareExecute executes the request + // @return GetShareResponse + GetShareExecute(r ApiGetShareRequest) (*GetShareResponse, error) + + /* + GetShareExportPolicy Get Share Export Policy + + Retrieves a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiGetShareExportPolicyRequest + */ + GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest + + // GetShareExportPolicyExecute executes the request + // @return GetShareExportPolicyResponse + GetShareExportPolicyExecute(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) + + /* + ListPerformanceClasses List Resource Pool Performance Classes + + Lists all performances classes available + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPerformanceClassesRequest + */ + ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest + + // ListPerformanceClassesExecute executes the request + // @return ListPerformanceClassesResponse + ListPerformanceClassesExecute(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) + + /* + ListResourcePoolSnapshots List Resource Pool Snapshots + + Lists the Snapshots of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListResourcePoolSnapshotsRequest + */ + ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest + + // ListResourcePoolSnapshotsExecute executes the request + // @return ListResourcePoolSnapshotsResponse + ListResourcePoolSnapshotsExecute(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) + + /* + ListResourcePools List Resource Pools + + Lists Resource Pools in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListResourcePoolsRequest + */ + ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest + + // ListResourcePoolsExecute executes the request + // @return ListResourcePoolsResponse + ListResourcePoolsExecute(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) + + /* + ListShareExportPolicies List Share Export Policies + + Lists ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListShareExportPoliciesRequest + */ + ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest + + // ListShareExportPoliciesExecute executes the request + // @return ListShareExportPoliciesResponse + ListShareExportPoliciesExecute(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) + + /* + ListShares List Shares + + Lists Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListSharesRequest + */ + ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest + + // ListSharesExecute executes the request + // @return ListSharesResponse + ListSharesExecute(r ApiListSharesRequest) (*ListSharesResponse, error) + + /* + UpdateResourcePool Update Resource Pool + + Updates a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiUpdateResourcePoolRequest + */ + UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest + + // UpdateResourcePoolExecute executes the request + // @return UpdateResourcePoolResponse + UpdateResourcePoolExecute(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) + + /* + UpdateShare Update Share + + Updates a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiUpdateShareRequest + */ + UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest + + // UpdateShareExecute executes the request + // @return UpdateShareResponse + UpdateShareExecute(r ApiUpdateShareRequest) (*UpdateShareResponse, error) + + /* + UpdateShareExportPolicy Update Share Export Policy + + Updates a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiUpdateShareExportPolicyRequest + */ + UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest + + // UpdateShareExportPolicyExecute executes the request + // @return UpdateShareExportPolicyResponse + UpdateShareExportPolicyExecute(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createResourcePoolPayload *CreateResourcePoolPayload +} + +func (r ApiCreateResourcePoolRequest) CreateResourcePoolPayload(createResourcePoolPayload CreateResourcePoolPayload) ApiCreateResourcePoolRequest { + r.createResourcePoolPayload = &createResourcePoolPayload + return r +} + +func (r ApiCreateResourcePoolRequest) Execute() (*CreateResourcePoolResponse, error) { + return r.ApiService.CreateResourcePoolExecute(r) +} + +/* +CreateResourcePool Create Resource Pool + +Create a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateResourcePoolRequest +*/ +func (a *DefaultAPIService) CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest { + return ApiCreateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateResourcePoolResponse +func (a *DefaultAPIService) CreateResourcePoolExecute(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateResourcePoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createResourcePoolPayload == nil { + return localVarReturnValue, reportError("createResourcePoolPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createResourcePoolPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateResourcePoolSnapshotRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + createResourcePoolSnapshotPayload *CreateResourcePoolSnapshotPayload +} + +func (r ApiCreateResourcePoolSnapshotRequest) CreateResourcePoolSnapshotPayload(createResourcePoolSnapshotPayload CreateResourcePoolSnapshotPayload) ApiCreateResourcePoolSnapshotRequest { + r.createResourcePoolSnapshotPayload = &createResourcePoolSnapshotPayload + return r +} + +func (r ApiCreateResourcePoolSnapshotRequest) Execute() (*CreateResourcePoolSnapshotResponse, error) { + return r.ApiService.CreateResourcePoolSnapshotExecute(r) +} + +/* +CreateResourcePoolSnapshot Create Resource Pool Snapshot + +Creates a Snapshot of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateResourcePoolSnapshotRequest +*/ +func (a *DefaultAPIService) CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest { + return ApiCreateResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return CreateResourcePoolSnapshotResponse +func (a *DefaultAPIService) CreateResourcePoolSnapshotExecute(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateResourcePoolSnapshotResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateResourcePoolSnapshot") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createResourcePoolSnapshotPayload == nil { + return localVarReturnValue, reportError("createResourcePoolSnapshotPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createResourcePoolSnapshotPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + createSharePayload *CreateSharePayload +} + +func (r ApiCreateShareRequest) CreateSharePayload(createSharePayload CreateSharePayload) ApiCreateShareRequest { + r.createSharePayload = &createSharePayload + return r +} + +func (r ApiCreateShareRequest) Execute() (*CreateShareResponse, error) { + return r.ApiService.CreateShareExecute(r) +} + +/* +CreateShare Create Share + +Creates a Share in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateShareRequest +*/ +func (a *DefaultAPIService) CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest { + return ApiCreateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return CreateShareResponse +func (a *DefaultAPIService) CreateShareExecute(r ApiCreateShareRequest) (*CreateShareResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateShareResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createSharePayload == nil { + return localVarReturnValue, reportError("createSharePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createSharePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createShareExportPolicyPayload *CreateShareExportPolicyPayload +} + +func (r ApiCreateShareExportPolicyRequest) CreateShareExportPolicyPayload(createShareExportPolicyPayload CreateShareExportPolicyPayload) ApiCreateShareExportPolicyRequest { + r.createShareExportPolicyPayload = &createShareExportPolicyPayload + return r +} + +func (r ApiCreateShareExportPolicyRequest) Execute() (*CreateShareExportPolicyResponse, error) { + return r.ApiService.CreateShareExportPolicyExecute(r) +} + +/* +CreateShareExportPolicy Create Share Export Policy + +Creates a ShareExportPolicy in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateShareExportPolicyRequest +*/ +func (a *DefaultAPIService) CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest { + return ApiCreateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateShareExportPolicyResponse +func (a *DefaultAPIService) CreateShareExportPolicyExecute(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateShareExportPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/shareExportPolicies" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createShareExportPolicyPayload == nil { + return localVarReturnValue, reportError("createShareExportPolicyPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createShareExportPolicyPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiDeleteResourcePoolRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteResourcePoolExecute(r) +} + +/* +DeleteResourcePool Delete Resource Pool + +Deletes a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiDeleteResourcePoolRequest +*/ +func (a *DefaultAPIService) DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest { + return ApiDeleteResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteResourcePoolExecute(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteResourcePoolSnapshotRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + snapshotName string +} + +func (r ApiDeleteResourcePoolSnapshotRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteResourcePoolSnapshotExecute(r) +} + +/* +DeleteResourcePoolSnapshot Delete Resource Pool Snapshot + +Deletes a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiDeleteResourcePoolSnapshotRequest +*/ +func (a *DefaultAPIService) DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest { + return ApiDeleteResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteResourcePoolSnapshotExecute(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteResourcePoolSnapshot") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"snapshotName"+"}", url.PathEscape(parameterValueToString(r.snapshotName, "snapshotName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + shareId string +} + +func (r ApiDeleteShareRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteShareExecute(r) +} + +/* +DeleteShare Delete Share + +Deletes a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiDeleteShareRequest +*/ +func (a *DefaultAPIService) DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest { + return ApiDeleteShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteShareExecute(r ApiDeleteShareRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"shareId"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + policyId string +} + +func (r ApiDeleteShareExportPolicyRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteShareExportPolicyExecute(r) +} + +/* +DeleteShareExportPolicy Delete Share Export Policy + +Deletes a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiDeleteShareExportPolicyRequest +*/ +func (a *DefaultAPIService) DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest { + return ApiDeleteShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteShareExportPolicyExecute(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policyId"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiGetResourcePoolRequest) Execute() (*GetResourcePoolResponse, error) { + return r.ApiService.GetResourcePoolExecute(r) +} + +/* +GetResourcePool Get Resource Pool + +Retrieves a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiGetResourcePoolRequest +*/ +func (a *DefaultAPIService) GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest { + return ApiGetResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return GetResourcePoolResponse +func (a *DefaultAPIService) GetResourcePoolExecute(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetResourcePoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetResourcePoolSnapshotRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + snapshotName string +} + +func (r ApiGetResourcePoolSnapshotRequest) Execute() (*GetResourcePoolSnapshotResponse, error) { + return r.ApiService.GetResourcePoolSnapshotExecute(r) +} + +/* +GetResourcePoolSnapshot Get Resource Pool Snapshot + +Retrieves a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiGetResourcePoolSnapshotRequest +*/ +func (a *DefaultAPIService) GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest { + return ApiGetResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// Execute executes the request +// +// @return GetResourcePoolSnapshotResponse +func (a *DefaultAPIService) GetResourcePoolSnapshotExecute(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetResourcePoolSnapshotResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetResourcePoolSnapshot") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"snapshotName"+"}", url.PathEscape(parameterValueToString(r.snapshotName, "snapshotName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + shareId string +} + +func (r ApiGetShareRequest) Execute() (*GetShareResponse, error) { + return r.ApiService.GetShareExecute(r) +} + +/* +GetShare Get Share + +Retrieves a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiGetShareRequest +*/ +func (a *DefaultAPIService) GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest { + return ApiGetShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// Execute executes the request +// +// @return GetShareResponse +func (a *DefaultAPIService) GetShareExecute(r ApiGetShareRequest) (*GetShareResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetShareResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"shareId"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + policyId string +} + +func (r ApiGetShareExportPolicyRequest) Execute() (*GetShareExportPolicyResponse, error) { + return r.ApiService.GetShareExportPolicyExecute(r) +} + +/* +GetShareExportPolicy Get Share Export Policy + +Retrieves a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiGetShareExportPolicyRequest +*/ +func (a *DefaultAPIService) GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest { + return ApiGetShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// Execute executes the request +// +// @return GetShareExportPolicyResponse +func (a *DefaultAPIService) GetShareExportPolicyExecute(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetShareExportPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policyId"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListPerformanceClassesRequest struct { + ctx context.Context + ApiService DefaultAPI +} + +func (r ApiListPerformanceClassesRequest) Execute() (*ListPerformanceClassesResponse, error) { + return r.ApiService.ListPerformanceClassesExecute(r) +} + +/* +ListPerformanceClasses List Resource Pool Performance Classes + +Lists all performances classes available + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPerformanceClassesRequest +*/ +func (a *DefaultAPIService) ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest { + return ApiListPerformanceClassesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListPerformanceClassesResponse +func (a *DefaultAPIService) ListPerformanceClassesExecute(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListPerformanceClassesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListPerformanceClasses") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/resourcePoolPerformanceClasses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListResourcePoolSnapshotsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiListResourcePoolSnapshotsRequest) Execute() (*ListResourcePoolSnapshotsResponse, error) { + return r.ApiService.ListResourcePoolSnapshotsExecute(r) +} + +/* +ListResourcePoolSnapshots List Resource Pool Snapshots + +Lists the Snapshots of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListResourcePoolSnapshotsRequest +*/ +func (a *DefaultAPIService) ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest { + return ApiListResourcePoolSnapshotsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return ListResourcePoolSnapshotsResponse +func (a *DefaultAPIService) ListResourcePoolSnapshotsExecute(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListResourcePoolSnapshotsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListResourcePoolSnapshots") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListResourcePoolsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListResourcePoolsRequest) Execute() (*ListResourcePoolsResponse, error) { + return r.ApiService.ListResourcePoolsExecute(r) +} + +/* +ListResourcePools List Resource Pools + +Lists Resource Pools in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListResourcePoolsRequest +*/ +func (a *DefaultAPIService) ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest { + return ApiListResourcePoolsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListResourcePoolsResponse +func (a *DefaultAPIService) ListResourcePoolsExecute(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListResourcePoolsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListResourcePools") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListShareExportPoliciesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListShareExportPoliciesRequest) Execute() (*ListShareExportPoliciesResponse, error) { + return r.ApiService.ListShareExportPoliciesExecute(r) +} + +/* +ListShareExportPolicies List Share Export Policies + +Lists ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListShareExportPoliciesRequest +*/ +func (a *DefaultAPIService) ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest { + return ApiListShareExportPoliciesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListShareExportPoliciesResponse +func (a *DefaultAPIService) ListShareExportPoliciesExecute(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListShareExportPoliciesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListShareExportPolicies") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/shareExportPolicies" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListSharesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiListSharesRequest) Execute() (*ListSharesResponse, error) { + return r.ApiService.ListSharesExecute(r) +} + +/* +ListShares List Shares + +Lists Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListSharesRequest +*/ +func (a *DefaultAPIService) ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest { + return ApiListSharesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return ListSharesResponse +func (a *DefaultAPIService) ListSharesExecute(r ApiListSharesRequest) (*ListSharesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListSharesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListShares") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + updateResourcePoolPayload *UpdateResourcePoolPayload +} + +func (r ApiUpdateResourcePoolRequest) UpdateResourcePoolPayload(updateResourcePoolPayload UpdateResourcePoolPayload) ApiUpdateResourcePoolRequest { + r.updateResourcePoolPayload = &updateResourcePoolPayload + return r +} + +func (r ApiUpdateResourcePoolRequest) Execute() (*UpdateResourcePoolResponse, error) { + return r.ApiService.UpdateResourcePoolExecute(r) +} + +/* +UpdateResourcePool Update Resource Pool + +Updates a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiUpdateResourcePoolRequest +*/ +func (a *DefaultAPIService) UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest { + return ApiUpdateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return UpdateResourcePoolResponse +func (a *DefaultAPIService) UpdateResourcePoolExecute(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateResourcePoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateResourcePoolPayload == nil { + return localVarReturnValue, reportError("updateResourcePoolPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateResourcePoolPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + shareId string + updateSharePayload *UpdateSharePayload +} + +func (r ApiUpdateShareRequest) UpdateSharePayload(updateSharePayload UpdateSharePayload) ApiUpdateShareRequest { + r.updateSharePayload = &updateSharePayload + return r +} + +func (r ApiUpdateShareRequest) Execute() (*UpdateShareResponse, error) { + return r.ApiService.UpdateShareExecute(r) +} + +/* +UpdateShare Update Share + +Updates a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiUpdateShareRequest +*/ +func (a *DefaultAPIService) UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest { + return ApiUpdateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// Execute executes the request +// +// @return UpdateShareResponse +func (a *DefaultAPIService) UpdateShareExecute(r ApiUpdateShareRequest) (*UpdateShareResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateShareResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"shareId"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateSharePayload == nil { + return localVarReturnValue, reportError("updateSharePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateSharePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + policyId string + updateShareExportPolicyPayload *UpdateShareExportPolicyPayload +} + +func (r ApiUpdateShareExportPolicyRequest) UpdateShareExportPolicyPayload(updateShareExportPolicyPayload UpdateShareExportPolicyPayload) ApiUpdateShareExportPolicyRequest { + r.updateShareExportPolicyPayload = &updateShareExportPolicyPayload + return r +} + +func (r ApiUpdateShareExportPolicyRequest) Execute() (*UpdateShareExportPolicyResponse, error) { + return r.ApiService.UpdateShareExportPolicyExecute(r) +} + +/* +UpdateShareExportPolicy Update Share Export Policy + +Updates a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiUpdateShareExportPolicyRequest +*/ +func (a *DefaultAPIService) UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest { + return ApiUpdateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// Execute executes the request +// +// @return UpdateShareExportPolicyResponse +func (a *DefaultAPIService) UpdateShareExportPolicyExecute(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateShareExportPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policyId"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateShareExportPolicyPayload == nil { + return localVarReturnValue, reportError("updateShareExportPolicyPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateShareExportPolicyPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/sfs/v1api/api_default_mock.go b/services/sfs/v1api/api_default_mock.go new file mode 100644 index 000000000..bf02d4a7d --- /dev/null +++ b/services/sfs/v1api/api_default_mock.go @@ -0,0 +1,461 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CreateResourcePoolExecuteMock can be populated to implement the behavior of the CreateResourcePoolExecute function of this mock + CreateResourcePoolExecuteMock *func(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) + // CreateResourcePoolSnapshotExecuteMock can be populated to implement the behavior of the CreateResourcePoolSnapshotExecute function of this mock + CreateResourcePoolSnapshotExecuteMock *func(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) + // CreateShareExecuteMock can be populated to implement the behavior of the CreateShareExecute function of this mock + CreateShareExecuteMock *func(r ApiCreateShareRequest) (*CreateShareResponse, error) + // CreateShareExportPolicyExecuteMock can be populated to implement the behavior of the CreateShareExportPolicyExecute function of this mock + CreateShareExportPolicyExecuteMock *func(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) + // DeleteResourcePoolExecuteMock can be populated to implement the behavior of the DeleteResourcePoolExecute function of this mock + DeleteResourcePoolExecuteMock *func(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) + // DeleteResourcePoolSnapshotExecuteMock can be populated to implement the behavior of the DeleteResourcePoolSnapshotExecute function of this mock + DeleteResourcePoolSnapshotExecuteMock *func(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) + // DeleteShareExecuteMock can be populated to implement the behavior of the DeleteShareExecute function of this mock + DeleteShareExecuteMock *func(r ApiDeleteShareRequest) (map[string]interface{}, error) + // DeleteShareExportPolicyExecuteMock can be populated to implement the behavior of the DeleteShareExportPolicyExecute function of this mock + DeleteShareExportPolicyExecuteMock *func(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) + // GetResourcePoolExecuteMock can be populated to implement the behavior of the GetResourcePoolExecute function of this mock + GetResourcePoolExecuteMock *func(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) + // GetResourcePoolSnapshotExecuteMock can be populated to implement the behavior of the GetResourcePoolSnapshotExecute function of this mock + GetResourcePoolSnapshotExecuteMock *func(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) + // GetShareExecuteMock can be populated to implement the behavior of the GetShareExecute function of this mock + GetShareExecuteMock *func(r ApiGetShareRequest) (*GetShareResponse, error) + // GetShareExportPolicyExecuteMock can be populated to implement the behavior of the GetShareExportPolicyExecute function of this mock + GetShareExportPolicyExecuteMock *func(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) + // ListPerformanceClassesExecuteMock can be populated to implement the behavior of the ListPerformanceClassesExecute function of this mock + ListPerformanceClassesExecuteMock *func(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) + // ListResourcePoolSnapshotsExecuteMock can be populated to implement the behavior of the ListResourcePoolSnapshotsExecute function of this mock + ListResourcePoolSnapshotsExecuteMock *func(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) + // ListResourcePoolsExecuteMock can be populated to implement the behavior of the ListResourcePoolsExecute function of this mock + ListResourcePoolsExecuteMock *func(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) + // ListShareExportPoliciesExecuteMock can be populated to implement the behavior of the ListShareExportPoliciesExecute function of this mock + ListShareExportPoliciesExecuteMock *func(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) + // ListSharesExecuteMock can be populated to implement the behavior of the ListSharesExecute function of this mock + ListSharesExecuteMock *func(r ApiListSharesRequest) (*ListSharesResponse, error) + // UpdateResourcePoolExecuteMock can be populated to implement the behavior of the UpdateResourcePoolExecute function of this mock + UpdateResourcePoolExecuteMock *func(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) + // UpdateShareExecuteMock can be populated to implement the behavior of the UpdateShareExecute function of this mock + UpdateShareExecuteMock *func(r ApiUpdateShareRequest) (*UpdateShareResponse, error) + // UpdateShareExportPolicyExecuteMock can be populated to implement the behavior of the UpdateShareExportPolicyExecute function of this mock + UpdateShareExportPolicyExecuteMock *func(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) +} + +func (a DefaultAPIServiceMock) CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest { + return ApiCreateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateResourcePoolExecute(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) { + if a.CreateResourcePoolExecuteMock == nil { + var localVarReturnValue *CreateResourcePoolResponse + return localVarReturnValue, nil + } + + return (*a.CreateResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest { + return ApiCreateResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// CreateResourcePoolSnapshotExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateResourcePoolSnapshotExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateResourcePoolSnapshotExecute(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) { + if a.CreateResourcePoolSnapshotExecuteMock == nil { + var localVarReturnValue *CreateResourcePoolSnapshotResponse + return localVarReturnValue, nil + } + + return (*a.CreateResourcePoolSnapshotExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest { + return ApiCreateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// CreateShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateShareExecute(r ApiCreateShareRequest) (*CreateShareResponse, error) { + if a.CreateShareExecuteMock == nil { + var localVarReturnValue *CreateShareResponse + return localVarReturnValue, nil + } + + return (*a.CreateShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest { + return ApiCreateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateShareExportPolicyExecute(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) { + if a.CreateShareExportPolicyExecuteMock == nil { + var localVarReturnValue *CreateShareExportPolicyResponse + return localVarReturnValue, nil + } + + return (*a.CreateShareExportPolicyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest { + return ApiDeleteResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// DeleteResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteResourcePoolExecute(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) { + if a.DeleteResourcePoolExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest { + return ApiDeleteResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// DeleteResourcePoolSnapshotExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteResourcePoolSnapshotExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteResourcePoolSnapshotExecute(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) { + if a.DeleteResourcePoolSnapshotExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteResourcePoolSnapshotExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest { + return ApiDeleteShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// DeleteShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteShareExecute(r ApiDeleteShareRequest) (map[string]interface{}, error) { + if a.DeleteShareExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest { + return ApiDeleteShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// DeleteShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteShareExportPolicyExecute(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) { + if a.DeleteShareExportPolicyExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteShareExportPolicyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest { + return ApiGetResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// GetResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetResourcePoolExecute(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) { + if a.GetResourcePoolExecuteMock == nil { + var localVarReturnValue *GetResourcePoolResponse + return localVarReturnValue, nil + } + + return (*a.GetResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest { + return ApiGetResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// GetResourcePoolSnapshotExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetResourcePoolSnapshotExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetResourcePoolSnapshotExecute(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) { + if a.GetResourcePoolSnapshotExecuteMock == nil { + var localVarReturnValue *GetResourcePoolSnapshotResponse + return localVarReturnValue, nil + } + + return (*a.GetResourcePoolSnapshotExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest { + return ApiGetShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// GetShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetShareExecute(r ApiGetShareRequest) (*GetShareResponse, error) { + if a.GetShareExecuteMock == nil { + var localVarReturnValue *GetShareResponse + return localVarReturnValue, nil + } + + return (*a.GetShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest { + return ApiGetShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// GetShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetShareExportPolicyExecute(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) { + if a.GetShareExportPolicyExecuteMock == nil { + var localVarReturnValue *GetShareExportPolicyResponse + return localVarReturnValue, nil + } + + return (*a.GetShareExportPolicyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest { + return ApiListPerformanceClassesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// ListPerformanceClassesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPerformanceClassesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListPerformanceClassesExecute(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) { + if a.ListPerformanceClassesExecuteMock == nil { + var localVarReturnValue *ListPerformanceClassesResponse + return localVarReturnValue, nil + } + + return (*a.ListPerformanceClassesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest { + return ApiListResourcePoolSnapshotsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// ListResourcePoolSnapshotsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListResourcePoolSnapshotsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListResourcePoolSnapshotsExecute(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) { + if a.ListResourcePoolSnapshotsExecuteMock == nil { + var localVarReturnValue *ListResourcePoolSnapshotsResponse + return localVarReturnValue, nil + } + + return (*a.ListResourcePoolSnapshotsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest { + return ApiListResourcePoolsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListResourcePoolsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListResourcePoolsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListResourcePoolsExecute(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) { + if a.ListResourcePoolsExecuteMock == nil { + var localVarReturnValue *ListResourcePoolsResponse + return localVarReturnValue, nil + } + + return (*a.ListResourcePoolsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest { + return ApiListShareExportPoliciesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListShareExportPoliciesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListShareExportPoliciesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListShareExportPoliciesExecute(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) { + if a.ListShareExportPoliciesExecuteMock == nil { + var localVarReturnValue *ListShareExportPoliciesResponse + return localVarReturnValue, nil + } + + return (*a.ListShareExportPoliciesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest { + return ApiListSharesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// ListSharesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListSharesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListSharesExecute(r ApiListSharesRequest) (*ListSharesResponse, error) { + if a.ListSharesExecuteMock == nil { + var localVarReturnValue *ListSharesResponse + return localVarReturnValue, nil + } + + return (*a.ListSharesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest { + return ApiUpdateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// UpdateResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateResourcePoolExecute(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) { + if a.UpdateResourcePoolExecuteMock == nil { + var localVarReturnValue *UpdateResourcePoolResponse + return localVarReturnValue, nil + } + + return (*a.UpdateResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest { + return ApiUpdateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// UpdateShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateShareExecute(r ApiUpdateShareRequest) (*UpdateShareResponse, error) { + if a.UpdateShareExecuteMock == nil { + var localVarReturnValue *UpdateShareResponse + return localVarReturnValue, nil + } + + return (*a.UpdateShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest { + return ApiUpdateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// UpdateShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateShareExportPolicyExecute(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) { + if a.UpdateShareExportPolicyExecuteMock == nil { + var localVarReturnValue *UpdateShareExportPolicyResponse + return localVarReturnValue, nil + } + + return (*a.UpdateShareExportPolicyExecuteMock)(r) +} diff --git a/services/sfs/v1api/client.go b/services/sfs/v1api/client.go new file mode 100644 index 000000000..4f7ec384b --- /dev/null +++ b/services/sfs/v1api/client.go @@ -0,0 +1,658 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "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)/(?:[^;]+\+)?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 v1.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. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +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 + + // API Services + 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 { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + 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{}, style string, 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, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, 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) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, 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(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, 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 postBody != nil { + 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, errors.New("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, errors.New("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 errors.New("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 errors.New("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 +} + +// 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) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", 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) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/sfs/v1api/configuration.go b/services/sfs/v1api/configuration.go new file mode 100644 index 000000000..3fa219fd8 --- /dev/null +++ b/services/sfs/v1api/configuration.go @@ -0,0 +1,37 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v1api + +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/sfs", + 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 +} diff --git a/services/sfs/v1api/model_create_resource_pool_payload.go b/services/sfs/v1api/model_create_resource_pool_payload.go new file mode 100644 index 000000000..b7ea35ea9 --- /dev/null +++ b/services/sfs/v1api/model_create_resource_pool_payload.go @@ -0,0 +1,347 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateResourcePoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolPayload{} + +// CreateResourcePoolPayload struct for CreateResourcePoolPayload +type CreateResourcePoolPayload struct { + // Availability zone + AvailabilityZone string `json:"availabilityZone"` + // 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 []string `json:"ipAcl"` + // 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 *map[string]string `json:"labels,omitempty"` + // Name of the Resource Pool + Name string `json:"name"` + // Name of the performance class + PerformanceClass string `json:"performanceClass"` + // Size of the Resource Pool (unit: gibibytes) + SizeGigabytes int32 `json:"sizeGigabytes"` + // 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 *bool `json:"snapshotsAreVisible,omitempty"` +} + +type _CreateResourcePoolPayload CreateResourcePoolPayload + +// 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(availabilityZone string, ipAcl []string, name string, performanceClass string, sizeGigabytes int32) *CreateResourcePoolPayload { + this := CreateResourcePoolPayload{} + this.AvailabilityZone = availabilityZone + this.IpAcl = ipAcl + this.Name = name + this.PerformanceClass = performanceClass + this.SizeGigabytes = sizeGigabytes + 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 +func (o *CreateResourcePoolPayload) GetAvailabilityZone() string { + if o == nil { + var ret string + return ret + } + + return o.AvailabilityZone +} + +// GetAvailabilityZoneOk returns a tuple with the AvailabilityZone field value +// and a boolean to check if the value has been set. +func (o *CreateResourcePoolPayload) GetAvailabilityZoneOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AvailabilityZone, true +} + +// SetAvailabilityZone sets field value +func (o *CreateResourcePoolPayload) SetAvailabilityZone(v string) { + o.AvailabilityZone = v +} + +// GetIpAcl returns the IpAcl field value +func (o *CreateResourcePoolPayload) GetIpAcl() []string { + if o == nil { + var ret []string + return ret + } + + return o.IpAcl +} + +// GetIpAclOk returns a tuple with the IpAcl field value +// and a boolean to check if the value has been set. +func (o *CreateResourcePoolPayload) GetIpAclOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.IpAcl, true +} + +// SetIpAcl sets field value +func (o *CreateResourcePoolPayload) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateResourcePoolPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *CreateResourcePoolPayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateResourcePoolPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateResourcePoolPayload) SetName(v string) { + o.Name = v +} + +// GetPerformanceClass returns the PerformanceClass field value +func (o *CreateResourcePoolPayload) GetPerformanceClass() string { + if o == nil { + var ret string + return ret + } + + return o.PerformanceClass +} + +// GetPerformanceClassOk returns a tuple with the PerformanceClass field value +// and a boolean to check if the value has been set. +func (o *CreateResourcePoolPayload) GetPerformanceClassOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PerformanceClass, true +} + +// SetPerformanceClass sets field value +func (o *CreateResourcePoolPayload) SetPerformanceClass(v string) { + o.PerformanceClass = v +} + +// GetSizeGigabytes returns the SizeGigabytes field value +func (o *CreateResourcePoolPayload) GetSizeGigabytes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SizeGigabytes +} + +// GetSizeGigabytesOk returns a tuple with the SizeGigabytes field value +// and a boolean to check if the value has been set. +func (o *CreateResourcePoolPayload) GetSizeGigabytesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SizeGigabytes, true +} + +// SetSizeGigabytes sets field value +func (o *CreateResourcePoolPayload) SetSizeGigabytes(v int32) { + o.SizeGigabytes = v +} + +// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetSnapshotsAreVisible() bool { + if o == nil || IsNil(o.SnapshotsAreVisible) { + var ret bool + return ret + } + return *o.SnapshotsAreVisible +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SnapshotsAreVisible) { + return nil, false + } + return o.SnapshotsAreVisible, true +} + +// HasSnapshotsAreVisible returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasSnapshotsAreVisible() bool { + if o != nil && !IsNil(o.SnapshotsAreVisible) { + return true + } + + return false +} + +// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field. +func (o *CreateResourcePoolPayload) SetSnapshotsAreVisible(v bool) { + o.SnapshotsAreVisible = &v +} + +func (o CreateResourcePoolPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["availabilityZone"] = o.AvailabilityZone + toSerialize["ipAcl"] = o.IpAcl + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["performanceClass"] = o.PerformanceClass + toSerialize["sizeGigabytes"] = o.SizeGigabytes + if !IsNil(o.SnapshotsAreVisible) { + toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible + } + return toSerialize, nil +} + +func (o *CreateResourcePoolPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "availabilityZone", + "ipAcl", + "name", + "performanceClass", + "sizeGigabytes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateResourcePoolPayload := _CreateResourcePoolPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateResourcePoolPayload) + + if err != nil { + return err + } + + *o = CreateResourcePoolPayload(varCreateResourcePoolPayload) + + return err +} + +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) +} diff --git a/services/sfs/v1api/model_create_resource_pool_response.go b/services/sfs/v1api/model_create_resource_pool_response.go new file mode 100644 index 000000000..2827d9cae --- /dev/null +++ b/services/sfs/v1api/model_create_resource_pool_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolResponse{} + +// CreateResourcePoolResponse struct for CreateResourcePoolResponse +type CreateResourcePoolResponse struct { + // Created Resource Pool + ResourcePool *ResourcePool `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() ResourcePool { + if o == nil || IsNil(o.ResourcePool) { + var ret ResourcePool + return ret + } + return *o.ResourcePool +} + +// 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() (*ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePool) { + return nil, false + } + return o.ResourcePool, true +} + +// HasResourcePool returns a boolean if a field has been set. +func (o *CreateResourcePoolResponse) HasResourcePool() bool { + if o != nil && !IsNil(o.ResourcePool) { + return true + } + + return false +} + +// SetResourcePool gets a reference to the given ResourcePool and assigns it to the ResourcePool field. +func (o *CreateResourcePoolResponse) SetResourcePool(v ResourcePool) { + o.ResourcePool = &v +} + +func (o CreateResourcePoolResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePool) { + toSerialize["resourcePool"] = o.ResourcePool + } + 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) +} diff --git a/services/sfs/v1api/model_create_resource_pool_snapshot_payload.go b/services/sfs/v1api/model_create_resource_pool_snapshot_payload.go new file mode 100644 index 000000000..fc7de1eee --- /dev/null +++ b/services/sfs/v1api/model_create_resource_pool_snapshot_payload.go @@ -0,0 +1,173 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolSnapshotPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolSnapshotPayload{} + +// CreateResourcePoolSnapshotPayload struct for CreateResourcePoolSnapshotPayload +type CreateResourcePoolSnapshotPayload struct { + // (optional) A comment to add more information about a snapshot + Comment NullableString `json:"comment,omitempty"` + // Name of the Resource Pool Snapshot + Name *string `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() string { + if o == nil || IsNil(o.Comment.Get()) { + var ret string + return ret + } + return *o.Comment.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Comment.Get(), o.Comment.IsSet() +} + +// HasComment returns a boolean if a field has been set. +func (o *CreateResourcePoolSnapshotPayload) HasComment() bool { + if o != nil && o.Comment.IsSet() { + return true + } + + return false +} + +// SetComment gets a reference to the given NullableString and assigns it to the Comment field. +func (o *CreateResourcePoolSnapshotPayload) SetComment(v string) { + o.Comment.Set(&v) +} + +// SetCommentNil sets the value for Comment to be an explicit nil +func (o *CreateResourcePoolSnapshotPayload) SetCommentNil() { + o.Comment.Set(nil) +} + +// UnsetComment ensures that no value is present for Comment, not even an explicit nil +func (o *CreateResourcePoolSnapshotPayload) UnsetComment() { + o.Comment.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateResourcePoolSnapshotPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateResourcePoolSnapshotPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateResourcePoolSnapshotPayload) SetName(v string) { + o.Name = &v +} + +func (o CreateResourcePoolSnapshotPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolSnapshotPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Comment.IsSet() { + toSerialize["comment"] = o.Comment.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + 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) +} diff --git a/services/sfs/v1api/model_create_resource_pool_snapshot_response.go b/services/sfs/v1api/model_create_resource_pool_snapshot_response.go new file mode 100644 index 000000000..818956b98 --- /dev/null +++ b/services/sfs/v1api/model_create_resource_pool_snapshot_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolSnapshotResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolSnapshotResponse{} + +// CreateResourcePoolSnapshotResponse struct for CreateResourcePoolSnapshotResponse +type CreateResourcePoolSnapshotResponse struct { + // Created Resource Pool Snapshot + ResourcePoolSnapshot *ResourcePoolSnapshot `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() ResourcePoolSnapshot { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + var ret ResourcePoolSnapshot + return ret + } + return *o.ResourcePoolSnapshot +} + +// 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() (*ResourcePoolSnapshot, bool) { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + return nil, false + } + return o.ResourcePoolSnapshot, true +} + +// HasResourcePoolSnapshot returns a boolean if a field has been set. +func (o *CreateResourcePoolSnapshotResponse) HasResourcePoolSnapshot() bool { + if o != nil && !IsNil(o.ResourcePoolSnapshot) { + return true + } + + return false +} + +// SetResourcePoolSnapshot gets a reference to the given ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshot field. +func (o *CreateResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v ResourcePoolSnapshot) { + o.ResourcePoolSnapshot = &v +} + +func (o CreateResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePoolSnapshot) { + toSerialize["resourcePoolSnapshot"] = o.ResourcePoolSnapshot + } + 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) +} diff --git a/services/sfs/v1api/model_create_share_export_policy_payload.go b/services/sfs/v1api/model_create_share_export_policy_payload.go new file mode 100644 index 000000000..cd9854944 --- /dev/null +++ b/services/sfs/v1api/model_create_share_export_policy_payload.go @@ -0,0 +1,231 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateShareExportPolicyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareExportPolicyPayload{} + +// 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 *map[string]string `json:"labels,omitempty"` + // Name of the Share Export Policy + Name string `json:"name"` + // 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 []CreateShareExportPolicyRequestRule `json:"rules,omitempty"` +} + +type _CreateShareExportPolicyPayload CreateShareExportPolicyPayload + +// 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(name string) *CreateShareExportPolicyPayload { + this := CreateShareExportPolicyPayload{} + this.Name = name + 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() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateShareExportPolicyPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateShareExportPolicyPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *CreateShareExportPolicyPayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateShareExportPolicyPayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateShareExportPolicyPayload) SetName(v string) { + o.Name = v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *CreateShareExportPolicyPayload) GetRules() []CreateShareExportPolicyRequestRule { + if o == nil || IsNil(o.Rules) { + var ret []CreateShareExportPolicyRequestRule + return ret + } + return o.Rules +} + +// 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() ([]CreateShareExportPolicyRequestRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *CreateShareExportPolicyPayload) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []CreateShareExportPolicyRequestRule and assigns it to the Rules field. +func (o *CreateShareExportPolicyPayload) SetRules(v []CreateShareExportPolicyRequestRule) { + o.Rules = v +} + +func (o CreateShareExportPolicyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + return toSerialize, nil +} + +func (o *CreateShareExportPolicyPayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateShareExportPolicyPayload := _CreateShareExportPolicyPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateShareExportPolicyPayload) + + if err != nil { + return err + } + + *o = CreateShareExportPolicyPayload(varCreateShareExportPolicyPayload) + + return err +} + +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) +} diff --git a/services/sfs/v1api/model_create_share_export_policy_request_rule.go b/services/sfs/v1api/model_create_share_export_policy_request_rule.go new file mode 100644 index 000000000..a4dc290ea --- /dev/null +++ b/services/sfs/v1api/model_create_share_export_policy_request_rule.go @@ -0,0 +1,333 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateShareExportPolicyRequestRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareExportPolicyRequestRule{} + +// CreateShareExportPolicyRequestRule struct for CreateShareExportPolicyRequestRule +type CreateShareExportPolicyRequestRule struct { + // Description of the Rule (optional) + Description NullableString `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 []string `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 + Order *int32 `json:"order,omitempty"` + // Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false + ReadOnly *bool `json:"readOnly,omitempty"` + // Flag to honor set UUID Default: false + SetUuid *bool `json:"setUuid,omitempty"` + // Flag to indicate if client IPs matching this rule have root access on the Share Default: true + SuperUser *bool `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{} + var readOnly bool = false + this.ReadOnly = &readOnly + var setUuid bool = false + this.SetUuid = &setUuid + var superUser bool = true + this.SuperUser = &superUser + 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() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CreateShareExportPolicyRequestRule) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CreateShareExportPolicyRequestRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CreateShareExportPolicyRequestRule) UnsetDescription() { + o.Description.Unset() +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *CreateShareExportPolicyRequestRule) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *CreateShareExportPolicyRequestRule) SetOrder(v int32) { + o.Order = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *CreateShareExportPolicyRequestRule) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetSetUuid returns the SetUuid field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetSetUuid() bool { + if o == nil || IsNil(o.SetUuid) { + var ret bool + return ret + } + return *o.SetUuid +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SetUuid) { + return nil, false + } + return o.SetUuid, true +} + +// HasSetUuid returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasSetUuid() bool { + if o != nil && !IsNil(o.SetUuid) { + return true + } + + return false +} + +// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field. +func (o *CreateShareExportPolicyRequestRule) SetSetUuid(v bool) { + o.SetUuid = &v +} + +// GetSuperUser returns the SuperUser field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetSuperUser() bool { + if o == nil || IsNil(o.SuperUser) { + var ret bool + return ret + } + return *o.SuperUser +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SuperUser) { + return nil, false + } + return o.SuperUser, true +} + +// HasSuperUser returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasSuperUser() bool { + if o != nil && !IsNil(o.SuperUser) { + return true + } + + return false +} + +// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field. +func (o *CreateShareExportPolicyRequestRule) SetSuperUser(v bool) { + o.SuperUser = &v +} + +func (o CreateShareExportPolicyRequestRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareExportPolicyRequestRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.SetUuid) { + toSerialize["setUuid"] = o.SetUuid + } + if !IsNil(o.SuperUser) { + toSerialize["superUser"] = o.SuperUser + } + 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) +} diff --git a/services/sfs/v1api/model_create_share_export_policy_response.go b/services/sfs/v1api/model_create_share_export_policy_response.go new file mode 100644 index 000000000..49cd32da3 --- /dev/null +++ b/services/sfs/v1api/model_create_share_export_policy_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateShareExportPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareExportPolicyResponse{} + +// CreateShareExportPolicyResponse struct for CreateShareExportPolicyResponse +type CreateShareExportPolicyResponse struct { + // Created Share Export Policy + ShareExportPolicy *ShareExportPolicy `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() ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicy) { + var ret ShareExportPolicy + return ret + } + return *o.ShareExportPolicy +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicy) { + return nil, false + } + return o.ShareExportPolicy, true +} + +// HasShareExportPolicy returns a boolean if a field has been set. +func (o *CreateShareExportPolicyResponse) HasShareExportPolicy() bool { + if o != nil && !IsNil(o.ShareExportPolicy) { + return true + } + + return false +} + +// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field. +func (o *CreateShareExportPolicyResponse) SetShareExportPolicy(v ShareExportPolicy) { + o.ShareExportPolicy = &v +} + +func (o CreateShareExportPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicy) { + toSerialize["shareExportPolicy"] = o.ShareExportPolicy + } + 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) +} diff --git a/services/sfs/v1api/model_create_share_payload.go b/services/sfs/v1api/model_create_share_payload.go new file mode 100644 index 000000000..1d2b48885 --- /dev/null +++ b/services/sfs/v1api/model_create_share_payload.go @@ -0,0 +1,271 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateSharePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSharePayload{} + +// 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 NullableString `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 *map[string]string `json:"labels,omitempty"` + // Name of the Share + Name string `json:"name"` + // 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) + SpaceHardLimitGigabytes int32 `json:"spaceHardLimitGigabytes"` +} + +type _CreateSharePayload CreateSharePayload + +// 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(name string, spaceHardLimitGigabytes int32) *CreateSharePayload { + this := CreateSharePayload{} + this.Name = name + this.SpaceHardLimitGigabytes = spaceHardLimitGigabytes + 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() string { + if o == nil || IsNil(o.ExportPolicyName.Get()) { + var ret string + return ret + } + return *o.ExportPolicyName.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExportPolicyName.Get(), o.ExportPolicyName.IsSet() +} + +// HasExportPolicyName returns a boolean if a field has been set. +func (o *CreateSharePayload) HasExportPolicyName() bool { + if o != nil && o.ExportPolicyName.IsSet() { + return true + } + + return false +} + +// SetExportPolicyName gets a reference to the given NullableString and assigns it to the ExportPolicyName field. +func (o *CreateSharePayload) SetExportPolicyName(v string) { + o.ExportPolicyName.Set(&v) +} + +// SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil +func (o *CreateSharePayload) SetExportPolicyNameNil() { + o.ExportPolicyName.Set(nil) +} + +// UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil +func (o *CreateSharePayload) UnsetExportPolicyName() { + o.ExportPolicyName.Unset() +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateSharePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateSharePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateSharePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *CreateSharePayload) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateSharePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateSharePayload) SetName(v string) { + o.Name = v +} + +// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value +func (o *CreateSharePayload) GetSpaceHardLimitGigabytes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SpaceHardLimitGigabytes +} + +// GetSpaceHardLimitGigabytesOk returns a tuple with the SpaceHardLimitGigabytes field value +// and a boolean to check if the value has been set. +func (o *CreateSharePayload) GetSpaceHardLimitGigabytesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SpaceHardLimitGigabytes, true +} + +// SetSpaceHardLimitGigabytes sets field value +func (o *CreateSharePayload) SetSpaceHardLimitGigabytes(v int32) { + o.SpaceHardLimitGigabytes = v +} + +func (o CreateSharePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateSharePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ExportPolicyName.IsSet() { + toSerialize["exportPolicyName"] = o.ExportPolicyName.Get() + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["spaceHardLimitGigabytes"] = o.SpaceHardLimitGigabytes + return toSerialize, nil +} + +func (o *CreateSharePayload) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "spaceHardLimitGigabytes", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateSharePayload := _CreateSharePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateSharePayload) + + if err != nil { + return err + } + + *o = CreateSharePayload(varCreateSharePayload) + + return err +} + +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) +} diff --git a/services/sfs/v1api/model_create_share_response.go b/services/sfs/v1api/model_create_share_response.go new file mode 100644 index 000000000..d77f6c79e --- /dev/null +++ b/services/sfs/v1api/model_create_share_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateShareResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareResponse{} + +// CreateShareResponse struct for CreateShareResponse +type CreateShareResponse struct { + // Created Share + Share *Share `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() Share { + if o == nil || IsNil(o.Share) { + var ret Share + return ret + } + return *o.Share +} + +// 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() (*Share, bool) { + if o == nil || IsNil(o.Share) { + return nil, false + } + return o.Share, true +} + +// HasShare returns a boolean if a field has been set. +func (o *CreateShareResponse) HasShare() bool { + if o != nil && !IsNil(o.Share) { + return true + } + + return false +} + +// SetShare gets a reference to the given Share and assigns it to the Share field. +func (o *CreateShareResponse) SetShare(v Share) { + o.Share = &v +} + +func (o CreateShareResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Share) { + toSerialize["share"] = o.Share + } + 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) +} diff --git a/services/sfs/v1api/model_error.go b/services/sfs/v1api/model_error.go new file mode 100644 index 000000000..87dbcea09 --- /dev/null +++ b/services/sfs/v1api/model_error.go @@ -0,0 +1,228 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + // Human-readable string of the error that occured + // Deprecated + ErrorDescription interface{} `json:"error_description,omitempty"` + // Human-readable description of the error that occurred. + Title string `json:"title"` + // URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/ e.g. storage.stackit.cloud/validation-error + Type string `json:"type"` +} + +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 string, types string) *Error { + this := Error{} + this.Title = title + 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() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.ErrorDescription +} + +// 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() (*interface{}, bool) { + if o == nil || IsNil(o.ErrorDescription) { + return nil, false + } + return &o.ErrorDescription, true +} + +// HasErrorDescription returns a boolean if a field has been set. +func (o *Error) HasErrorDescription() bool { + if o != nil && !IsNil(o.ErrorDescription) { + return true + } + + return false +} + +// SetErrorDescription gets a reference to the given interface{} and assigns it to the ErrorDescription field. +// Deprecated +func (o *Error) SetErrorDescription(v interface{}) { + o.ErrorDescription = v +} + +// GetTitle returns the Title field value +func (o *Error) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *Error) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *Error) SetTitle(v string) { + o.Title = v +} + +// GetType returns the Type field value +func (o *Error) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Error) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Error) SetType(v string) { + o.Type = v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ErrorDescription != nil { + toSerialize["error_description"] = o.ErrorDescription + } + toSerialize["title"] = o.Title + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Error) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "title", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varError := _Error{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varError) + + if err != nil { + return err + } + + *o = Error(varError) + + return err +} + +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) +} diff --git a/services/sfs/v1api/model_get_resource_pool_response.go b/services/sfs/v1api/model_get_resource_pool_response.go new file mode 100644 index 000000000..eeb155b06 --- /dev/null +++ b/services/sfs/v1api/model_get_resource_pool_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetResourcePoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetResourcePoolResponse{} + +// GetResourcePoolResponse struct for GetResourcePoolResponse +type GetResourcePoolResponse struct { + // Resource Pool + ResourcePool *ResourcePool `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() ResourcePool { + if o == nil || IsNil(o.ResourcePool) { + var ret ResourcePool + return ret + } + return *o.ResourcePool +} + +// 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() (*ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePool) { + return nil, false + } + return o.ResourcePool, true +} + +// HasResourcePool returns a boolean if a field has been set. +func (o *GetResourcePoolResponse) HasResourcePool() bool { + if o != nil && !IsNil(o.ResourcePool) { + return true + } + + return false +} + +// SetResourcePool gets a reference to the given ResourcePool and assigns it to the ResourcePool field. +func (o *GetResourcePoolResponse) SetResourcePool(v ResourcePool) { + o.ResourcePool = &v +} + +func (o GetResourcePoolResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetResourcePoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePool) { + toSerialize["resourcePool"] = o.ResourcePool + } + 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) +} diff --git a/services/sfs/v1api/model_get_resource_pool_snapshot_response.go b/services/sfs/v1api/model_get_resource_pool_snapshot_response.go new file mode 100644 index 000000000..11727b144 --- /dev/null +++ b/services/sfs/v1api/model_get_resource_pool_snapshot_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetResourcePoolSnapshotResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetResourcePoolSnapshotResponse{} + +// GetResourcePoolSnapshotResponse struct for GetResourcePoolSnapshotResponse +type GetResourcePoolSnapshotResponse struct { + // Resource Pool Snapshot + ResourcePoolSnapshot *ResourcePoolSnapshot `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() ResourcePoolSnapshot { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + var ret ResourcePoolSnapshot + return ret + } + return *o.ResourcePoolSnapshot +} + +// 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() (*ResourcePoolSnapshot, bool) { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + return nil, false + } + return o.ResourcePoolSnapshot, true +} + +// HasResourcePoolSnapshot returns a boolean if a field has been set. +func (o *GetResourcePoolSnapshotResponse) HasResourcePoolSnapshot() bool { + if o != nil && !IsNil(o.ResourcePoolSnapshot) { + return true + } + + return false +} + +// SetResourcePoolSnapshot gets a reference to the given ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshot field. +func (o *GetResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v ResourcePoolSnapshot) { + o.ResourcePoolSnapshot = &v +} + +func (o GetResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePoolSnapshot) { + toSerialize["resourcePoolSnapshot"] = o.ResourcePoolSnapshot + } + 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) +} diff --git a/services/sfs/v1api/model_get_share_export_policy_response.go b/services/sfs/v1api/model_get_share_export_policy_response.go new file mode 100644 index 000000000..d3f4c4679 --- /dev/null +++ b/services/sfs/v1api/model_get_share_export_policy_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetShareExportPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetShareExportPolicyResponse{} + +// GetShareExportPolicyResponse struct for GetShareExportPolicyResponse +type GetShareExportPolicyResponse struct { + // Share Export Policies + ShareExportPolicy *ShareExportPolicy `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() ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicy) { + var ret ShareExportPolicy + return ret + } + return *o.ShareExportPolicy +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicy) { + return nil, false + } + return o.ShareExportPolicy, true +} + +// HasShareExportPolicy returns a boolean if a field has been set. +func (o *GetShareExportPolicyResponse) HasShareExportPolicy() bool { + if o != nil && !IsNil(o.ShareExportPolicy) { + return true + } + + return false +} + +// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field. +func (o *GetShareExportPolicyResponse) SetShareExportPolicy(v ShareExportPolicy) { + o.ShareExportPolicy = &v +} + +func (o GetShareExportPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicy) { + toSerialize["shareExportPolicy"] = o.ShareExportPolicy + } + 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) +} diff --git a/services/sfs/v1api/model_get_share_response.go b/services/sfs/v1api/model_get_share_response.go new file mode 100644 index 000000000..d6a85093b --- /dev/null +++ b/services/sfs/v1api/model_get_share_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetShareResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetShareResponse{} + +// GetShareResponse struct for GetShareResponse +type GetShareResponse struct { + // Share + Share *Share `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() Share { + if o == nil || IsNil(o.Share) { + var ret Share + return ret + } + return *o.Share +} + +// 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() (*Share, bool) { + if o == nil || IsNil(o.Share) { + return nil, false + } + return o.Share, true +} + +// HasShare returns a boolean if a field has been set. +func (o *GetShareResponse) HasShare() bool { + if o != nil && !IsNil(o.Share) { + return true + } + + return false +} + +// SetShare gets a reference to the given Share and assigns it to the Share field. +func (o *GetShareResponse) SetShare(v Share) { + o.Share = &v +} + +func (o GetShareResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetShareResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Share) { + toSerialize["share"] = o.Share + } + 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) +} diff --git a/services/sfs/v1api/model_google_protobuf_any.go b/services/sfs/v1api/model_google_protobuf_any.go new file mode 100644 index 000000000..8b419457f --- /dev/null +++ b/services/sfs/v1api/model_google_protobuf_any.go @@ -0,0 +1,154 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GoogleProtobufAny{} + +// 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 *string `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() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GoogleProtobufAny) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GoogleProtobufAny) SetType(v string) { + o.Type = &v +} + +func (o GoogleProtobufAny) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["@type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GoogleProtobufAny) UnmarshalJSON(data []byte) (err error) { + varGoogleProtobufAny := _GoogleProtobufAny{} + + err = json.Unmarshal(data, &varGoogleProtobufAny) + + if err != nil { + return err + } + + *o = GoogleProtobufAny(varGoogleProtobufAny) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "@type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +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) +} diff --git a/services/sfs/v1api/model_list_performance_classes_response.go b/services/sfs/v1api/model_list_performance_classes_response.go new file mode 100644 index 000000000..9e2b0b960 --- /dev/null +++ b/services/sfs/v1api/model_list_performance_classes_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListPerformanceClassesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPerformanceClassesResponse{} + +// ListPerformanceClassesResponse struct for ListPerformanceClassesResponse +type ListPerformanceClassesResponse struct { + // List of Performance Classes + PerformanceClasses []PerformanceClass `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() []PerformanceClass { + if o == nil || IsNil(o.PerformanceClasses) { + var ret []PerformanceClass + return ret + } + return o.PerformanceClasses +} + +// 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() ([]PerformanceClass, bool) { + if o == nil || IsNil(o.PerformanceClasses) { + return nil, false + } + return o.PerformanceClasses, true +} + +// HasPerformanceClasses returns a boolean if a field has been set. +func (o *ListPerformanceClassesResponse) HasPerformanceClasses() bool { + if o != nil && !IsNil(o.PerformanceClasses) { + return true + } + + return false +} + +// SetPerformanceClasses gets a reference to the given []PerformanceClass and assigns it to the PerformanceClasses field. +func (o *ListPerformanceClassesResponse) SetPerformanceClasses(v []PerformanceClass) { + o.PerformanceClasses = v +} + +func (o ListPerformanceClassesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPerformanceClassesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PerformanceClasses) { + toSerialize["performanceClasses"] = o.PerformanceClasses + } + 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) +} diff --git a/services/sfs/v1api/model_list_resource_pool_snapshots_response.go b/services/sfs/v1api/model_list_resource_pool_snapshots_response.go new file mode 100644 index 000000000..03b81db01 --- /dev/null +++ b/services/sfs/v1api/model_list_resource_pool_snapshots_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListResourcePoolSnapshotsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListResourcePoolSnapshotsResponse{} + +// ListResourcePoolSnapshotsResponse struct for ListResourcePoolSnapshotsResponse +type ListResourcePoolSnapshotsResponse struct { + // List of Resource Pool Snapshots + ResourcePoolSnapshots []ResourcePoolSnapshot `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() []ResourcePoolSnapshot { + if o == nil || IsNil(o.ResourcePoolSnapshots) { + var ret []ResourcePoolSnapshot + return ret + } + return o.ResourcePoolSnapshots +} + +// 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() ([]ResourcePoolSnapshot, bool) { + if o == nil || IsNil(o.ResourcePoolSnapshots) { + return nil, false + } + return o.ResourcePoolSnapshots, true +} + +// HasResourcePoolSnapshots returns a boolean if a field has been set. +func (o *ListResourcePoolSnapshotsResponse) HasResourcePoolSnapshots() bool { + if o != nil && !IsNil(o.ResourcePoolSnapshots) { + return true + } + + return false +} + +// SetResourcePoolSnapshots gets a reference to the given []ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshots field. +func (o *ListResourcePoolSnapshotsResponse) SetResourcePoolSnapshots(v []ResourcePoolSnapshot) { + o.ResourcePoolSnapshots = v +} + +func (o ListResourcePoolSnapshotsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListResourcePoolSnapshotsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePoolSnapshots) { + toSerialize["resourcePoolSnapshots"] = o.ResourcePoolSnapshots + } + 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) +} diff --git a/services/sfs/v1api/model_list_resource_pools_response.go b/services/sfs/v1api/model_list_resource_pools_response.go new file mode 100644 index 000000000..125b25dfc --- /dev/null +++ b/services/sfs/v1api/model_list_resource_pools_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListResourcePoolsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListResourcePoolsResponse{} + +// ListResourcePoolsResponse struct for ListResourcePoolsResponse +type ListResourcePoolsResponse struct { + // List of Resource Pools + ResourcePools []ResourcePool `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() []ResourcePool { + if o == nil || IsNil(o.ResourcePools) { + var ret []ResourcePool + return ret + } + return o.ResourcePools +} + +// 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() ([]ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePools) { + return nil, false + } + return o.ResourcePools, true +} + +// HasResourcePools returns a boolean if a field has been set. +func (o *ListResourcePoolsResponse) HasResourcePools() bool { + if o != nil && !IsNil(o.ResourcePools) { + return true + } + + return false +} + +// SetResourcePools gets a reference to the given []ResourcePool and assigns it to the ResourcePools field. +func (o *ListResourcePoolsResponse) SetResourcePools(v []ResourcePool) { + o.ResourcePools = v +} + +func (o ListResourcePoolsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListResourcePoolsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePools) { + toSerialize["resourcePools"] = o.ResourcePools + } + 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) +} diff --git a/services/sfs/v1api/model_list_share_export_policies_response.go b/services/sfs/v1api/model_list_share_export_policies_response.go new file mode 100644 index 000000000..af7c116ba --- /dev/null +++ b/services/sfs/v1api/model_list_share_export_policies_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListShareExportPoliciesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListShareExportPoliciesResponse{} + +// ListShareExportPoliciesResponse struct for ListShareExportPoliciesResponse +type ListShareExportPoliciesResponse struct { + // List of Share Export Policies + ShareExportPolicies []ShareExportPolicy `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() []ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicies) { + var ret []ShareExportPolicy + return ret + } + return o.ShareExportPolicies +} + +// 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() ([]ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicies) { + return nil, false + } + return o.ShareExportPolicies, true +} + +// HasShareExportPolicies returns a boolean if a field has been set. +func (o *ListShareExportPoliciesResponse) HasShareExportPolicies() bool { + if o != nil && !IsNil(o.ShareExportPolicies) { + return true + } + + return false +} + +// SetShareExportPolicies gets a reference to the given []ShareExportPolicy and assigns it to the ShareExportPolicies field. +func (o *ListShareExportPoliciesResponse) SetShareExportPolicies(v []ShareExportPolicy) { + o.ShareExportPolicies = v +} + +func (o ListShareExportPoliciesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListShareExportPoliciesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicies) { + toSerialize["shareExportPolicies"] = o.ShareExportPolicies + } + 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) +} diff --git a/services/sfs/v1api/model_list_shares_response.go b/services/sfs/v1api/model_list_shares_response.go new file mode 100644 index 000000000..4806457fb --- /dev/null +++ b/services/sfs/v1api/model_list_shares_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListSharesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListSharesResponse{} + +// ListSharesResponse struct for ListSharesResponse +type ListSharesResponse struct { + // List of Shares + Shares []Share `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() []Share { + if o == nil || IsNil(o.Shares) { + var ret []Share + return ret + } + return o.Shares +} + +// 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() ([]Share, bool) { + if o == nil || IsNil(o.Shares) { + return nil, false + } + return o.Shares, true +} + +// HasShares returns a boolean if a field has been set. +func (o *ListSharesResponse) HasShares() bool { + if o != nil && !IsNil(o.Shares) { + return true + } + + return false +} + +// SetShares gets a reference to the given []Share and assigns it to the Shares field. +func (o *ListSharesResponse) SetShares(v []Share) { + o.Shares = v +} + +func (o ListSharesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListSharesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Shares) { + toSerialize["shares"] = o.Shares + } + 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) +} diff --git a/services/sfs/v1api/model_performance_class.go b/services/sfs/v1api/model_performance_class.go new file mode 100644 index 000000000..54ec59abd --- /dev/null +++ b/services/sfs/v1api/model_performance_class.go @@ -0,0 +1,199 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the PerformanceClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PerformanceClass{} + +// PerformanceClass struct for PerformanceClass +type PerformanceClass struct { + // IOPS of the Performance Class + Iops *int32 `json:"iops,omitempty"` + // Name of the Performance Class + Name *string `json:"name,omitempty"` + // Throughput of the Performance Class + Throughput *int32 `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() int32 { + if o == nil || IsNil(o.Iops) { + var ret int32 + return ret + } + return *o.Iops +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Iops) { + return nil, false + } + return o.Iops, true +} + +// HasIops returns a boolean if a field has been set. +func (o *PerformanceClass) HasIops() bool { + if o != nil && !IsNil(o.Iops) { + return true + } + + return false +} + +// SetIops gets a reference to the given int32 and assigns it to the Iops field. +func (o *PerformanceClass) SetIops(v int32) { + o.Iops = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PerformanceClass) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PerformanceClass) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PerformanceClass) SetName(v string) { + o.Name = &v +} + +// GetThroughput returns the Throughput field value if set, zero value otherwise. +func (o *PerformanceClass) GetThroughput() int32 { + if o == nil || IsNil(o.Throughput) { + var ret int32 + return ret + } + return *o.Throughput +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Throughput) { + return nil, false + } + return o.Throughput, true +} + +// HasThroughput returns a boolean if a field has been set. +func (o *PerformanceClass) HasThroughput() bool { + if o != nil && !IsNil(o.Throughput) { + return true + } + + return false +} + +// SetThroughput gets a reference to the given int32 and assigns it to the Throughput field. +func (o *PerformanceClass) SetThroughput(v int32) { + o.Throughput = &v +} + +func (o PerformanceClass) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PerformanceClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Iops) { + toSerialize["iops"] = o.Iops + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Throughput) { + toSerialize["throughput"] = o.Throughput + } + 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) +} diff --git a/services/sfs/v1api/model_resource_pool.go b/services/sfs/v1api/model_resource_pool.go new file mode 100644 index 000000000..ee71a49ac --- /dev/null +++ b/services/sfs/v1api/model_resource_pool.go @@ -0,0 +1,609 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the ResourcePool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePool{} + +// ResourcePool struct for ResourcePool +type ResourcePool struct { + // Name of the respective availability zone + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // Number of Shares in the Resource Pool + CountShares *int32 `json:"countShares,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // ID of the Resource Pool + Id *string `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 []string `json:"ipAcl,omitempty"` + Labels *map[string]string `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 *string `json:"mountPath,omitempty"` + // Name of the Resource Pool + Name *string `json:"name,omitempty"` + // Information about the performance class + PerformanceClass *ResourcePoolPerformanceClass `json:"performanceClass,omitempty"` + // Time when the performance class can be downgraded again. + PerformanceClassDowngradableAt *time.Time `json:"performanceClassDowngradableAt,omitempty"` + // Time when the size can be reduced again. + SizeReducibleAt *time.Time `json:"sizeReducibleAt,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 *bool `json:"snapshotsAreVisible,omitempty"` + // Space information + Space *ResourcePoolSpace `json:"space,omitempty"` + // State of the Resource Pool (possible values: [\"pending\", \"creating\", \"created\", \"updating\", \"error\", \"deleting\"]) + State *string `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{} + var snapshotsAreVisible bool = false + this.SnapshotsAreVisible = &snapshotsAreVisible + 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{} + var snapshotsAreVisible bool = false + this.SnapshotsAreVisible = &snapshotsAreVisible + return &this +} + +// GetAvailabilityZone returns the AvailabilityZone field value if set, zero value otherwise. +func (o *ResourcePool) GetAvailabilityZone() string { + if o == nil || IsNil(o.AvailabilityZone) { + var ret string + return ret + } + return *o.AvailabilityZone +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.AvailabilityZone) { + return nil, false + } + return o.AvailabilityZone, true +} + +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *ResourcePool) HasAvailabilityZone() bool { + if o != nil && !IsNil(o.AvailabilityZone) { + return true + } + + return false +} + +// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. +func (o *ResourcePool) SetAvailabilityZone(v string) { + o.AvailabilityZone = &v +} + +// GetCountShares returns the CountShares field value if set, zero value otherwise. +func (o *ResourcePool) GetCountShares() int32 { + if o == nil || IsNil(o.CountShares) { + var ret int32 + return ret + } + return *o.CountShares +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.CountShares) { + return nil, false + } + return o.CountShares, true +} + +// HasCountShares returns a boolean if a field has been set. +func (o *ResourcePool) HasCountShares() bool { + if o != nil && !IsNil(o.CountShares) { + return true + } + + return false +} + +// SetCountShares gets a reference to the given int32 and assigns it to the CountShares field. +func (o *ResourcePool) SetCountShares(v int32) { + o.CountShares = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ResourcePool) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ResourcePool) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ResourcePool) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ResourcePool) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ResourcePool) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ResourcePool) SetId(v string) { + o.Id = &v +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *ResourcePool) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *ResourcePool) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *ResourcePool) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ResourcePool) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ResourcePool) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ResourcePool) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetMountPath returns the MountPath field value if set, zero value otherwise. +func (o *ResourcePool) GetMountPath() string { + if o == nil || IsNil(o.MountPath) { + var ret string + return ret + } + return *o.MountPath +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.MountPath) { + return nil, false + } + return o.MountPath, true +} + +// HasMountPath returns a boolean if a field has been set. +func (o *ResourcePool) HasMountPath() bool { + if o != nil && !IsNil(o.MountPath) { + return true + } + + return false +} + +// SetMountPath gets a reference to the given string and assigns it to the MountPath field. +func (o *ResourcePool) SetMountPath(v string) { + o.MountPath = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ResourcePool) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ResourcePool) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ResourcePool) SetName(v string) { + o.Name = &v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *ResourcePool) GetPerformanceClass() ResourcePoolPerformanceClass { + if o == nil || IsNil(o.PerformanceClass) { + var ret ResourcePoolPerformanceClass + return ret + } + return *o.PerformanceClass +} + +// 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() (*ResourcePoolPerformanceClass, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *ResourcePool) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given ResourcePoolPerformanceClass and assigns it to the PerformanceClass field. +func (o *ResourcePool) SetPerformanceClass(v ResourcePoolPerformanceClass) { + o.PerformanceClass = &v +} + +// GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise. +func (o *ResourcePool) GetPerformanceClassDowngradableAt() time.Time { + if o == nil || IsNil(o.PerformanceClassDowngradableAt) { + var ret time.Time + return ret + } + return *o.PerformanceClassDowngradableAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.PerformanceClassDowngradableAt) { + return nil, false + } + return o.PerformanceClassDowngradableAt, true +} + +// HasPerformanceClassDowngradableAt returns a boolean if a field has been set. +func (o *ResourcePool) HasPerformanceClassDowngradableAt() bool { + if o != nil && !IsNil(o.PerformanceClassDowngradableAt) { + return true + } + + return false +} + +// SetPerformanceClassDowngradableAt gets a reference to the given time.Time and assigns it to the PerformanceClassDowngradableAt field. +func (o *ResourcePool) SetPerformanceClassDowngradableAt(v time.Time) { + o.PerformanceClassDowngradableAt = &v +} + +// GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise. +func (o *ResourcePool) GetSizeReducibleAt() time.Time { + if o == nil || IsNil(o.SizeReducibleAt) { + var ret time.Time + return ret + } + return *o.SizeReducibleAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.SizeReducibleAt) { + return nil, false + } + return o.SizeReducibleAt, true +} + +// HasSizeReducibleAt returns a boolean if a field has been set. +func (o *ResourcePool) HasSizeReducibleAt() bool { + if o != nil && !IsNil(o.SizeReducibleAt) { + return true + } + + return false +} + +// SetSizeReducibleAt gets a reference to the given time.Time and assigns it to the SizeReducibleAt field. +func (o *ResourcePool) SetSizeReducibleAt(v time.Time) { + o.SizeReducibleAt = &v +} + +// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +func (o *ResourcePool) GetSnapshotsAreVisible() bool { + if o == nil || IsNil(o.SnapshotsAreVisible) { + var ret bool + return ret + } + return *o.SnapshotsAreVisible +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SnapshotsAreVisible) { + return nil, false + } + return o.SnapshotsAreVisible, true +} + +// HasSnapshotsAreVisible returns a boolean if a field has been set. +func (o *ResourcePool) HasSnapshotsAreVisible() bool { + if o != nil && !IsNil(o.SnapshotsAreVisible) { + return true + } + + return false +} + +// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field. +func (o *ResourcePool) SetSnapshotsAreVisible(v bool) { + o.SnapshotsAreVisible = &v +} + +// GetSpace returns the Space field value if set, zero value otherwise. +func (o *ResourcePool) GetSpace() ResourcePoolSpace { + if o == nil || IsNil(o.Space) { + var ret ResourcePoolSpace + return ret + } + return *o.Space +} + +// 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() (*ResourcePoolSpace, bool) { + if o == nil || IsNil(o.Space) { + return nil, false + } + return o.Space, true +} + +// HasSpace returns a boolean if a field has been set. +func (o *ResourcePool) HasSpace() bool { + if o != nil && !IsNil(o.Space) { + return true + } + + return false +} + +// SetSpace gets a reference to the given ResourcePoolSpace and assigns it to the Space field. +func (o *ResourcePool) SetSpace(v ResourcePoolSpace) { + o.Space = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResourcePool) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResourcePool) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResourcePool) SetState(v string) { + o.State = &v +} + +func (o ResourcePool) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZone) { + toSerialize["availabilityZone"] = o.AvailabilityZone + } + if !IsNil(o.CountShares) { + toSerialize["countShares"] = o.CountShares + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.MountPath) { + toSerialize["mountPath"] = o.MountPath + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.PerformanceClassDowngradableAt) { + toSerialize["performanceClassDowngradableAt"] = o.PerformanceClassDowngradableAt + } + if !IsNil(o.SizeReducibleAt) { + toSerialize["sizeReducibleAt"] = o.SizeReducibleAt + } + if !IsNil(o.SnapshotsAreVisible) { + toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible + } + if !IsNil(o.Space) { + toSerialize["space"] = o.Space + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + 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) +} diff --git a/services/sfs/v1api/model_resource_pool_performance_class.go b/services/sfs/v1api/model_resource_pool_performance_class.go new file mode 100644 index 000000000..1f6841b29 --- /dev/null +++ b/services/sfs/v1api/model_resource_pool_performance_class.go @@ -0,0 +1,199 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ResourcePoolPerformanceClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePoolPerformanceClass{} + +// ResourcePoolPerformanceClass struct for ResourcePoolPerformanceClass +type ResourcePoolPerformanceClass struct { + // Name of the performance class + Name *string `json:"name,omitempty"` + // Max. IOPS of the Resource Pool. This is shared between every Share in the Resource Pool. + PeakIops *int32 `json:"peakIops,omitempty"` + // Throughput of the Resource Pool. + Throughput *int32 `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() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ResourcePoolPerformanceClass) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ResourcePoolPerformanceClass) SetName(v string) { + o.Name = &v +} + +// GetPeakIops returns the PeakIops field value if set, zero value otherwise. +func (o *ResourcePoolPerformanceClass) GetPeakIops() int32 { + if o == nil || IsNil(o.PeakIops) { + var ret int32 + return ret + } + return *o.PeakIops +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.PeakIops) { + return nil, false + } + return o.PeakIops, true +} + +// HasPeakIops returns a boolean if a field has been set. +func (o *ResourcePoolPerformanceClass) HasPeakIops() bool { + if o != nil && !IsNil(o.PeakIops) { + return true + } + + return false +} + +// SetPeakIops gets a reference to the given int32 and assigns it to the PeakIops field. +func (o *ResourcePoolPerformanceClass) SetPeakIops(v int32) { + o.PeakIops = &v +} + +// GetThroughput returns the Throughput field value if set, zero value otherwise. +func (o *ResourcePoolPerformanceClass) GetThroughput() int32 { + if o == nil || IsNil(o.Throughput) { + var ret int32 + return ret + } + return *o.Throughput +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Throughput) { + return nil, false + } + return o.Throughput, true +} + +// HasThroughput returns a boolean if a field has been set. +func (o *ResourcePoolPerformanceClass) HasThroughput() bool { + if o != nil && !IsNil(o.Throughput) { + return true + } + + return false +} + +// SetThroughput gets a reference to the given int32 and assigns it to the Throughput field. +func (o *ResourcePoolPerformanceClass) SetThroughput(v int32) { + o.Throughput = &v +} + +func (o ResourcePoolPerformanceClass) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePoolPerformanceClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PeakIops) { + toSerialize["peakIops"] = o.PeakIops + } + if !IsNil(o.Throughput) { + toSerialize["throughput"] = o.Throughput + } + 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) +} diff --git a/services/sfs/v1api/model_resource_pool_snapshot.go b/services/sfs/v1api/model_resource_pool_snapshot.go new file mode 100644 index 000000000..9060b83d4 --- /dev/null +++ b/services/sfs/v1api/model_resource_pool_snapshot.go @@ -0,0 +1,321 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the ResourcePoolSnapshot type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePoolSnapshot{} + +// ResourcePoolSnapshot struct for ResourcePoolSnapshot +type ResourcePoolSnapshot struct { + // (optional) A comment to add more information about a snapshot + Comment NullableString `json:"comment,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. what’s in the snapshot) + LogicalSizeGigabytes *int32 `json:"logicalSizeGigabytes,omitempty"` + // ID of the Resource Pool of the Snapshot + ResourcePoolId *string `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). + SizeGigabytes *int32 `json:"sizeGigabytes,omitempty"` + // Name of the Resource Pool Snapshot + SnapshotName *string `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() string { + if o == nil || IsNil(o.Comment.Get()) { + var ret string + return ret + } + return *o.Comment.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Comment.Get(), o.Comment.IsSet() +} + +// HasComment returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasComment() bool { + if o != nil && o.Comment.IsSet() { + return true + } + + return false +} + +// SetComment gets a reference to the given NullableString and assigns it to the Comment field. +func (o *ResourcePoolSnapshot) SetComment(v string) { + o.Comment.Set(&v) +} + +// SetCommentNil sets the value for Comment to be an explicit nil +func (o *ResourcePoolSnapshot) SetCommentNil() { + o.Comment.Set(nil) +} + +// UnsetComment ensures that no value is present for Comment, not even an explicit nil +func (o *ResourcePoolSnapshot) UnsetComment() { + o.Comment.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ResourcePoolSnapshot) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytes() int32 { + if o == nil || IsNil(o.LogicalSizeGigabytes) { + var ret int32 + return ret + } + return *o.LogicalSizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.LogicalSizeGigabytes) { + return nil, false + } + return o.LogicalSizeGigabytes, true +} + +// HasLogicalSizeGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasLogicalSizeGigabytes() bool { + if o != nil && !IsNil(o.LogicalSizeGigabytes) { + return true + } + + return false +} + +// SetLogicalSizeGigabytes gets a reference to the given int32 and assigns it to the LogicalSizeGigabytes field. +func (o *ResourcePoolSnapshot) SetLogicalSizeGigabytes(v int32) { + o.LogicalSizeGigabytes = &v +} + +// GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetResourcePoolId() string { + if o == nil || IsNil(o.ResourcePoolId) { + var ret string + return ret + } + return *o.ResourcePoolId +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.ResourcePoolId) { + return nil, false + } + return o.ResourcePoolId, true +} + +// HasResourcePoolId returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasResourcePoolId() bool { + if o != nil && !IsNil(o.ResourcePoolId) { + return true + } + + return false +} + +// SetResourcePoolId gets a reference to the given string and assigns it to the ResourcePoolId field. +func (o *ResourcePoolSnapshot) SetResourcePoolId(v string) { + o.ResourcePoolId = &v +} + +// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetSizeGigabytes() int32 { + if o == nil || IsNil(o.SizeGigabytes) { + var ret int32 + return ret + } + return *o.SizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SizeGigabytes) { + return nil, false + } + return o.SizeGigabytes, true +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasSizeGigabytes() bool { + if o != nil && !IsNil(o.SizeGigabytes) { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given int32 and assigns it to the SizeGigabytes field. +func (o *ResourcePoolSnapshot) SetSizeGigabytes(v int32) { + o.SizeGigabytes = &v +} + +// GetSnapshotName returns the SnapshotName field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetSnapshotName() string { + if o == nil || IsNil(o.SnapshotName) { + var ret string + return ret + } + return *o.SnapshotName +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.SnapshotName) { + return nil, false + } + return o.SnapshotName, true +} + +// HasSnapshotName returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasSnapshotName() bool { + if o != nil && !IsNil(o.SnapshotName) { + return true + } + + return false +} + +// SetSnapshotName gets a reference to the given string and assigns it to the SnapshotName field. +func (o *ResourcePoolSnapshot) SetSnapshotName(v string) { + o.SnapshotName = &v +} + +func (o ResourcePoolSnapshot) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePoolSnapshot) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Comment.IsSet() { + toSerialize["comment"] = o.Comment.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.LogicalSizeGigabytes) { + toSerialize["logicalSizeGigabytes"] = o.LogicalSizeGigabytes + } + if !IsNil(o.ResourcePoolId) { + toSerialize["resourcePoolId"] = o.ResourcePoolId + } + if !IsNil(o.SizeGigabytes) { + toSerialize["sizeGigabytes"] = o.SizeGigabytes + } + if !IsNil(o.SnapshotName) { + toSerialize["snapshotName"] = o.SnapshotName + } + 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) +} diff --git a/services/sfs/v1api/model_resource_pool_space.go b/services/sfs/v1api/model_resource_pool_space.go new file mode 100644 index 000000000..d5bebd601 --- /dev/null +++ b/services/sfs/v1api/model_resource_pool_space.go @@ -0,0 +1,221 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ResourcePoolSpace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePoolSpace{} + +// ResourcePoolSpace struct for ResourcePoolSpace +type ResourcePoolSpace struct { + // Available space of the Resource Pool (only available when retrieving a single Resource Pool by ID) + AvailableGigabytes NullableFloat64 `json:"availableGigabytes,omitempty"` + // Size of the Resource Pool in Gibibytes. + SizeGigabytes *int32 `json:"sizeGigabytes,omitempty"` + // Used space of the Resource Pool (only available when retrieving a single Resource Pool by ID) + UsedGigabytes NullableFloat64 `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() float64 { + if o == nil || IsNil(o.AvailableGigabytes.Get()) { + var ret float64 + return ret + } + return *o.AvailableGigabytes.Get() +} + +// 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() (*float64, bool) { + if o == nil { + return nil, false + } + return o.AvailableGigabytes.Get(), o.AvailableGigabytes.IsSet() +} + +// HasAvailableGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSpace) HasAvailableGigabytes() bool { + if o != nil && o.AvailableGigabytes.IsSet() { + return true + } + + return false +} + +// SetAvailableGigabytes gets a reference to the given NullableFloat64 and assigns it to the AvailableGigabytes field. +func (o *ResourcePoolSpace) SetAvailableGigabytes(v float64) { + o.AvailableGigabytes.Set(&v) +} + +// SetAvailableGigabytesNil sets the value for AvailableGigabytes to be an explicit nil +func (o *ResourcePoolSpace) SetAvailableGigabytesNil() { + o.AvailableGigabytes.Set(nil) +} + +// UnsetAvailableGigabytes ensures that no value is present for AvailableGigabytes, not even an explicit nil +func (o *ResourcePoolSpace) UnsetAvailableGigabytes() { + o.AvailableGigabytes.Unset() +} + +// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +func (o *ResourcePoolSpace) GetSizeGigabytes() int32 { + if o == nil || IsNil(o.SizeGigabytes) { + var ret int32 + return ret + } + return *o.SizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SizeGigabytes) { + return nil, false + } + return o.SizeGigabytes, true +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSpace) HasSizeGigabytes() bool { + if o != nil && !IsNil(o.SizeGigabytes) { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given int32 and assigns it to the SizeGigabytes field. +func (o *ResourcePoolSpace) SetSizeGigabytes(v int32) { + 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() float64 { + if o == nil || IsNil(o.UsedGigabytes.Get()) { + var ret float64 + return ret + } + return *o.UsedGigabytes.Get() +} + +// 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() (*float64, bool) { + if o == nil { + return nil, false + } + return o.UsedGigabytes.Get(), o.UsedGigabytes.IsSet() +} + +// HasUsedGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSpace) HasUsedGigabytes() bool { + if o != nil && o.UsedGigabytes.IsSet() { + return true + } + + return false +} + +// SetUsedGigabytes gets a reference to the given NullableFloat64 and assigns it to the UsedGigabytes field. +func (o *ResourcePoolSpace) SetUsedGigabytes(v float64) { + o.UsedGigabytes.Set(&v) +} + +// SetUsedGigabytesNil sets the value for UsedGigabytes to be an explicit nil +func (o *ResourcePoolSpace) SetUsedGigabytesNil() { + o.UsedGigabytes.Set(nil) +} + +// UnsetUsedGigabytes ensures that no value is present for UsedGigabytes, not even an explicit nil +func (o *ResourcePoolSpace) UnsetUsedGigabytes() { + o.UsedGigabytes.Unset() +} + +func (o ResourcePoolSpace) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePoolSpace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.AvailableGigabytes.IsSet() { + toSerialize["availableGigabytes"] = o.AvailableGigabytes.Get() + } + if !IsNil(o.SizeGigabytes) { + toSerialize["sizeGigabytes"] = o.SizeGigabytes + } + if o.UsedGigabytes.IsSet() { + toSerialize["usedGigabytes"] = o.UsedGigabytes.Get() + } + 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) +} diff --git a/services/sfs/v1api/model_share.go b/services/sfs/v1api/model_share.go new file mode 100644 index 000000000..ae75ad0f2 --- /dev/null +++ b/services/sfs/v1api/model_share.go @@ -0,0 +1,395 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the Share type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Share{} + +// Share struct for Share +type Share struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // 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 + ExportPolicy NullableShareExportPolicy `json:"exportPolicy,omitempty"` + // ID of the Share + Id *string `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 *map[string]string `json:"labels,omitempty"` + // Mount path of the Share, used to mount the Share + MountPath *string `json:"mountPath,omitempty"` + // Name of the Share + Name *string `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) + SpaceHardLimitGigabytes *int32 `json:"spaceHardLimitGigabytes,omitempty"` + // State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"]) + State *string `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() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Share) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Share) SetCreatedAt(v time.Time) { + 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() ShareExportPolicy { + if o == nil || IsNil(o.ExportPolicy.Get()) { + var ret ShareExportPolicy + return ret + } + return *o.ExportPolicy.Get() +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil { + return nil, false + } + return o.ExportPolicy.Get(), o.ExportPolicy.IsSet() +} + +// HasExportPolicy returns a boolean if a field has been set. +func (o *Share) HasExportPolicy() bool { + if o != nil && o.ExportPolicy.IsSet() { + return true + } + + return false +} + +// SetExportPolicy gets a reference to the given NullableShareExportPolicy and assigns it to the ExportPolicy field. +func (o *Share) SetExportPolicy(v ShareExportPolicy) { + o.ExportPolicy.Set(&v) +} + +// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil +func (o *Share) SetExportPolicyNil() { + o.ExportPolicy.Set(nil) +} + +// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil +func (o *Share) UnsetExportPolicy() { + o.ExportPolicy.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Share) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Share) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Share) SetId(v string) { + o.Id = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Share) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Share) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Share) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetMountPath returns the MountPath field value if set, zero value otherwise. +func (o *Share) GetMountPath() string { + if o == nil || IsNil(o.MountPath) { + var ret string + return ret + } + return *o.MountPath +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.MountPath) { + return nil, false + } + return o.MountPath, true +} + +// HasMountPath returns a boolean if a field has been set. +func (o *Share) HasMountPath() bool { + if o != nil && !IsNil(o.MountPath) { + return true + } + + return false +} + +// SetMountPath gets a reference to the given string and assigns it to the MountPath field. +func (o *Share) SetMountPath(v string) { + o.MountPath = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Share) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Share) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Share) SetName(v string) { + o.Name = &v +} + +// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +func (o *Share) GetSpaceHardLimitGigabytes() int32 { + if o == nil || IsNil(o.SpaceHardLimitGigabytes) { + var ret int32 + return ret + } + return *o.SpaceHardLimitGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SpaceHardLimitGigabytes) { + return nil, false + } + return o.SpaceHardLimitGigabytes, true +} + +// HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +func (o *Share) HasSpaceHardLimitGigabytes() bool { + if o != nil && !IsNil(o.SpaceHardLimitGigabytes) { + return true + } + + return false +} + +// SetSpaceHardLimitGigabytes gets a reference to the given int32 and assigns it to the SpaceHardLimitGigabytes field. +func (o *Share) SetSpaceHardLimitGigabytes(v int32) { + o.SpaceHardLimitGigabytes = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *Share) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *Share) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *Share) SetState(v string) { + o.State = &v +} + +func (o Share) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Share) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if o.ExportPolicy.IsSet() { + toSerialize["exportPolicy"] = o.ExportPolicy.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.MountPath) { + toSerialize["mountPath"] = o.MountPath + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SpaceHardLimitGigabytes) { + toSerialize["spaceHardLimitGigabytes"] = o.SpaceHardLimitGigabytes + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + 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) +} diff --git a/services/sfs/v1api/model_share_export_policy.go b/services/sfs/v1api/model_share_export_policy.go new file mode 100644 index 000000000..1f717e5e9 --- /dev/null +++ b/services/sfs/v1api/model_share_export_policy.go @@ -0,0 +1,310 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the ShareExportPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShareExportPolicy{} + +// ShareExportPolicy struct for ShareExportPolicy +type ShareExportPolicy struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // ID of the Share Export Policy + Id *string `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 *map[string]string `json:"labels,omitempty"` + // Name of the Share Export Policy + Name *string `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 []ShareExportPolicyRule `json:"rules,omitempty"` + // Number of Shares using this Share Export Policy + SharesUsingExportPolicy *int32 `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() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ShareExportPolicy) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ShareExportPolicy) SetId(v string) { + o.Id = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ShareExportPolicy) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ShareExportPolicy) SetName(v string) { + o.Name = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetRules() []ShareExportPolicyRule { + if o == nil || IsNil(o.Rules) { + var ret []ShareExportPolicyRule + return ret + } + return o.Rules +} + +// 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() ([]ShareExportPolicyRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []ShareExportPolicyRule and assigns it to the Rules field. +func (o *ShareExportPolicy) SetRules(v []ShareExportPolicyRule) { + o.Rules = v +} + +// GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetSharesUsingExportPolicy() int32 { + if o == nil || IsNil(o.SharesUsingExportPolicy) { + var ret int32 + return ret + } + return *o.SharesUsingExportPolicy +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SharesUsingExportPolicy) { + return nil, false + } + return o.SharesUsingExportPolicy, true +} + +// HasSharesUsingExportPolicy returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasSharesUsingExportPolicy() bool { + if o != nil && !IsNil(o.SharesUsingExportPolicy) { + return true + } + + return false +} + +// SetSharesUsingExportPolicy gets a reference to the given int32 and assigns it to the SharesUsingExportPolicy field. +func (o *ShareExportPolicy) SetSharesUsingExportPolicy(v int32) { + o.SharesUsingExportPolicy = &v +} + +func (o ShareExportPolicy) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShareExportPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + if !IsNil(o.SharesUsingExportPolicy) { + toSerialize["sharesUsingExportPolicy"] = o.SharesUsingExportPolicy + } + 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) +} diff --git a/services/sfs/v1api/model_share_export_policy_rule.go b/services/sfs/v1api/model_share_export_policy_rule.go new file mode 100644 index 000000000..54eb4db4a --- /dev/null +++ b/services/sfs/v1api/model_share_export_policy_rule.go @@ -0,0 +1,395 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" + "time" +) + +// checks if the ShareExportPolicyRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShareExportPolicyRule{} + +// ShareExportPolicyRule struct for ShareExportPolicyRule +type ShareExportPolicyRule struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Description of the Rule (optional) + Description NullableString `json:"description,omitempty"` + // ID of the Share Export Policy Rule + Id *string `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 []string `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 + Order *int32 `json:"order,omitempty"` + // Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false + ReadOnly *bool `json:"readOnly,omitempty"` + // Flag to honor set UUID Default: false + SetUuid *bool `json:"setUuid,omitempty"` + // Flag to indicate if client IPs matching this rule have root access on the Share Default: true + SuperUser *bool `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() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ShareExportPolicyRule) SetCreatedAt(v time.Time) { + 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() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ShareExportPolicyRule) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ShareExportPolicyRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ShareExportPolicyRule) UnsetDescription() { + o.Description.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ShareExportPolicyRule) SetId(v string) { + o.Id = &v +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *ShareExportPolicyRule) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *ShareExportPolicyRule) SetOrder(v int32) { + o.Order = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *ShareExportPolicyRule) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetSetUuid returns the SetUuid field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetSetUuid() bool { + if o == nil || IsNil(o.SetUuid) { + var ret bool + return ret + } + return *o.SetUuid +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SetUuid) { + return nil, false + } + return o.SetUuid, true +} + +// HasSetUuid returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasSetUuid() bool { + if o != nil && !IsNil(o.SetUuid) { + return true + } + + return false +} + +// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field. +func (o *ShareExportPolicyRule) SetSetUuid(v bool) { + o.SetUuid = &v +} + +// GetSuperUser returns the SuperUser field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetSuperUser() bool { + if o == nil || IsNil(o.SuperUser) { + var ret bool + return ret + } + return *o.SuperUser +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SuperUser) { + return nil, false + } + return o.SuperUser, true +} + +// HasSuperUser returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasSuperUser() bool { + if o != nil && !IsNil(o.SuperUser) { + return true + } + + return false +} + +// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field. +func (o *ShareExportPolicyRule) SetSuperUser(v bool) { + o.SuperUser = &v +} + +func (o ShareExportPolicyRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShareExportPolicyRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.SetUuid) { + toSerialize["setUuid"] = o.SetUuid + } + if !IsNil(o.SuperUser) { + toSerialize["superUser"] = o.SuperUser + } + 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) +} diff --git a/services/sfs/v1api/model_status.go b/services/sfs/v1api/model_status.go new file mode 100644 index 000000000..98d1a74b5 --- /dev/null +++ b/services/sfs/v1api/model_status.go @@ -0,0 +1,199 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Status type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Status{} + +// 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]. + Code *int32 `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 []GoogleProtobufAny `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 *string `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() int32 { + if o == nil || IsNil(o.Code) { + var ret int32 + return ret + } + return *o.Code +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *Status) SetCode(v int32) { + o.Code = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Status) GetDetails() []GoogleProtobufAny { + if o == nil || IsNil(o.Details) { + var ret []GoogleProtobufAny + return ret + } + return o.Details +} + +// 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() ([]GoogleProtobufAny, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Status) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. +func (o *Status) SetDetails(v []GoogleProtobufAny) { + o.Details = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status) SetMessage(v string) { + o.Message = &v +} + +func (o Status) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Status) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + 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) +} diff --git a/services/sfs/v1api/model_update_resource_pool_payload.go b/services/sfs/v1api/model_update_resource_pool_payload.go new file mode 100644 index 000000000..d415a8ad8 --- /dev/null +++ b/services/sfs/v1api/model_update_resource_pool_payload.go @@ -0,0 +1,284 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateResourcePoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateResourcePoolPayload{} + +// 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 []string `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 *map[string]string `json:"labels,omitempty"` + // (optional) Name of the performance class + PerformanceClass *string `json:"performanceClass,omitempty"` + // (optional) Size of the Resource Pool (unit: gigabytes) + SizeGigabytes NullableInt32 `json:"sizeGigabytes,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 *bool `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() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *UpdateResourcePoolPayload) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateResourcePoolPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetPerformanceClass() string { + if o == nil || IsNil(o.PerformanceClass) { + var ret string + return ret + } + return *o.PerformanceClass +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *UpdateResourcePoolPayload) SetPerformanceClass(v string) { + 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() int32 { + if o == nil || IsNil(o.SizeGigabytes.Get()) { + var ret int32 + return ret + } + return *o.SizeGigabytes.Get() +} + +// 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() (*int32, bool) { + if o == nil { + return nil, false + } + return o.SizeGigabytes.Get(), o.SizeGigabytes.IsSet() +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasSizeGigabytes() bool { + if o != nil && o.SizeGigabytes.IsSet() { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given NullableInt32 and assigns it to the SizeGigabytes field. +func (o *UpdateResourcePoolPayload) SetSizeGigabytes(v int32) { + o.SizeGigabytes.Set(&v) +} + +// SetSizeGigabytesNil sets the value for SizeGigabytes to be an explicit nil +func (o *UpdateResourcePoolPayload) SetSizeGigabytesNil() { + o.SizeGigabytes.Set(nil) +} + +// UnsetSizeGigabytes ensures that no value is present for SizeGigabytes, not even an explicit nil +func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() { + o.SizeGigabytes.Unset() +} + +// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisible() bool { + if o == nil || IsNil(o.SnapshotsAreVisible) { + var ret bool + return ret + } + return *o.SnapshotsAreVisible +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SnapshotsAreVisible) { + return nil, false + } + return o.SnapshotsAreVisible, true +} + +// HasSnapshotsAreVisible returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasSnapshotsAreVisible() bool { + if o != nil && !IsNil(o.SnapshotsAreVisible) { + return true + } + + return false +} + +// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field. +func (o *UpdateResourcePoolPayload) SetSnapshotsAreVisible(v bool) { + o.SnapshotsAreVisible = &v +} + +func (o UpdateResourcePoolPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if o.SizeGigabytes.IsSet() { + toSerialize["sizeGigabytes"] = o.SizeGigabytes.Get() + } + if !IsNil(o.SnapshotsAreVisible) { + toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible + } + 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) +} diff --git a/services/sfs/v1api/model_update_resource_pool_response.go b/services/sfs/v1api/model_update_resource_pool_response.go new file mode 100644 index 000000000..9f53b8d77 --- /dev/null +++ b/services/sfs/v1api/model_update_resource_pool_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateResourcePoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateResourcePoolResponse{} + +// UpdateResourcePoolResponse struct for UpdateResourcePoolResponse +type UpdateResourcePoolResponse struct { + // Updated Resource Pool + ResourcePool *ResourcePool `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() ResourcePool { + if o == nil || IsNil(o.ResourcePool) { + var ret ResourcePool + return ret + } + return *o.ResourcePool +} + +// 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() (*ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePool) { + return nil, false + } + return o.ResourcePool, true +} + +// HasResourcePool returns a boolean if a field has been set. +func (o *UpdateResourcePoolResponse) HasResourcePool() bool { + if o != nil && !IsNil(o.ResourcePool) { + return true + } + + return false +} + +// SetResourcePool gets a reference to the given ResourcePool and assigns it to the ResourcePool field. +func (o *UpdateResourcePoolResponse) SetResourcePool(v ResourcePool) { + o.ResourcePool = &v +} + +func (o UpdateResourcePoolResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateResourcePoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePool) { + toSerialize["resourcePool"] = o.ResourcePool + } + 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) +} diff --git a/services/sfs/v1api/model_update_share_export_policy_body_rule.go b/services/sfs/v1api/model_update_share_export_policy_body_rule.go new file mode 100644 index 000000000..89fa982b4 --- /dev/null +++ b/services/sfs/v1api/model_update_share_export_policy_body_rule.go @@ -0,0 +1,333 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateShareExportPolicyBodyRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareExportPolicyBodyRule{} + +// UpdateShareExportPolicyBodyRule struct for UpdateShareExportPolicyBodyRule +type UpdateShareExportPolicyBodyRule struct { + // Description of the Rule (optional) + Description NullableString `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 []string `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 + Order *int32 `json:"order,omitempty"` + // Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false + ReadOnly *bool `json:"readOnly,omitempty"` + // Flag to honor set UUID Default: false + SetUuid *bool `json:"setUuid,omitempty"` + // Flag to indicate if client IPs matching this rule have root access on the Share Default: true + SuperUser *bool `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{} + var readOnly bool = false + this.ReadOnly = &readOnly + var setUuid bool = false + this.SetUuid = &setUuid + var superUser bool = true + this.SuperUser = &superUser + 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() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *UpdateShareExportPolicyBodyRule) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *UpdateShareExportPolicyBodyRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *UpdateShareExportPolicyBodyRule) UnsetDescription() { + o.Description.Unset() +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *UpdateShareExportPolicyBodyRule) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *UpdateShareExportPolicyBodyRule) SetOrder(v int32) { + o.Order = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *UpdateShareExportPolicyBodyRule) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetSetUuid returns the SetUuid field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetSetUuid() bool { + if o == nil || IsNil(o.SetUuid) { + var ret bool + return ret + } + return *o.SetUuid +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SetUuid) { + return nil, false + } + return o.SetUuid, true +} + +// HasSetUuid returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasSetUuid() bool { + if o != nil && !IsNil(o.SetUuid) { + return true + } + + return false +} + +// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field. +func (o *UpdateShareExportPolicyBodyRule) SetSetUuid(v bool) { + o.SetUuid = &v +} + +// GetSuperUser returns the SuperUser field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetSuperUser() bool { + if o == nil || IsNil(o.SuperUser) { + var ret bool + return ret + } + return *o.SuperUser +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SuperUser) { + return nil, false + } + return o.SuperUser, true +} + +// HasSuperUser returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasSuperUser() bool { + if o != nil && !IsNil(o.SuperUser) { + return true + } + + return false +} + +// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field. +func (o *UpdateShareExportPolicyBodyRule) SetSuperUser(v bool) { + o.SuperUser = &v +} + +func (o UpdateShareExportPolicyBodyRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareExportPolicyBodyRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.SetUuid) { + toSerialize["setUuid"] = o.SetUuid + } + if !IsNil(o.SuperUser) { + toSerialize["superUser"] = o.SuperUser + } + 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) +} diff --git a/services/sfs/v1api/model_update_share_export_policy_payload.go b/services/sfs/v1api/model_update_share_export_policy_payload.go new file mode 100644 index 000000000..5483b7f11 --- /dev/null +++ b/services/sfs/v1api/model_update_share_export_policy_payload.go @@ -0,0 +1,163 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateShareExportPolicyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareExportPolicyPayload{} + +// 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 *map[string]string `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 []UpdateShareExportPolicyBodyRule `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() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateShareExportPolicyPayload) SetLabels(v map[string]string) { + 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() []UpdateShareExportPolicyBodyRule { + if o == nil { + var ret []UpdateShareExportPolicyBodyRule + return ret + } + return o.Rules +} + +// 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() ([]UpdateShareExportPolicyBodyRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyPayload) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []UpdateShareExportPolicyBodyRule and assigns it to the Rules field. +func (o *UpdateShareExportPolicyPayload) SetRules(v []UpdateShareExportPolicyBodyRule) { + o.Rules = v +} + +func (o UpdateShareExportPolicyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + 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) +} diff --git a/services/sfs/v1api/model_update_share_export_policy_response.go b/services/sfs/v1api/model_update_share_export_policy_response.go new file mode 100644 index 000000000..cfbf9ea70 --- /dev/null +++ b/services/sfs/v1api/model_update_share_export_policy_response.go @@ -0,0 +1,124 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateShareExportPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareExportPolicyResponse{} + +// UpdateShareExportPolicyResponse struct for UpdateShareExportPolicyResponse +type UpdateShareExportPolicyResponse struct { + ShareExportPolicy *ShareExportPolicy `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() ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicy) { + var ret ShareExportPolicy + return ret + } + return *o.ShareExportPolicy +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicy) { + return nil, false + } + return o.ShareExportPolicy, true +} + +// HasShareExportPolicy returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyResponse) HasShareExportPolicy() bool { + if o != nil && !IsNil(o.ShareExportPolicy) { + return true + } + + return false +} + +// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field. +func (o *UpdateShareExportPolicyResponse) SetShareExportPolicy(v ShareExportPolicy) { + o.ShareExportPolicy = &v +} + +func (o UpdateShareExportPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicy) { + toSerialize["shareExportPolicy"] = o.ShareExportPolicy + } + 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) +} diff --git a/services/sfs/v1api/model_update_share_payload.go b/services/sfs/v1api/model_update_share_payload.go new file mode 100644 index 000000000..5a06051ee --- /dev/null +++ b/services/sfs/v1api/model_update_share_payload.go @@ -0,0 +1,221 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateSharePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateSharePayload{} + +// 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 NullableString `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 *map[string]string `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) + SpaceHardLimitGigabytes NullableInt32 `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() string { + if o == nil || IsNil(o.ExportPolicyName.Get()) { + var ret string + return ret + } + return *o.ExportPolicyName.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExportPolicyName.Get(), o.ExportPolicyName.IsSet() +} + +// HasExportPolicyName returns a boolean if a field has been set. +func (o *UpdateSharePayload) HasExportPolicyName() bool { + if o != nil && o.ExportPolicyName.IsSet() { + return true + } + + return false +} + +// SetExportPolicyName gets a reference to the given NullableString and assigns it to the ExportPolicyName field. +func (o *UpdateSharePayload) SetExportPolicyName(v string) { + o.ExportPolicyName.Set(&v) +} + +// SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil +func (o *UpdateSharePayload) SetExportPolicyNameNil() { + o.ExportPolicyName.Set(nil) +} + +// UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil +func (o *UpdateSharePayload) UnsetExportPolicyName() { + o.ExportPolicyName.Unset() +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateSharePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateSharePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateSharePayload) SetLabels(v map[string]string) { + 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() int32 { + if o == nil || IsNil(o.SpaceHardLimitGigabytes.Get()) { + var ret int32 + return ret + } + return *o.SpaceHardLimitGigabytes.Get() +} + +// 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() (*int32, bool) { + if o == nil { + return nil, false + } + return o.SpaceHardLimitGigabytes.Get(), o.SpaceHardLimitGigabytes.IsSet() +} + +// HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +func (o *UpdateSharePayload) HasSpaceHardLimitGigabytes() bool { + if o != nil && o.SpaceHardLimitGigabytes.IsSet() { + return true + } + + return false +} + +// SetSpaceHardLimitGigabytes gets a reference to the given NullableInt32 and assigns it to the SpaceHardLimitGigabytes field. +func (o *UpdateSharePayload) SetSpaceHardLimitGigabytes(v int32) { + o.SpaceHardLimitGigabytes.Set(&v) +} + +// SetSpaceHardLimitGigabytesNil sets the value for SpaceHardLimitGigabytes to be an explicit nil +func (o *UpdateSharePayload) SetSpaceHardLimitGigabytesNil() { + o.SpaceHardLimitGigabytes.Set(nil) +} + +// UnsetSpaceHardLimitGigabytes ensures that no value is present for SpaceHardLimitGigabytes, not even an explicit nil +func (o *UpdateSharePayload) UnsetSpaceHardLimitGigabytes() { + o.SpaceHardLimitGigabytes.Unset() +} + +func (o UpdateSharePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateSharePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ExportPolicyName.IsSet() { + toSerialize["exportPolicyName"] = o.ExportPolicyName.Get() + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.SpaceHardLimitGigabytes.IsSet() { + toSerialize["spaceHardLimitGigabytes"] = o.SpaceHardLimitGigabytes.Get() + } + 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) +} diff --git a/services/sfs/v1api/model_update_share_response.go b/services/sfs/v1api/model_update_share_response.go new file mode 100644 index 000000000..1a4e018fd --- /dev/null +++ b/services/sfs/v1api/model_update_share_response.go @@ -0,0 +1,125 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateShareResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareResponse{} + +// UpdateShareResponse struct for UpdateShareResponse +type UpdateShareResponse struct { + // Updated Share + Share *Share `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() Share { + if o == nil || IsNil(o.Share) { + var ret Share + return ret + } + return *o.Share +} + +// 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() (*Share, bool) { + if o == nil || IsNil(o.Share) { + return nil, false + } + return o.Share, true +} + +// HasShare returns a boolean if a field has been set. +func (o *UpdateShareResponse) HasShare() bool { + if o != nil && !IsNil(o.Share) { + return true + } + + return false +} + +// SetShare gets a reference to the given Share and assigns it to the Share field. +func (o *UpdateShareResponse) SetShare(v Share) { + o.Share = &v +} + +func (o UpdateShareResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Share) { + toSerialize["share"] = o.Share + } + 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) +} diff --git a/services/sfs/v1api/model_validation_error.go b/services/sfs/v1api/model_validation_error.go new file mode 100644 index 000000000..b13311895 --- /dev/null +++ b/services/sfs/v1api/model_validation_error.go @@ -0,0 +1,256 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationError{} + +// ValidationError struct for ValidationError +type ValidationError struct { + // Human-readable string of the error that occured + // Deprecated + ErrorDescription interface{} `json:"error_description,omitempty"` + // Human-readable description of the error that occurred. + Title string `json:"title"` + // URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/ e.g. storage.stackit.cloud/validation-error + Type string `json:"type"` + Fields []ValidationErrorField `json:"fields"` +} + +type _ValidationError ValidationError + +// NewValidationError instantiates a new ValidationError 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 NewValidationError(title string, types string, fields []ValidationErrorField) *ValidationError { + this := ValidationError{} + this.Title = title + this.Type = types + this.Fields = fields + return &this +} + +// NewValidationErrorWithDefaults instantiates a new ValidationError 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 NewValidationErrorWithDefaults() *ValidationError { + this := ValidationError{} + 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 *ValidationError) GetErrorDescription() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.ErrorDescription +} + +// 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 *ValidationError) GetErrorDescriptionOk() (*interface{}, bool) { + if o == nil || IsNil(o.ErrorDescription) { + return nil, false + } + return &o.ErrorDescription, true +} + +// HasErrorDescription returns a boolean if a field has been set. +func (o *ValidationError) HasErrorDescription() bool { + if o != nil && !IsNil(o.ErrorDescription) { + return true + } + + return false +} + +// SetErrorDescription gets a reference to the given interface{} and assigns it to the ErrorDescription field. +// Deprecated +func (o *ValidationError) SetErrorDescription(v interface{}) { + o.ErrorDescription = v +} + +// GetTitle returns the Title field value +func (o *ValidationError) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *ValidationError) SetTitle(v string) { + o.Title = v +} + +// GetType returns the Type field value +func (o *ValidationError) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ValidationError) SetType(v string) { + o.Type = v +} + +// GetFields returns the Fields field value +func (o *ValidationError) GetFields() []ValidationErrorField { + if o == nil { + var ret []ValidationErrorField + return ret + } + + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetFieldsOk() ([]ValidationErrorField, bool) { + if o == nil { + return nil, false + } + return o.Fields, true +} + +// SetFields sets field value +func (o *ValidationError) SetFields(v []ValidationErrorField) { + o.Fields = v +} + +func (o ValidationError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ErrorDescription != nil { + toSerialize["error_description"] = o.ErrorDescription + } + toSerialize["title"] = o.Title + toSerialize["type"] = o.Type + toSerialize["fields"] = o.Fields + return toSerialize, nil +} + +func (o *ValidationError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "title", + "type", + "fields", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varValidationError := _ValidationError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varValidationError) + + if err != nil { + return err + } + + *o = ValidationError(varValidationError) + + return err +} + +type NullableValidationError struct { + value *ValidationError + isSet bool +} + +func (v NullableValidationError) Get() *ValidationError { + return v.value +} + +func (v *NullableValidationError) Set(val *ValidationError) { + v.value = val + v.isSet = true +} + +func (v NullableValidationError) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationError(val *ValidationError) *NullableValidationError { + return &NullableValidationError{value: val, isSet: true} +} + +func (v NullableValidationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sfs/v1api/model_validation_error_field.go b/services/sfs/v1api/model_validation_error_field.go new file mode 100644 index 000000000..1fd86d9ba --- /dev/null +++ b/services/sfs/v1api/model_validation_error_field.go @@ -0,0 +1,186 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ValidationErrorField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorField{} + +// ValidationErrorField struct for ValidationErrorField +type ValidationErrorField struct { + // The name of the field in the request that has failed the validation + Field string `json:"field"` + // The reason why the validation failed + Reason string `json:"reason"` +} + +type _ValidationErrorField ValidationErrorField + +// NewValidationErrorField instantiates a new ValidationErrorField 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 NewValidationErrorField(field string, reason string) *ValidationErrorField { + this := ValidationErrorField{} + this.Field = field + this.Reason = reason + return &this +} + +// NewValidationErrorFieldWithDefaults instantiates a new ValidationErrorField 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 NewValidationErrorFieldWithDefaults() *ValidationErrorField { + this := ValidationErrorField{} + return &this +} + +// GetField returns the Field field value +func (o *ValidationErrorField) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *ValidationErrorField) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *ValidationErrorField) SetField(v string) { + o.Field = v +} + +// GetReason returns the Reason field value +func (o *ValidationErrorField) GetReason() string { + if o == nil { + var ret string + return ret + } + + return o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value +// and a boolean to check if the value has been set. +func (o *ValidationErrorField) GetReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reason, true +} + +// SetReason sets field value +func (o *ValidationErrorField) SetReason(v string) { + o.Reason = v +} + +func (o ValidationErrorField) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationErrorField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + toSerialize["reason"] = o.Reason + return toSerialize, nil +} + +func (o *ValidationErrorField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "field", + "reason", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varValidationErrorField := _ValidationErrorField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varValidationErrorField) + + if err != nil { + return err + } + + *o = ValidationErrorField(varValidationErrorField) + + return err +} + +type NullableValidationErrorField struct { + value *ValidationErrorField + isSet bool +} + +func (v NullableValidationErrorField) Get() *ValidationErrorField { + return v.value +} + +func (v *NullableValidationErrorField) Set(val *ValidationErrorField) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorField) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorField(val *ValidationErrorField) *NullableValidationErrorField { + return &NullableValidationErrorField{value: val, isSet: true} +} + +func (v NullableValidationErrorField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sfs/v1api/response.go b/services/sfs/v1api/response.go new file mode 100644 index 000000000..d7aa0abba --- /dev/null +++ b/services/sfs/v1api/response.go @@ -0,0 +1,47 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/sfs/v1api/utils.go b/services/sfs/v1api/utils.go new file mode 100644 index 000000000..af7fdaff4 --- /dev/null +++ b/services/sfs/v1api/utils.go @@ -0,0 +1,361 @@ +/* +STACKIT File Storage (SFS) + +API used to create and manage NFS Shares. + +API version: 1.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/services/sfs/v1betaapi/api_default.go b/services/sfs/v1betaapi/api_default.go new file mode 100644 index 000000000..9ff9c61e2 --- /dev/null +++ b/services/sfs/v1betaapi/api_default.go @@ -0,0 +1,3760 @@ +/* +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 v1betaapi + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + + "github.com/stackitcloud/stackit-sdk-go/core/config" + "github.com/stackitcloud/stackit-sdk-go/core/oapierror" +) + +type DefaultAPI interface { + + /* + CreateResourcePool Create Resource Pool + + Create a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateResourcePoolRequest + */ + CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest + + // CreateResourcePoolExecute executes the request + // @return CreateResourcePoolResponse + CreateResourcePoolExecute(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) + + /* + CreateResourcePoolSnapshot Create Resource Pool Snapshot + + Creates a Snapshot of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateResourcePoolSnapshotRequest + */ + CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest + + // CreateResourcePoolSnapshotExecute executes the request + // @return CreateResourcePoolSnapshotResponse + CreateResourcePoolSnapshotExecute(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) + + /* + CreateShare Create Share + + Creates a Share in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateShareRequest + */ + CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest + + // CreateShareExecute executes the request + // @return CreateShareResponse + CreateShareExecute(r ApiCreateShareRequest) (*CreateShareResponse, error) + + /* + CreateShareExportPolicy Create Share Export Policy + + Creates a ShareExportPolicy in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateShareExportPolicyRequest + */ + CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest + + // CreateShareExportPolicyExecute executes the request + // @return CreateShareExportPolicyResponse + CreateShareExportPolicyExecute(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) + + /* + DeleteResourcePool Delete Resource Pool + + Deletes a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiDeleteResourcePoolRequest + */ + DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest + + // DeleteResourcePoolExecute executes the request + // @return map[string]interface{} + DeleteResourcePoolExecute(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) + + /* + DeleteResourcePoolSnapshot Delete Resource Pool Snapshot + + Deletes a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiDeleteResourcePoolSnapshotRequest + */ + DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest + + // DeleteResourcePoolSnapshotExecute executes the request + // @return map[string]interface{} + DeleteResourcePoolSnapshotExecute(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) + + /* + DeleteShare Delete Share + + Deletes a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiDeleteShareRequest + */ + DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest + + // DeleteShareExecute executes the request + // @return map[string]interface{} + DeleteShareExecute(r ApiDeleteShareRequest) (map[string]interface{}, error) + + /* + DeleteShareExportPolicy Delete Share Export Policy + + Deletes a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiDeleteShareExportPolicyRequest + */ + DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest + + // DeleteShareExportPolicyExecute executes the request + // @return map[string]interface{} + DeleteShareExportPolicyExecute(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) + + /* + GetResourcePool Get Resource Pool + + Retrieves a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiGetResourcePoolRequest + */ + GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest + + // GetResourcePoolExecute executes the request + // @return GetResourcePoolResponse + GetResourcePoolExecute(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) + + /* + GetResourcePoolSnapshot Get Resource Pool Snapshot + + Retrieves a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiGetResourcePoolSnapshotRequest + */ + GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest + + // GetResourcePoolSnapshotExecute executes the request + // @return GetResourcePoolSnapshotResponse + GetResourcePoolSnapshotExecute(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) + + /* + GetShare Get Share + + Retrieves a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiGetShareRequest + */ + GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest + + // GetShareExecute executes the request + // @return GetShareResponse + GetShareExecute(r ApiGetShareRequest) (*GetShareResponse, error) + + /* + GetShareExportPolicy Get Share Export Policy + + Retrieves a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiGetShareExportPolicyRequest + */ + GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest + + // GetShareExportPolicyExecute executes the request + // @return GetShareExportPolicyResponse + GetShareExportPolicyExecute(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) + + /* + ListPerformanceClasses List Resource Performance Classes + + Lists all performances classes available + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPerformanceClassesRequest + */ + ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest + + // ListPerformanceClassesExecute executes the request + // @return ListPerformanceClassesResponse + ListPerformanceClassesExecute(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) + + /* + ListResourcePoolSnapshots List Resource Pool Snapshots + + Lists the Snapshots of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListResourcePoolSnapshotsRequest + */ + ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest + + // ListResourcePoolSnapshotsExecute executes the request + // @return ListResourcePoolSnapshotsResponse + ListResourcePoolSnapshotsExecute(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) + + /* + ListResourcePools List Resource Pools + + Lists Resource Pools in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListResourcePoolsRequest + */ + ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest + + // ListResourcePoolsExecute executes the request + // @return ListResourcePoolsResponse + ListResourcePoolsExecute(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) + + /* + ListShareExportPolicies List Share Export Policies + + Lists ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListShareExportPoliciesRequest + */ + ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest + + // ListShareExportPoliciesExecute executes the request + // @return ListShareExportPoliciesResponse + ListShareExportPoliciesExecute(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) + + /* + ListShares List Shares + + Lists Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListSharesRequest + */ + ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest + + // ListSharesExecute executes the request + // @return ListSharesResponse + ListSharesExecute(r ApiListSharesRequest) (*ListSharesResponse, error) + + /* + ListSnapshotSchedules List Snapshot Schedules + + Lists snapshot schedules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiListSnapshotSchedulesRequest + */ + ListSnapshotSchedules(ctx context.Context, projectId string) ApiListSnapshotSchedulesRequest + + // ListSnapshotSchedulesExecute executes the request + // @return ListSnapshotSchedulesResponse + ListSnapshotSchedulesExecute(r ApiListSnapshotSchedulesRequest) (*ListSnapshotSchedulesResponse, error) + + /* + UpdateResourcePool Update Resource Pool + + Updates a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiUpdateResourcePoolRequest + */ + UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest + + // UpdateResourcePoolExecute executes the request + // @return UpdateResourcePoolResponse + UpdateResourcePoolExecute(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) + + /* + UpdateShare Update Share + + Updates a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiUpdateShareRequest + */ + UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest + + // UpdateShareExecute executes the request + // @return UpdateShareResponse + UpdateShareExecute(r ApiUpdateShareRequest) (*UpdateShareResponse, error) + + /* + UpdateShareExportPolicy Update Share Export Policy + + Updates a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiUpdateShareExportPolicyRequest + */ + UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest + + // UpdateShareExportPolicyExecute executes the request + // @return UpdateShareExportPolicyResponse + UpdateShareExportPolicyExecute(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCreateResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createResourcePoolPayload *CreateResourcePoolPayload +} + +func (r ApiCreateResourcePoolRequest) CreateResourcePoolPayload(createResourcePoolPayload CreateResourcePoolPayload) ApiCreateResourcePoolRequest { + r.createResourcePoolPayload = &createResourcePoolPayload + return r +} + +func (r ApiCreateResourcePoolRequest) Execute() (*CreateResourcePoolResponse, error) { + return r.ApiService.CreateResourcePoolExecute(r) +} + +/* +CreateResourcePool Create Resource Pool + +Create a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateResourcePoolRequest +*/ +func (a *DefaultAPIService) CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest { + return ApiCreateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateResourcePoolResponse +func (a *DefaultAPIService) CreateResourcePoolExecute(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateResourcePoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createResourcePoolPayload == nil { + return localVarReturnValue, reportError("createResourcePoolPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createResourcePoolPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateResourcePoolSnapshotRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + createResourcePoolSnapshotPayload *CreateResourcePoolSnapshotPayload +} + +func (r ApiCreateResourcePoolSnapshotRequest) CreateResourcePoolSnapshotPayload(createResourcePoolSnapshotPayload CreateResourcePoolSnapshotPayload) ApiCreateResourcePoolSnapshotRequest { + r.createResourcePoolSnapshotPayload = &createResourcePoolSnapshotPayload + return r +} + +func (r ApiCreateResourcePoolSnapshotRequest) Execute() (*CreateResourcePoolSnapshotResponse, error) { + return r.ApiService.CreateResourcePoolSnapshotExecute(r) +} + +/* +CreateResourcePoolSnapshot Create Resource Pool Snapshot + +Creates a Snapshot of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateResourcePoolSnapshotRequest +*/ +func (a *DefaultAPIService) CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest { + return ApiCreateResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return CreateResourcePoolSnapshotResponse +func (a *DefaultAPIService) CreateResourcePoolSnapshotExecute(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateResourcePoolSnapshotResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateResourcePoolSnapshot") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createResourcePoolSnapshotPayload == nil { + return localVarReturnValue, reportError("createResourcePoolSnapshotPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createResourcePoolSnapshotPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + createSharePayload *CreateSharePayload +} + +func (r ApiCreateShareRequest) CreateSharePayload(createSharePayload CreateSharePayload) ApiCreateShareRequest { + r.createSharePayload = &createSharePayload + return r +} + +func (r ApiCreateShareRequest) Execute() (*CreateShareResponse, error) { + return r.ApiService.CreateShareExecute(r) +} + +/* +CreateShare Create Share + +Creates a Share in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiCreateShareRequest +*/ +func (a *DefaultAPIService) CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest { + return ApiCreateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return CreateShareResponse +func (a *DefaultAPIService) CreateShareExecute(r ApiCreateShareRequest) (*CreateShareResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateShareResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createSharePayload == nil { + return localVarReturnValue, reportError("createSharePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createSharePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiCreateShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createShareExportPolicyPayload *CreateShareExportPolicyPayload +} + +func (r ApiCreateShareExportPolicyRequest) CreateShareExportPolicyPayload(createShareExportPolicyPayload CreateShareExportPolicyPayload) ApiCreateShareExportPolicyRequest { + r.createShareExportPolicyPayload = &createShareExportPolicyPayload + return r +} + +func (r ApiCreateShareExportPolicyRequest) Execute() (*CreateShareExportPolicyResponse, error) { + return r.ApiService.CreateShareExportPolicyExecute(r) +} + +/* +CreateShareExportPolicy Create Share Export Policy + +Creates a ShareExportPolicy in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiCreateShareExportPolicyRequest +*/ +func (a *DefaultAPIService) CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest { + return ApiCreateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateShareExportPolicyResponse +func (a *DefaultAPIService) CreateShareExportPolicyExecute(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateShareExportPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createShareExportPolicyPayload == nil { + return localVarReturnValue, reportError("createShareExportPolicyPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createShareExportPolicyPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiDeleteResourcePoolRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteResourcePoolExecute(r) +} + +/* +DeleteResourcePool Delete Resource Pool + +Deletes a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiDeleteResourcePoolRequest +*/ +func (a *DefaultAPIService) DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest { + return ApiDeleteResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteResourcePoolExecute(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteResourcePoolSnapshotRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + snapshotName string +} + +func (r ApiDeleteResourcePoolSnapshotRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteResourcePoolSnapshotExecute(r) +} + +/* +DeleteResourcePoolSnapshot Delete Resource Pool Snapshot + +Deletes a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiDeleteResourcePoolSnapshotRequest +*/ +func (a *DefaultAPIService) DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest { + return ApiDeleteResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteResourcePoolSnapshotExecute(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteResourcePoolSnapshot") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"snapshotName"+"}", url.PathEscape(parameterValueToString(r.snapshotName, "snapshotName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + shareId string +} + +func (r ApiDeleteShareRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteShareExecute(r) +} + +/* +DeleteShare Delete Share + +Deletes a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiDeleteShareRequest +*/ +func (a *DefaultAPIService) DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest { + return ApiDeleteShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteShareExecute(r ApiDeleteShareRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"shareId"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiDeleteShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + policyId string +} + +func (r ApiDeleteShareExportPolicyRequest) Execute() (map[string]interface{}, error) { + return r.ApiService.DeleteShareExportPolicyExecute(r) +} + +/* +DeleteShareExportPolicy Delete Share Export Policy + +Deletes a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiDeleteShareExportPolicyRequest +*/ +func (a *DefaultAPIService) DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest { + return ApiDeleteShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// Execute executes the request +// +// @return map[string]interface{} +func (a *DefaultAPIService) DeleteShareExportPolicyExecute(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policyId"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiGetResourcePoolRequest) Execute() (*GetResourcePoolResponse, error) { + return r.ApiService.GetResourcePoolExecute(r) +} + +/* +GetResourcePool Get Resource Pool + +Retrieves a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiGetResourcePoolRequest +*/ +func (a *DefaultAPIService) GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest { + return ApiGetResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return GetResourcePoolResponse +func (a *DefaultAPIService) GetResourcePoolExecute(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetResourcePoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetResourcePoolSnapshotRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + snapshotName string +} + +func (r ApiGetResourcePoolSnapshotRequest) Execute() (*GetResourcePoolSnapshotResponse, error) { + return r.ApiService.GetResourcePoolSnapshotExecute(r) +} + +/* +GetResourcePoolSnapshot Get Resource Pool Snapshot + +Retrieves a Snapshot from a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param snapshotName + @return ApiGetResourcePoolSnapshotRequest +*/ +func (a *DefaultAPIService) GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest { + return ApiGetResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// Execute executes the request +// +// @return GetResourcePoolSnapshotResponse +func (a *DefaultAPIService) GetResourcePoolSnapshotExecute(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetResourcePoolSnapshotResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetResourcePoolSnapshot") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots/{snapshotName}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"snapshotName"+"}", url.PathEscape(parameterValueToString(r.snapshotName, "snapshotName")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + shareId string +} + +func (r ApiGetShareRequest) Execute() (*GetShareResponse, error) { + return r.ApiService.GetShareExecute(r) +} + +/* +GetShare Get Share + +Retrieves a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiGetShareRequest +*/ +func (a *DefaultAPIService) GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest { + return ApiGetShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// Execute executes the request +// +// @return GetShareResponse +func (a *DefaultAPIService) GetShareExecute(r ApiGetShareRequest) (*GetShareResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetShareResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"shareId"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiGetShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + policyId string +} + +func (r ApiGetShareExportPolicyRequest) Execute() (*GetShareExportPolicyResponse, error) { + return r.ApiService.GetShareExportPolicyExecute(r) +} + +/* +GetShareExportPolicy Get Share Export Policy + +Retrieves a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiGetShareExportPolicyRequest +*/ +func (a *DefaultAPIService) GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest { + return ApiGetShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// Execute executes the request +// +// @return GetShareExportPolicyResponse +func (a *DefaultAPIService) GetShareExportPolicyExecute(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetShareExportPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policyId"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListPerformanceClassesRequest struct { + ctx context.Context + ApiService DefaultAPI +} + +func (r ApiListPerformanceClassesRequest) Execute() (*ListPerformanceClassesResponse, error) { + return r.ApiService.ListPerformanceClassesExecute(r) +} + +/* +ListPerformanceClasses List Resource Performance Classes + +Lists all performances classes available + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListPerformanceClassesRequest +*/ +func (a *DefaultAPIService) ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest { + return ApiListPerformanceClassesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// +// @return ListPerformanceClassesResponse +func (a *DefaultAPIService) ListPerformanceClassesExecute(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListPerformanceClassesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListPerformanceClasses") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/resourcePoolPerformanceClasses" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListResourcePoolSnapshotsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiListResourcePoolSnapshotsRequest) Execute() (*ListResourcePoolSnapshotsResponse, error) { + return r.ApiService.ListResourcePoolSnapshotsExecute(r) +} + +/* +ListResourcePoolSnapshots List Resource Pool Snapshots + +Lists the Snapshots of a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListResourcePoolSnapshotsRequest +*/ +func (a *DefaultAPIService) ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest { + return ApiListResourcePoolSnapshotsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return ListResourcePoolSnapshotsResponse +func (a *DefaultAPIService) ListResourcePoolSnapshotsExecute(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListResourcePoolSnapshotsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListResourcePoolSnapshots") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListResourcePoolsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListResourcePoolsRequest) Execute() (*ListResourcePoolsResponse, error) { + return r.ApiService.ListResourcePoolsExecute(r) +} + +/* +ListResourcePools List Resource Pools + +Lists Resource Pools in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListResourcePoolsRequest +*/ +func (a *DefaultAPIService) ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest { + return ApiListResourcePoolsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListResourcePoolsResponse +func (a *DefaultAPIService) ListResourcePoolsExecute(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListResourcePoolsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListResourcePools") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListShareExportPoliciesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListShareExportPoliciesRequest) Execute() (*ListShareExportPoliciesResponse, error) { + return r.ApiService.ListShareExportPoliciesExecute(r) +} + +/* +ListShareExportPolicies List Share Export Policies + +Lists ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @return ApiListShareExportPoliciesRequest +*/ +func (a *DefaultAPIService) ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest { + return ApiListShareExportPoliciesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListShareExportPoliciesResponse +func (a *DefaultAPIService) ListShareExportPoliciesExecute(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListShareExportPoliciesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListShareExportPolicies") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListSharesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string +} + +func (r ApiListSharesRequest) Execute() (*ListSharesResponse, error) { + return r.ApiService.ListSharesExecute(r) +} + +/* +ListShares List Shares + +Lists Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiListSharesRequest +*/ +func (a *DefaultAPIService) ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest { + return ApiListSharesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return ListSharesResponse +func (a *DefaultAPIService) ListSharesExecute(r ApiListSharesRequest) (*ListSharesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListSharesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListShares") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiListSnapshotSchedulesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListSnapshotSchedulesRequest) Execute() (*ListSnapshotSchedulesResponse, error) { + return r.ApiService.ListSnapshotSchedulesExecute(r) +} + +/* +ListSnapshotSchedules List Snapshot Schedules + +Lists snapshot schedules + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @return ApiListSnapshotSchedulesRequest +*/ +func (a *DefaultAPIService) ListSnapshotSchedules(ctx context.Context, projectId string) ApiListSnapshotSchedulesRequest { + return ApiListSnapshotSchedulesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListSnapshotSchedulesResponse +func (a *DefaultAPIService) ListSnapshotSchedulesExecute(r ApiListSnapshotSchedulesRequest) (*ListSnapshotSchedulesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListSnapshotSchedulesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListSnapshotSchedules") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/snapshotSchedules" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateResourcePoolRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + updateResourcePoolPayload *UpdateResourcePoolPayload +} + +func (r ApiUpdateResourcePoolRequest) UpdateResourcePoolPayload(updateResourcePoolPayload UpdateResourcePoolPayload) ApiUpdateResourcePoolRequest { + r.updateResourcePoolPayload = &updateResourcePoolPayload + return r +} + +func (r ApiUpdateResourcePoolRequest) Execute() (*UpdateResourcePoolResponse, error) { + return r.ApiService.UpdateResourcePoolExecute(r) +} + +/* +UpdateResourcePool Update Resource Pool + +Updates a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @return ApiUpdateResourcePoolRequest +*/ +func (a *DefaultAPIService) UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest { + return ApiUpdateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// Execute executes the request +// +// @return UpdateResourcePoolResponse +func (a *DefaultAPIService) UpdateResourcePoolExecute(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateResourcePoolResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateResourcePool") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateResourcePoolPayload == nil { + return localVarReturnValue, reportError("updateResourcePoolPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateResourcePoolPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateShareRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + resourcePoolId string + shareId string + updateSharePayload *UpdateSharePayload +} + +func (r ApiUpdateShareRequest) UpdateSharePayload(updateSharePayload UpdateSharePayload) ApiUpdateShareRequest { + r.updateSharePayload = &updateSharePayload + return r +} + +func (r ApiUpdateShareRequest) Execute() (*UpdateShareResponse, error) { + return r.ApiService.UpdateShareExecute(r) +} + +/* +UpdateShare Update Share + +Updates a Shares in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param resourcePoolId + @param shareId + @return ApiUpdateShareRequest +*/ +func (a *DefaultAPIService) UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest { + return ApiUpdateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// Execute executes the request +// +// @return UpdateShareResponse +func (a *DefaultAPIService) UpdateShareExecute(r ApiUpdateShareRequest) (*UpdateShareResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateShareResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateShare") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/shares/{shareId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"resourcePoolId"+"}", url.PathEscape(parameterValueToString(r.resourcePoolId, "resourcePoolId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"shareId"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateSharePayload == nil { + return localVarReturnValue, reportError("updateSharePayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateSharePayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} + +type ApiUpdateShareExportPolicyRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + policyId string + updateShareExportPolicyPayload *UpdateShareExportPolicyPayload +} + +func (r ApiUpdateShareExportPolicyRequest) UpdateShareExportPolicyPayload(updateShareExportPolicyPayload UpdateShareExportPolicyPayload) ApiUpdateShareExportPolicyRequest { + r.updateShareExportPolicyPayload = &updateShareExportPolicyPayload + return r +} + +func (r ApiUpdateShareExportPolicyRequest) Execute() (*UpdateShareExportPolicyResponse, error) { + return r.ApiService.UpdateShareExportPolicyExecute(r) +} + +/* +UpdateShareExportPolicy Update Share Export Policy + +Updates a ShareExportPolicies in a Resource Pool in a project. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId + @param region + @param policyId + @return ApiUpdateShareExportPolicyRequest +*/ +func (a *DefaultAPIService) UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest { + return ApiUpdateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// Execute executes the request +// +// @return UpdateShareExportPolicyResponse +func (a *DefaultAPIService) UpdateShareExportPolicyExecute(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateShareExportPolicyResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateShareExportPolicy") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1beta/projects/{projectId}/regions/{region}/shareExportPolicies/{policyId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(parameterValueToString(r.region, "region")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"policyId"+"}", url.PathEscape(parameterValueToString(r.policyId, "policyId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateShareExportPolicyPayload == nil { + return localVarReturnValue, reportError("updateShareExportPolicyPayload is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json", "application/problem+json", "text/plain"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateShareExportPolicyPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, err + } + + contextHTTPRequest, ok := r.ctx.Value(config.ContextHTTPRequest).(**http.Request) + if ok { + *contextHTTPRequest = req + } + + localVarHTTPResponse, err := a.client.callAPI(req) + contextHTTPResponse, ok := r.ctx.Value(config.ContextHTTPResponse).(**http.Response) + if ok { + *contextHTTPResponse = localVarHTTPResponse + } + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ValidationError + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v string + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 500 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } + return localVarReturnValue, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &oapierror.GenericOpenAPIError{ + StatusCode: localVarHTTPResponse.StatusCode, + Body: localVarBody, + ErrorMessage: err.Error(), + } + return localVarReturnValue, newErr + } + + return localVarReturnValue, nil +} diff --git a/services/sfs/v1betaapi/api_default_mock.go b/services/sfs/v1betaapi/api_default_mock.go new file mode 100644 index 000000000..e2d4e1701 --- /dev/null +++ b/services/sfs/v1betaapi/api_default_mock.go @@ -0,0 +1,481 @@ +/* +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 v1betaapi + +import ( + "context" +) + +// assert the implementation matches the interface +var _ DefaultAPI = &DefaultAPIServiceMock{} + +// DefaultAPIServiceMock is meant to be used for testing only as a replacement for DefaultAPIService. +// By default all FooExecute() implementations are a no-op. Behavior of the mock can be customized by populating the callbacks in this struct. +type DefaultAPIServiceMock struct { + // CreateResourcePoolExecuteMock can be populated to implement the behavior of the CreateResourcePoolExecute function of this mock + CreateResourcePoolExecuteMock *func(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) + // CreateResourcePoolSnapshotExecuteMock can be populated to implement the behavior of the CreateResourcePoolSnapshotExecute function of this mock + CreateResourcePoolSnapshotExecuteMock *func(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) + // CreateShareExecuteMock can be populated to implement the behavior of the CreateShareExecute function of this mock + CreateShareExecuteMock *func(r ApiCreateShareRequest) (*CreateShareResponse, error) + // CreateShareExportPolicyExecuteMock can be populated to implement the behavior of the CreateShareExportPolicyExecute function of this mock + CreateShareExportPolicyExecuteMock *func(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) + // DeleteResourcePoolExecuteMock can be populated to implement the behavior of the DeleteResourcePoolExecute function of this mock + DeleteResourcePoolExecuteMock *func(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) + // DeleteResourcePoolSnapshotExecuteMock can be populated to implement the behavior of the DeleteResourcePoolSnapshotExecute function of this mock + DeleteResourcePoolSnapshotExecuteMock *func(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) + // DeleteShareExecuteMock can be populated to implement the behavior of the DeleteShareExecute function of this mock + DeleteShareExecuteMock *func(r ApiDeleteShareRequest) (map[string]interface{}, error) + // DeleteShareExportPolicyExecuteMock can be populated to implement the behavior of the DeleteShareExportPolicyExecute function of this mock + DeleteShareExportPolicyExecuteMock *func(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) + // GetResourcePoolExecuteMock can be populated to implement the behavior of the GetResourcePoolExecute function of this mock + GetResourcePoolExecuteMock *func(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) + // GetResourcePoolSnapshotExecuteMock can be populated to implement the behavior of the GetResourcePoolSnapshotExecute function of this mock + GetResourcePoolSnapshotExecuteMock *func(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) + // GetShareExecuteMock can be populated to implement the behavior of the GetShareExecute function of this mock + GetShareExecuteMock *func(r ApiGetShareRequest) (*GetShareResponse, error) + // GetShareExportPolicyExecuteMock can be populated to implement the behavior of the GetShareExportPolicyExecute function of this mock + GetShareExportPolicyExecuteMock *func(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) + // ListPerformanceClassesExecuteMock can be populated to implement the behavior of the ListPerformanceClassesExecute function of this mock + ListPerformanceClassesExecuteMock *func(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) + // ListResourcePoolSnapshotsExecuteMock can be populated to implement the behavior of the ListResourcePoolSnapshotsExecute function of this mock + ListResourcePoolSnapshotsExecuteMock *func(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) + // ListResourcePoolsExecuteMock can be populated to implement the behavior of the ListResourcePoolsExecute function of this mock + ListResourcePoolsExecuteMock *func(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) + // ListShareExportPoliciesExecuteMock can be populated to implement the behavior of the ListShareExportPoliciesExecute function of this mock + ListShareExportPoliciesExecuteMock *func(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) + // ListSharesExecuteMock can be populated to implement the behavior of the ListSharesExecute function of this mock + ListSharesExecuteMock *func(r ApiListSharesRequest) (*ListSharesResponse, error) + // ListSnapshotSchedulesExecuteMock can be populated to implement the behavior of the ListSnapshotSchedulesExecute function of this mock + ListSnapshotSchedulesExecuteMock *func(r ApiListSnapshotSchedulesRequest) (*ListSnapshotSchedulesResponse, error) + // UpdateResourcePoolExecuteMock can be populated to implement the behavior of the UpdateResourcePoolExecute function of this mock + UpdateResourcePoolExecuteMock *func(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) + // UpdateShareExecuteMock can be populated to implement the behavior of the UpdateShareExecute function of this mock + UpdateShareExecuteMock *func(r ApiUpdateShareRequest) (*UpdateShareResponse, error) + // UpdateShareExportPolicyExecuteMock can be populated to implement the behavior of the UpdateShareExportPolicyExecute function of this mock + UpdateShareExportPolicyExecuteMock *func(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) +} + +func (a DefaultAPIServiceMock) CreateResourcePool(ctx context.Context, projectId string, region string) ApiCreateResourcePoolRequest { + return ApiCreateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateResourcePoolExecute(r ApiCreateResourcePoolRequest) (*CreateResourcePoolResponse, error) { + if a.CreateResourcePoolExecuteMock == nil { + var localVarReturnValue *CreateResourcePoolResponse + return localVarReturnValue, nil + } + + return (*a.CreateResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateResourcePoolSnapshotRequest { + return ApiCreateResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// CreateResourcePoolSnapshotExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateResourcePoolSnapshotExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateResourcePoolSnapshotExecute(r ApiCreateResourcePoolSnapshotRequest) (*CreateResourcePoolSnapshotResponse, error) { + if a.CreateResourcePoolSnapshotExecuteMock == nil { + var localVarReturnValue *CreateResourcePoolSnapshotResponse + return localVarReturnValue, nil + } + + return (*a.CreateResourcePoolSnapshotExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateShare(ctx context.Context, projectId string, region string, resourcePoolId string) ApiCreateShareRequest { + return ApiCreateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// CreateShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateShareExecute(r ApiCreateShareRequest) (*CreateShareResponse, error) { + if a.CreateShareExecuteMock == nil { + var localVarReturnValue *CreateShareResponse + return localVarReturnValue, nil + } + + return (*a.CreateShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateShareExportPolicy(ctx context.Context, projectId string, region string) ApiCreateShareExportPolicyRequest { + return ApiCreateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateShareExportPolicyExecute(r ApiCreateShareExportPolicyRequest) (*CreateShareExportPolicyResponse, error) { + if a.CreateShareExportPolicyExecuteMock == nil { + var localVarReturnValue *CreateShareExportPolicyResponse + return localVarReturnValue, nil + } + + return (*a.CreateShareExportPolicyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiDeleteResourcePoolRequest { + return ApiDeleteResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// DeleteResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteResourcePoolExecute(r ApiDeleteResourcePoolRequest) (map[string]interface{}, error) { + if a.DeleteResourcePoolExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiDeleteResourcePoolSnapshotRequest { + return ApiDeleteResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// DeleteResourcePoolSnapshotExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteResourcePoolSnapshotExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteResourcePoolSnapshotExecute(r ApiDeleteResourcePoolSnapshotRequest) (map[string]interface{}, error) { + if a.DeleteResourcePoolSnapshotExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteResourcePoolSnapshotExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiDeleteShareRequest { + return ApiDeleteShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// DeleteShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteShareExecute(r ApiDeleteShareRequest) (map[string]interface{}, error) { + if a.DeleteShareExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiDeleteShareExportPolicyRequest { + return ApiDeleteShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// DeleteShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteShareExportPolicyExecute(r ApiDeleteShareExportPolicyRequest) (map[string]interface{}, error) { + if a.DeleteShareExportPolicyExecuteMock == nil { + var localVarReturnValue map[string]interface{} + return localVarReturnValue, nil + } + + return (*a.DeleteShareExportPolicyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiGetResourcePoolRequest { + return ApiGetResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// GetResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetResourcePoolExecute(r ApiGetResourcePoolRequest) (*GetResourcePoolResponse, error) { + if a.GetResourcePoolExecuteMock == nil { + var localVarReturnValue *GetResourcePoolResponse + return localVarReturnValue, nil + } + + return (*a.GetResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetResourcePoolSnapshot(ctx context.Context, projectId string, region string, resourcePoolId string, snapshotName string) ApiGetResourcePoolSnapshotRequest { + return ApiGetResourcePoolSnapshotRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + snapshotName: snapshotName, + } +} + +// GetResourcePoolSnapshotExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetResourcePoolSnapshotExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetResourcePoolSnapshotExecute(r ApiGetResourcePoolSnapshotRequest) (*GetResourcePoolSnapshotResponse, error) { + if a.GetResourcePoolSnapshotExecuteMock == nil { + var localVarReturnValue *GetResourcePoolSnapshotResponse + return localVarReturnValue, nil + } + + return (*a.GetResourcePoolSnapshotExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiGetShareRequest { + return ApiGetShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// GetShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetShareExecute(r ApiGetShareRequest) (*GetShareResponse, error) { + if a.GetShareExecuteMock == nil { + var localVarReturnValue *GetShareResponse + return localVarReturnValue, nil + } + + return (*a.GetShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiGetShareExportPolicyRequest { + return ApiGetShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// GetShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetShareExportPolicyExecute(r ApiGetShareExportPolicyRequest) (*GetShareExportPolicyResponse, error) { + if a.GetShareExportPolicyExecuteMock == nil { + var localVarReturnValue *GetShareExportPolicyResponse + return localVarReturnValue, nil + } + + return (*a.GetShareExportPolicyExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListPerformanceClasses(ctx context.Context) ApiListPerformanceClassesRequest { + return ApiListPerformanceClassesRequest{ + ApiService: a, + ctx: ctx, + } +} + +// ListPerformanceClassesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListPerformanceClassesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListPerformanceClassesExecute(r ApiListPerformanceClassesRequest) (*ListPerformanceClassesResponse, error) { + if a.ListPerformanceClassesExecuteMock == nil { + var localVarReturnValue *ListPerformanceClassesResponse + return localVarReturnValue, nil + } + + return (*a.ListPerformanceClassesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListResourcePoolSnapshots(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListResourcePoolSnapshotsRequest { + return ApiListResourcePoolSnapshotsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// ListResourcePoolSnapshotsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListResourcePoolSnapshotsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListResourcePoolSnapshotsExecute(r ApiListResourcePoolSnapshotsRequest) (*ListResourcePoolSnapshotsResponse, error) { + if a.ListResourcePoolSnapshotsExecuteMock == nil { + var localVarReturnValue *ListResourcePoolSnapshotsResponse + return localVarReturnValue, nil + } + + return (*a.ListResourcePoolSnapshotsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListResourcePools(ctx context.Context, projectId string, region string) ApiListResourcePoolsRequest { + return ApiListResourcePoolsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListResourcePoolsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListResourcePoolsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListResourcePoolsExecute(r ApiListResourcePoolsRequest) (*ListResourcePoolsResponse, error) { + if a.ListResourcePoolsExecuteMock == nil { + var localVarReturnValue *ListResourcePoolsResponse + return localVarReturnValue, nil + } + + return (*a.ListResourcePoolsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListShareExportPolicies(ctx context.Context, projectId string, region string) ApiListShareExportPoliciesRequest { + return ApiListShareExportPoliciesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListShareExportPoliciesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListShareExportPoliciesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListShareExportPoliciesExecute(r ApiListShareExportPoliciesRequest) (*ListShareExportPoliciesResponse, error) { + if a.ListShareExportPoliciesExecuteMock == nil { + var localVarReturnValue *ListShareExportPoliciesResponse + return localVarReturnValue, nil + } + + return (*a.ListShareExportPoliciesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListShares(ctx context.Context, projectId string, region string, resourcePoolId string) ApiListSharesRequest { + return ApiListSharesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// ListSharesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListSharesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListSharesExecute(r ApiListSharesRequest) (*ListSharesResponse, error) { + if a.ListSharesExecuteMock == nil { + var localVarReturnValue *ListSharesResponse + return localVarReturnValue, nil + } + + return (*a.ListSharesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListSnapshotSchedules(ctx context.Context, projectId string) ApiListSnapshotSchedulesRequest { + return ApiListSnapshotSchedulesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListSnapshotSchedulesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListSnapshotSchedulesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListSnapshotSchedulesExecute(r ApiListSnapshotSchedulesRequest) (*ListSnapshotSchedulesResponse, error) { + if a.ListSnapshotSchedulesExecuteMock == nil { + var localVarReturnValue *ListSnapshotSchedulesResponse + return localVarReturnValue, nil + } + + return (*a.ListSnapshotSchedulesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateResourcePool(ctx context.Context, projectId string, region string, resourcePoolId string) ApiUpdateResourcePoolRequest { + return ApiUpdateResourcePoolRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + } +} + +// UpdateResourcePoolExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateResourcePoolExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateResourcePoolExecute(r ApiUpdateResourcePoolRequest) (*UpdateResourcePoolResponse, error) { + if a.UpdateResourcePoolExecuteMock == nil { + var localVarReturnValue *UpdateResourcePoolResponse + return localVarReturnValue, nil + } + + return (*a.UpdateResourcePoolExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateShare(ctx context.Context, projectId string, region string, resourcePoolId string, shareId string) ApiUpdateShareRequest { + return ApiUpdateShareRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + resourcePoolId: resourcePoolId, + shareId: shareId, + } +} + +// UpdateShareExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateShareExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateShareExecute(r ApiUpdateShareRequest) (*UpdateShareResponse, error) { + if a.UpdateShareExecuteMock == nil { + var localVarReturnValue *UpdateShareResponse + return localVarReturnValue, nil + } + + return (*a.UpdateShareExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateShareExportPolicy(ctx context.Context, projectId string, region string, policyId string) ApiUpdateShareExportPolicyRequest { + return ApiUpdateShareExportPolicyRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + policyId: policyId, + } +} + +// UpdateShareExportPolicyExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateShareExportPolicyExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateShareExportPolicyExecute(r ApiUpdateShareExportPolicyRequest) (*UpdateShareExportPolicyResponse, error) { + if a.UpdateShareExportPolicyExecuteMock == nil { + var localVarReturnValue *UpdateShareExportPolicyResponse + return localVarReturnValue, nil + } + + return (*a.UpdateShareExportPolicyExecuteMock)(r) +} diff --git a/services/sfs/v1betaapi/client.go b/services/sfs/v1betaapi/client.go new file mode 100644 index 000000000..5eca81e60 --- /dev/null +++ b/services/sfs/v1betaapi/client.go @@ -0,0 +1,658 @@ +/* +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 v1betaapi + +import ( + "bytes" + "context" + "encoding/json" + "encoding/xml" + "errors" + "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)/(?:[^;]+\+)?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. + + // API Services + + DefaultAPI DefaultAPI +} + +type service struct { + client *APIClient +} + +// NewAPIClient creates a new API client. Requires a userAgent string describing your application. +// optionally a custom http.Client to allow for advanced features such as caching. +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 + + // API Services + 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 { + if actualObj, ok := obj.(interface{ GetActualInstanceValue() interface{} }); ok { + return fmt.Sprintf("%v", actualObj.GetActualInstanceValue()) + } + + 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{}, style string, 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, style, collectionType) + return + } + if t, ok := obj.(time.Time); ok { + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, t.Format(time.RFC3339Nano), style, 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) + var keyPrefixForCollectionType = keyPrefix + if style == "deepObject" { + keyPrefixForCollectionType = keyPrefix + "[" + strconv.Itoa(i) + "]" + } + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefixForCollectionType, arrayValue.Interface(), style, 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(), style, collectionType) + } + return + + case reflect.Interface: + fallthrough + case reflect.Ptr: + parameterAddToHeaderOrQuery(headerOrQueryParams, keyPrefix, v.Elem().Interface(), style, 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 postBody != nil { + 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, errors.New("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, errors.New("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 errors.New("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 errors.New("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 +} + +// 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) { + var bs []byte + bs, err = xml.Marshal(body) + if err == nil { + bodyBuf.Write(bs) + } + } + + if err != nil { + return nil, err + } + + if bodyBuf.Len() == 0 { + err = fmt.Errorf("invalid body type %s\n", 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) +} + +// format error message using title and detail when model implements rfc7807 +func formatErrorMessage(status string, v interface{}) string { + str := "" + metaValue := reflect.ValueOf(v).Elem() + + if metaValue.Kind() == reflect.Struct { + field := metaValue.FieldByName("Title") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s", field.Interface()) + } + + field = metaValue.FieldByName("Detail") + if field != (reflect.Value{}) { + str = fmt.Sprintf("%s (%s)", str, field.Interface()) + } + } + + return strings.TrimSpace(fmt.Sprintf("%s %s", status, str)) +} diff --git a/services/sfs/v1betaapi/configuration.go b/services/sfs/v1betaapi/configuration.go new file mode 100644 index 000000000..bf8a4b754 --- /dev/null +++ b/services/sfs/v1betaapi/configuration.go @@ -0,0 +1,37 @@ +/* +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 v1betaapi + +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/sfs", + 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 +} diff --git a/services/sfs/v1betaapi/model_create_resource_pool_payload.go b/services/sfs/v1betaapi/model_create_resource_pool_payload.go new file mode 100644 index 000000000..b6477ba46 --- /dev/null +++ b/services/sfs/v1betaapi/model_create_resource_pool_payload.go @@ -0,0 +1,384 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolPayload{} + +// CreateResourcePoolPayload struct for CreateResourcePoolPayload +type CreateResourcePoolPayload struct { + // Availability zone + AvailabilityZone *string `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 []string `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 *map[string]string `json:"labels,omitempty"` + // Name of the Resource Pool + Name *string `json:"name,omitempty"` + // Name of the performance class + PerformanceClass *string `json:"performanceClass,omitempty"` + // Size of the Resource Pool (unit: gibibytes) + SizeGigabytes *int32 `json:"sizeGigabytes,omitempty"` + // (optional) Name of the Snapshot Schedule to use + SnapshotScheduleName *string `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 *bool `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() string { + if o == nil || IsNil(o.AvailabilityZone) { + var ret string + return ret + } + return *o.AvailabilityZone +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.AvailabilityZone) { + return nil, false + } + return o.AvailabilityZone, true +} + +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasAvailabilityZone() bool { + if o != nil && !IsNil(o.AvailabilityZone) { + return true + } + + return false +} + +// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. +func (o *CreateResourcePoolPayload) SetAvailabilityZone(v string) { + o.AvailabilityZone = &v +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *CreateResourcePoolPayload) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateResourcePoolPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateResourcePoolPayload) SetName(v string) { + o.Name = &v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetPerformanceClass() string { + if o == nil || IsNil(o.PerformanceClass) { + var ret string + return ret + } + return *o.PerformanceClass +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *CreateResourcePoolPayload) SetPerformanceClass(v string) { + o.PerformanceClass = &v +} + +// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetSizeGigabytes() int32 { + if o == nil || IsNil(o.SizeGigabytes) { + var ret int32 + return ret + } + return *o.SizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SizeGigabytes) { + return nil, false + } + return o.SizeGigabytes, true +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasSizeGigabytes() bool { + if o != nil && !IsNil(o.SizeGigabytes) { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given int32 and assigns it to the SizeGigabytes field. +func (o *CreateResourcePoolPayload) SetSizeGigabytes(v int32) { + o.SizeGigabytes = &v +} + +// GetSnapshotScheduleName returns the SnapshotScheduleName field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetSnapshotScheduleName() string { + if o == nil || IsNil(o.SnapshotScheduleName) { + var ret string + return ret + } + return *o.SnapshotScheduleName +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.SnapshotScheduleName) { + return nil, false + } + return o.SnapshotScheduleName, true +} + +// HasSnapshotScheduleName returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasSnapshotScheduleName() bool { + if o != nil && !IsNil(o.SnapshotScheduleName) { + return true + } + + return false +} + +// SetSnapshotScheduleName gets a reference to the given string and assigns it to the SnapshotScheduleName field. +func (o *CreateResourcePoolPayload) SetSnapshotScheduleName(v string) { + o.SnapshotScheduleName = &v +} + +// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +func (o *CreateResourcePoolPayload) GetSnapshotsAreVisible() bool { + if o == nil || IsNil(o.SnapshotsAreVisible) { + var ret bool + return ret + } + return *o.SnapshotsAreVisible +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SnapshotsAreVisible) { + return nil, false + } + return o.SnapshotsAreVisible, true +} + +// HasSnapshotsAreVisible returns a boolean if a field has been set. +func (o *CreateResourcePoolPayload) HasSnapshotsAreVisible() bool { + if o != nil && !IsNil(o.SnapshotsAreVisible) { + return true + } + + return false +} + +// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field. +func (o *CreateResourcePoolPayload) SetSnapshotsAreVisible(v bool) { + o.SnapshotsAreVisible = &v +} + +func (o CreateResourcePoolPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZone) { + toSerialize["availabilityZone"] = o.AvailabilityZone + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.SizeGigabytes) { + toSerialize["sizeGigabytes"] = o.SizeGigabytes + } + if !IsNil(o.SnapshotScheduleName) { + toSerialize["snapshotScheduleName"] = o.SnapshotScheduleName + } + if !IsNil(o.SnapshotsAreVisible) { + toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_resource_pool_response.go b/services/sfs/v1betaapi/model_create_resource_pool_response.go new file mode 100644 index 000000000..ce60ae47f --- /dev/null +++ b/services/sfs/v1betaapi/model_create_resource_pool_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolResponse{} + +// CreateResourcePoolResponse struct for CreateResourcePoolResponse +type CreateResourcePoolResponse struct { + // Created Resource Pool + ResourcePool *ResourcePool `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() ResourcePool { + if o == nil || IsNil(o.ResourcePool) { + var ret ResourcePool + return ret + } + return *o.ResourcePool +} + +// 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() (*ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePool) { + return nil, false + } + return o.ResourcePool, true +} + +// HasResourcePool returns a boolean if a field has been set. +func (o *CreateResourcePoolResponse) HasResourcePool() bool { + if o != nil && !IsNil(o.ResourcePool) { + return true + } + + return false +} + +// SetResourcePool gets a reference to the given ResourcePool and assigns it to the ResourcePool field. +func (o *CreateResourcePoolResponse) SetResourcePool(v ResourcePool) { + o.ResourcePool = &v +} + +func (o CreateResourcePoolResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePool) { + toSerialize["resourcePool"] = o.ResourcePool + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_resource_pool_snapshot_payload.go b/services/sfs/v1betaapi/model_create_resource_pool_snapshot_payload.go new file mode 100644 index 000000000..5e5f5d47a --- /dev/null +++ b/services/sfs/v1betaapi/model_create_resource_pool_snapshot_payload.go @@ -0,0 +1,173 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolSnapshotPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolSnapshotPayload{} + +// CreateResourcePoolSnapshotPayload struct for CreateResourcePoolSnapshotPayload +type CreateResourcePoolSnapshotPayload struct { + // (optional) A comment to add more information about a snapshot + Comment NullableString `json:"comment,omitempty"` + // Name of the Resource Pool Snapshot + Name *string `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() string { + if o == nil || IsNil(o.Comment.Get()) { + var ret string + return ret + } + return *o.Comment.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Comment.Get(), o.Comment.IsSet() +} + +// HasComment returns a boolean if a field has been set. +func (o *CreateResourcePoolSnapshotPayload) HasComment() bool { + if o != nil && o.Comment.IsSet() { + return true + } + + return false +} + +// SetComment gets a reference to the given NullableString and assigns it to the Comment field. +func (o *CreateResourcePoolSnapshotPayload) SetComment(v string) { + o.Comment.Set(&v) +} + +// SetCommentNil sets the value for Comment to be an explicit nil +func (o *CreateResourcePoolSnapshotPayload) SetCommentNil() { + o.Comment.Set(nil) +} + +// UnsetComment ensures that no value is present for Comment, not even an explicit nil +func (o *CreateResourcePoolSnapshotPayload) UnsetComment() { + o.Comment.Unset() +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateResourcePoolSnapshotPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateResourcePoolSnapshotPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateResourcePoolSnapshotPayload) SetName(v string) { + o.Name = &v +} + +func (o CreateResourcePoolSnapshotPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolSnapshotPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Comment.IsSet() { + toSerialize["comment"] = o.Comment.Get() + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_resource_pool_snapshot_response.go b/services/sfs/v1betaapi/model_create_resource_pool_snapshot_response.go new file mode 100644 index 000000000..fbc076332 --- /dev/null +++ b/services/sfs/v1betaapi/model_create_resource_pool_snapshot_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateResourcePoolSnapshotResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateResourcePoolSnapshotResponse{} + +// CreateResourcePoolSnapshotResponse struct for CreateResourcePoolSnapshotResponse +type CreateResourcePoolSnapshotResponse struct { + // Created Resource Pool Snapshot + ResourcePoolSnapshot *ResourcePoolSnapshot `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() ResourcePoolSnapshot { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + var ret ResourcePoolSnapshot + return ret + } + return *o.ResourcePoolSnapshot +} + +// 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() (*ResourcePoolSnapshot, bool) { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + return nil, false + } + return o.ResourcePoolSnapshot, true +} + +// HasResourcePoolSnapshot returns a boolean if a field has been set. +func (o *CreateResourcePoolSnapshotResponse) HasResourcePoolSnapshot() bool { + if o != nil && !IsNil(o.ResourcePoolSnapshot) { + return true + } + + return false +} + +// SetResourcePoolSnapshot gets a reference to the given ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshot field. +func (o *CreateResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v ResourcePoolSnapshot) { + o.ResourcePoolSnapshot = &v +} + +func (o CreateResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePoolSnapshot) { + toSerialize["resourcePoolSnapshot"] = o.ResourcePoolSnapshot + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_share_export_policy_payload.go b/services/sfs/v1betaapi/model_create_share_export_policy_payload.go new file mode 100644 index 000000000..b2cf0c279 --- /dev/null +++ b/services/sfs/v1betaapi/model_create_share_export_policy_payload.go @@ -0,0 +1,199 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateShareExportPolicyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareExportPolicyPayload{} + +// 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 *map[string]string `json:"labels,omitempty"` + // Name of the Share Export Policy + Name *string `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 []CreateShareExportPolicyRequestRule `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() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateShareExportPolicyPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateShareExportPolicyPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateShareExportPolicyPayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateShareExportPolicyPayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateShareExportPolicyPayload) SetName(v string) { + o.Name = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *CreateShareExportPolicyPayload) GetRules() []CreateShareExportPolicyRequestRule { + if o == nil || IsNil(o.Rules) { + var ret []CreateShareExportPolicyRequestRule + return ret + } + return o.Rules +} + +// 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() ([]CreateShareExportPolicyRequestRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *CreateShareExportPolicyPayload) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []CreateShareExportPolicyRequestRule and assigns it to the Rules field. +func (o *CreateShareExportPolicyPayload) SetRules(v []CreateShareExportPolicyRequestRule) { + o.Rules = v +} + +func (o CreateShareExportPolicyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_share_export_policy_request_rule.go b/services/sfs/v1betaapi/model_create_share_export_policy_request_rule.go new file mode 100644 index 000000000..3890f9d69 --- /dev/null +++ b/services/sfs/v1betaapi/model_create_share_export_policy_request_rule.go @@ -0,0 +1,333 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateShareExportPolicyRequestRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareExportPolicyRequestRule{} + +// CreateShareExportPolicyRequestRule struct for CreateShareExportPolicyRequestRule +type CreateShareExportPolicyRequestRule struct { + // Description of the Rule (optional) + Description NullableString `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 []string `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 + Order *int32 `json:"order,omitempty"` + // Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false + ReadOnly *bool `json:"readOnly,omitempty"` + // Flag to honor set UUID Default: false + SetUuid *bool `json:"setUuid,omitempty"` + // Flag to indicate if client IPs matching this rule have root access on the Share Default: true + SuperUser *bool `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{} + var readOnly bool = false + this.ReadOnly = &readOnly + var setUuid bool = false + this.SetUuid = &setUuid + var superUser bool = true + this.SuperUser = &superUser + 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() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *CreateShareExportPolicyRequestRule) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *CreateShareExportPolicyRequestRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *CreateShareExportPolicyRequestRule) UnsetDescription() { + o.Description.Unset() +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *CreateShareExportPolicyRequestRule) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *CreateShareExportPolicyRequestRule) SetOrder(v int32) { + o.Order = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *CreateShareExportPolicyRequestRule) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetSetUuid returns the SetUuid field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetSetUuid() bool { + if o == nil || IsNil(o.SetUuid) { + var ret bool + return ret + } + return *o.SetUuid +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SetUuid) { + return nil, false + } + return o.SetUuid, true +} + +// HasSetUuid returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasSetUuid() bool { + if o != nil && !IsNil(o.SetUuid) { + return true + } + + return false +} + +// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field. +func (o *CreateShareExportPolicyRequestRule) SetSetUuid(v bool) { + o.SetUuid = &v +} + +// GetSuperUser returns the SuperUser field value if set, zero value otherwise. +func (o *CreateShareExportPolicyRequestRule) GetSuperUser() bool { + if o == nil || IsNil(o.SuperUser) { + var ret bool + return ret + } + return *o.SuperUser +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SuperUser) { + return nil, false + } + return o.SuperUser, true +} + +// HasSuperUser returns a boolean if a field has been set. +func (o *CreateShareExportPolicyRequestRule) HasSuperUser() bool { + if o != nil && !IsNil(o.SuperUser) { + return true + } + + return false +} + +// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field. +func (o *CreateShareExportPolicyRequestRule) SetSuperUser(v bool) { + o.SuperUser = &v +} + +func (o CreateShareExportPolicyRequestRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareExportPolicyRequestRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.SetUuid) { + toSerialize["setUuid"] = o.SetUuid + } + if !IsNil(o.SuperUser) { + toSerialize["superUser"] = o.SuperUser + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_share_export_policy_response.go b/services/sfs/v1betaapi/model_create_share_export_policy_response.go new file mode 100644 index 000000000..0fa3ac6e8 --- /dev/null +++ b/services/sfs/v1betaapi/model_create_share_export_policy_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateShareExportPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareExportPolicyResponse{} + +// CreateShareExportPolicyResponse struct for CreateShareExportPolicyResponse +type CreateShareExportPolicyResponse struct { + // Created Share Export Policy + ShareExportPolicy *ShareExportPolicy `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() ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicy) { + var ret ShareExportPolicy + return ret + } + return *o.ShareExportPolicy +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicy) { + return nil, false + } + return o.ShareExportPolicy, true +} + +// HasShareExportPolicy returns a boolean if a field has been set. +func (o *CreateShareExportPolicyResponse) HasShareExportPolicy() bool { + if o != nil && !IsNil(o.ShareExportPolicy) { + return true + } + + return false +} + +// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field. +func (o *CreateShareExportPolicyResponse) SetShareExportPolicy(v ShareExportPolicy) { + o.ShareExportPolicy = &v +} + +func (o CreateShareExportPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicy) { + toSerialize["shareExportPolicy"] = o.ShareExportPolicy + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_share_payload.go b/services/sfs/v1betaapi/model_create_share_payload.go new file mode 100644 index 000000000..da1e823da --- /dev/null +++ b/services/sfs/v1betaapi/model_create_share_payload.go @@ -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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateSharePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateSharePayload{} + +// 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 NullableString `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 *map[string]string `json:"labels,omitempty"` + // Name of the Share + Name *string `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) + SpaceHardLimitGigabytes *int32 `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() string { + if o == nil || IsNil(o.ExportPolicyName.Get()) { + var ret string + return ret + } + return *o.ExportPolicyName.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExportPolicyName.Get(), o.ExportPolicyName.IsSet() +} + +// HasExportPolicyName returns a boolean if a field has been set. +func (o *CreateSharePayload) HasExportPolicyName() bool { + if o != nil && o.ExportPolicyName.IsSet() { + return true + } + + return false +} + +// SetExportPolicyName gets a reference to the given NullableString and assigns it to the ExportPolicyName field. +func (o *CreateSharePayload) SetExportPolicyName(v string) { + o.ExportPolicyName.Set(&v) +} + +// SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil +func (o *CreateSharePayload) SetExportPolicyNameNil() { + o.ExportPolicyName.Set(nil) +} + +// UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil +func (o *CreateSharePayload) UnsetExportPolicyName() { + o.ExportPolicyName.Unset() +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateSharePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreateSharePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *CreateSharePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *CreateSharePayload) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *CreateSharePayload) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *CreateSharePayload) SetName(v string) { + o.Name = &v +} + +// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +func (o *CreateSharePayload) GetSpaceHardLimitGigabytes() int32 { + if o == nil || IsNil(o.SpaceHardLimitGigabytes) { + var ret int32 + return ret + } + return *o.SpaceHardLimitGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SpaceHardLimitGigabytes) { + return nil, false + } + return o.SpaceHardLimitGigabytes, true +} + +// HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +func (o *CreateSharePayload) HasSpaceHardLimitGigabytes() bool { + if o != nil && !IsNil(o.SpaceHardLimitGigabytes) { + return true + } + + return false +} + +// SetSpaceHardLimitGigabytes gets a reference to the given int32 and assigns it to the SpaceHardLimitGigabytes field. +func (o *CreateSharePayload) SetSpaceHardLimitGigabytes(v int32) { + o.SpaceHardLimitGigabytes = &v +} + +func (o CreateSharePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateSharePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ExportPolicyName.IsSet() { + toSerialize["exportPolicyName"] = o.ExportPolicyName.Get() + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SpaceHardLimitGigabytes) { + toSerialize["spaceHardLimitGigabytes"] = o.SpaceHardLimitGigabytes + } + 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) +} diff --git a/services/sfs/v1betaapi/model_create_share_response.go b/services/sfs/v1betaapi/model_create_share_response.go new file mode 100644 index 000000000..d729cd12f --- /dev/null +++ b/services/sfs/v1betaapi/model_create_share_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the CreateShareResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateShareResponse{} + +// CreateShareResponse struct for CreateShareResponse +type CreateShareResponse struct { + // Created Share + Share *Share `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() Share { + if o == nil || IsNil(o.Share) { + var ret Share + return ret + } + return *o.Share +} + +// 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() (*Share, bool) { + if o == nil || IsNil(o.Share) { + return nil, false + } + return o.Share, true +} + +// HasShare returns a boolean if a field has been set. +func (o *CreateShareResponse) HasShare() bool { + if o != nil && !IsNil(o.Share) { + return true + } + + return false +} + +// SetShare gets a reference to the given Share and assigns it to the Share field. +func (o *CreateShareResponse) SetShare(v Share) { + o.Share = &v +} + +func (o CreateShareResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateShareResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Share) { + toSerialize["share"] = o.Share + } + 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) +} diff --git a/services/sfs/v1betaapi/model_error.go b/services/sfs/v1betaapi/model_error.go new file mode 100644 index 000000000..03c0b97a6 --- /dev/null +++ b/services/sfs/v1betaapi/model_error.go @@ -0,0 +1,228 @@ +/* +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 v1betaapi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + // Human-readable string of the error that occured + // Deprecated + ErrorDescription interface{} `json:"error_description,omitempty"` + // Human-readable description of the error that occurred. + Title string `json:"title"` + // URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/ e.g. storage.stackit.cloud/validation-error + Type string `json:"type"` +} + +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 string, types string) *Error { + this := Error{} + this.Title = title + 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() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.ErrorDescription +} + +// 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() (*interface{}, bool) { + if o == nil || IsNil(o.ErrorDescription) { + return nil, false + } + return &o.ErrorDescription, true +} + +// HasErrorDescription returns a boolean if a field has been set. +func (o *Error) HasErrorDescription() bool { + if o != nil && !IsNil(o.ErrorDescription) { + return true + } + + return false +} + +// SetErrorDescription gets a reference to the given interface{} and assigns it to the ErrorDescription field. +// Deprecated +func (o *Error) SetErrorDescription(v interface{}) { + o.ErrorDescription = v +} + +// GetTitle returns the Title field value +func (o *Error) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *Error) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *Error) SetTitle(v string) { + o.Title = v +} + +// GetType returns the Type field value +func (o *Error) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *Error) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *Error) SetType(v string) { + o.Type = v +} + +func (o Error) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Error) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ErrorDescription != nil { + toSerialize["error_description"] = o.ErrorDescription + } + toSerialize["title"] = o.Title + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *Error) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "title", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varError := _Error{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varError) + + if err != nil { + return err + } + + *o = Error(varError) + + return err +} + +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) +} diff --git a/services/sfs/v1betaapi/model_get_resource_pool_response.go b/services/sfs/v1betaapi/model_get_resource_pool_response.go new file mode 100644 index 000000000..eb3a13d09 --- /dev/null +++ b/services/sfs/v1betaapi/model_get_resource_pool_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the GetResourcePoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetResourcePoolResponse{} + +// GetResourcePoolResponse struct for GetResourcePoolResponse +type GetResourcePoolResponse struct { + // Resource Pool + ResourcePool *ResourcePool `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() ResourcePool { + if o == nil || IsNil(o.ResourcePool) { + var ret ResourcePool + return ret + } + return *o.ResourcePool +} + +// 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() (*ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePool) { + return nil, false + } + return o.ResourcePool, true +} + +// HasResourcePool returns a boolean if a field has been set. +func (o *GetResourcePoolResponse) HasResourcePool() bool { + if o != nil && !IsNil(o.ResourcePool) { + return true + } + + return false +} + +// SetResourcePool gets a reference to the given ResourcePool and assigns it to the ResourcePool field. +func (o *GetResourcePoolResponse) SetResourcePool(v ResourcePool) { + o.ResourcePool = &v +} + +func (o GetResourcePoolResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetResourcePoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePool) { + toSerialize["resourcePool"] = o.ResourcePool + } + 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) +} diff --git a/services/sfs/v1betaapi/model_get_resource_pool_snapshot_response.go b/services/sfs/v1betaapi/model_get_resource_pool_snapshot_response.go new file mode 100644 index 000000000..84a8dad0b --- /dev/null +++ b/services/sfs/v1betaapi/model_get_resource_pool_snapshot_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the GetResourcePoolSnapshotResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetResourcePoolSnapshotResponse{} + +// GetResourcePoolSnapshotResponse struct for GetResourcePoolSnapshotResponse +type GetResourcePoolSnapshotResponse struct { + // Resource Pool Snapshot + ResourcePoolSnapshot *ResourcePoolSnapshot `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() ResourcePoolSnapshot { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + var ret ResourcePoolSnapshot + return ret + } + return *o.ResourcePoolSnapshot +} + +// 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() (*ResourcePoolSnapshot, bool) { + if o == nil || IsNil(o.ResourcePoolSnapshot) { + return nil, false + } + return o.ResourcePoolSnapshot, true +} + +// HasResourcePoolSnapshot returns a boolean if a field has been set. +func (o *GetResourcePoolSnapshotResponse) HasResourcePoolSnapshot() bool { + if o != nil && !IsNil(o.ResourcePoolSnapshot) { + return true + } + + return false +} + +// SetResourcePoolSnapshot gets a reference to the given ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshot field. +func (o *GetResourcePoolSnapshotResponse) SetResourcePoolSnapshot(v ResourcePoolSnapshot) { + o.ResourcePoolSnapshot = &v +} + +func (o GetResourcePoolSnapshotResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetResourcePoolSnapshotResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePoolSnapshot) { + toSerialize["resourcePoolSnapshot"] = o.ResourcePoolSnapshot + } + 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) +} diff --git a/services/sfs/v1betaapi/model_get_share_export_policy_response.go b/services/sfs/v1betaapi/model_get_share_export_policy_response.go new file mode 100644 index 000000000..62b0bd803 --- /dev/null +++ b/services/sfs/v1betaapi/model_get_share_export_policy_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the GetShareExportPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetShareExportPolicyResponse{} + +// GetShareExportPolicyResponse struct for GetShareExportPolicyResponse +type GetShareExportPolicyResponse struct { + // Share Export Policies + ShareExportPolicy *ShareExportPolicy `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() ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicy) { + var ret ShareExportPolicy + return ret + } + return *o.ShareExportPolicy +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicy) { + return nil, false + } + return o.ShareExportPolicy, true +} + +// HasShareExportPolicy returns a boolean if a field has been set. +func (o *GetShareExportPolicyResponse) HasShareExportPolicy() bool { + if o != nil && !IsNil(o.ShareExportPolicy) { + return true + } + + return false +} + +// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field. +func (o *GetShareExportPolicyResponse) SetShareExportPolicy(v ShareExportPolicy) { + o.ShareExportPolicy = &v +} + +func (o GetShareExportPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicy) { + toSerialize["shareExportPolicy"] = o.ShareExportPolicy + } + 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) +} diff --git a/services/sfs/v1betaapi/model_get_share_response.go b/services/sfs/v1betaapi/model_get_share_response.go new file mode 100644 index 000000000..a1350b938 --- /dev/null +++ b/services/sfs/v1betaapi/model_get_share_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the GetShareResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetShareResponse{} + +// GetShareResponse struct for GetShareResponse +type GetShareResponse struct { + // Share + Share *Share `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() Share { + if o == nil || IsNil(o.Share) { + var ret Share + return ret + } + return *o.Share +} + +// 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() (*Share, bool) { + if o == nil || IsNil(o.Share) { + return nil, false + } + return o.Share, true +} + +// HasShare returns a boolean if a field has been set. +func (o *GetShareResponse) HasShare() bool { + if o != nil && !IsNil(o.Share) { + return true + } + + return false +} + +// SetShare gets a reference to the given Share and assigns it to the Share field. +func (o *GetShareResponse) SetShare(v Share) { + o.Share = &v +} + +func (o GetShareResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetShareResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Share) { + toSerialize["share"] = o.Share + } + 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) +} diff --git a/services/sfs/v1betaapi/model_google_protobuf_any.go b/services/sfs/v1betaapi/model_google_protobuf_any.go new file mode 100644 index 000000000..028c95f65 --- /dev/null +++ b/services/sfs/v1betaapi/model_google_protobuf_any.go @@ -0,0 +1,154 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the GoogleProtobufAny type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GoogleProtobufAny{} + +// 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 *string `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() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *GoogleProtobufAny) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *GoogleProtobufAny) SetType(v string) { + o.Type = &v +} + +func (o GoogleProtobufAny) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GoogleProtobufAny) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Type) { + toSerialize["@type"] = o.Type + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *GoogleProtobufAny) UnmarshalJSON(data []byte) (err error) { + varGoogleProtobufAny := _GoogleProtobufAny{} + + err = json.Unmarshal(data, &varGoogleProtobufAny) + + if err != nil { + return err + } + + *o = GoogleProtobufAny(varGoogleProtobufAny) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "@type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +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) +} diff --git a/services/sfs/v1betaapi/model_list_performance_classes_response.go b/services/sfs/v1betaapi/model_list_performance_classes_response.go new file mode 100644 index 000000000..1639b85f4 --- /dev/null +++ b/services/sfs/v1betaapi/model_list_performance_classes_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ListPerformanceClassesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListPerformanceClassesResponse{} + +// ListPerformanceClassesResponse struct for ListPerformanceClassesResponse +type ListPerformanceClassesResponse struct { + // List of Performance Classes + PerformanceClasses []PerformanceClass `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() []PerformanceClass { + if o == nil || IsNil(o.PerformanceClasses) { + var ret []PerformanceClass + return ret + } + return o.PerformanceClasses +} + +// 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() ([]PerformanceClass, bool) { + if o == nil || IsNil(o.PerformanceClasses) { + return nil, false + } + return o.PerformanceClasses, true +} + +// HasPerformanceClasses returns a boolean if a field has been set. +func (o *ListPerformanceClassesResponse) HasPerformanceClasses() bool { + if o != nil && !IsNil(o.PerformanceClasses) { + return true + } + + return false +} + +// SetPerformanceClasses gets a reference to the given []PerformanceClass and assigns it to the PerformanceClasses field. +func (o *ListPerformanceClassesResponse) SetPerformanceClasses(v []PerformanceClass) { + o.PerformanceClasses = v +} + +func (o ListPerformanceClassesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListPerformanceClassesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.PerformanceClasses) { + toSerialize["performanceClasses"] = o.PerformanceClasses + } + 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) +} diff --git a/services/sfs/v1betaapi/model_list_resource_pool_snapshots_response.go b/services/sfs/v1betaapi/model_list_resource_pool_snapshots_response.go new file mode 100644 index 000000000..fd176d2b0 --- /dev/null +++ b/services/sfs/v1betaapi/model_list_resource_pool_snapshots_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ListResourcePoolSnapshotsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListResourcePoolSnapshotsResponse{} + +// ListResourcePoolSnapshotsResponse struct for ListResourcePoolSnapshotsResponse +type ListResourcePoolSnapshotsResponse struct { + // List of Resource Pool Snapshots + ResourcePoolSnapshots []ResourcePoolSnapshot `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() []ResourcePoolSnapshot { + if o == nil || IsNil(o.ResourcePoolSnapshots) { + var ret []ResourcePoolSnapshot + return ret + } + return o.ResourcePoolSnapshots +} + +// 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() ([]ResourcePoolSnapshot, bool) { + if o == nil || IsNil(o.ResourcePoolSnapshots) { + return nil, false + } + return o.ResourcePoolSnapshots, true +} + +// HasResourcePoolSnapshots returns a boolean if a field has been set. +func (o *ListResourcePoolSnapshotsResponse) HasResourcePoolSnapshots() bool { + if o != nil && !IsNil(o.ResourcePoolSnapshots) { + return true + } + + return false +} + +// SetResourcePoolSnapshots gets a reference to the given []ResourcePoolSnapshot and assigns it to the ResourcePoolSnapshots field. +func (o *ListResourcePoolSnapshotsResponse) SetResourcePoolSnapshots(v []ResourcePoolSnapshot) { + o.ResourcePoolSnapshots = v +} + +func (o ListResourcePoolSnapshotsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListResourcePoolSnapshotsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePoolSnapshots) { + toSerialize["resourcePoolSnapshots"] = o.ResourcePoolSnapshots + } + 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) +} diff --git a/services/sfs/v1betaapi/model_list_resource_pools_response.go b/services/sfs/v1betaapi/model_list_resource_pools_response.go new file mode 100644 index 000000000..01cd2ffb4 --- /dev/null +++ b/services/sfs/v1betaapi/model_list_resource_pools_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ListResourcePoolsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListResourcePoolsResponse{} + +// ListResourcePoolsResponse struct for ListResourcePoolsResponse +type ListResourcePoolsResponse struct { + // List of Resource Pools + ResourcePools []ResourcePool `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() []ResourcePool { + if o == nil || IsNil(o.ResourcePools) { + var ret []ResourcePool + return ret + } + return o.ResourcePools +} + +// 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() ([]ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePools) { + return nil, false + } + return o.ResourcePools, true +} + +// HasResourcePools returns a boolean if a field has been set. +func (o *ListResourcePoolsResponse) HasResourcePools() bool { + if o != nil && !IsNil(o.ResourcePools) { + return true + } + + return false +} + +// SetResourcePools gets a reference to the given []ResourcePool and assigns it to the ResourcePools field. +func (o *ListResourcePoolsResponse) SetResourcePools(v []ResourcePool) { + o.ResourcePools = v +} + +func (o ListResourcePoolsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListResourcePoolsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePools) { + toSerialize["resourcePools"] = o.ResourcePools + } + 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) +} diff --git a/services/sfs/v1betaapi/model_list_share_export_policies_response.go b/services/sfs/v1betaapi/model_list_share_export_policies_response.go new file mode 100644 index 000000000..d09eff793 --- /dev/null +++ b/services/sfs/v1betaapi/model_list_share_export_policies_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ListShareExportPoliciesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListShareExportPoliciesResponse{} + +// ListShareExportPoliciesResponse struct for ListShareExportPoliciesResponse +type ListShareExportPoliciesResponse struct { + // List of Share Export Policies + ShareExportPolicies []ShareExportPolicy `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() []ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicies) { + var ret []ShareExportPolicy + return ret + } + return o.ShareExportPolicies +} + +// 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() ([]ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicies) { + return nil, false + } + return o.ShareExportPolicies, true +} + +// HasShareExportPolicies returns a boolean if a field has been set. +func (o *ListShareExportPoliciesResponse) HasShareExportPolicies() bool { + if o != nil && !IsNil(o.ShareExportPolicies) { + return true + } + + return false +} + +// SetShareExportPolicies gets a reference to the given []ShareExportPolicy and assigns it to the ShareExportPolicies field. +func (o *ListShareExportPoliciesResponse) SetShareExportPolicies(v []ShareExportPolicy) { + o.ShareExportPolicies = v +} + +func (o ListShareExportPoliciesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListShareExportPoliciesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicies) { + toSerialize["shareExportPolicies"] = o.ShareExportPolicies + } + 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) +} diff --git a/services/sfs/v1betaapi/model_list_shares_response.go b/services/sfs/v1betaapi/model_list_shares_response.go new file mode 100644 index 000000000..55c83e8f3 --- /dev/null +++ b/services/sfs/v1betaapi/model_list_shares_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ListSharesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListSharesResponse{} + +// ListSharesResponse struct for ListSharesResponse +type ListSharesResponse struct { + // List of Shares + Shares []Share `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() []Share { + if o == nil || IsNil(o.Shares) { + var ret []Share + return ret + } + return o.Shares +} + +// 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() ([]Share, bool) { + if o == nil || IsNil(o.Shares) { + return nil, false + } + return o.Shares, true +} + +// HasShares returns a boolean if a field has been set. +func (o *ListSharesResponse) HasShares() bool { + if o != nil && !IsNil(o.Shares) { + return true + } + + return false +} + +// SetShares gets a reference to the given []Share and assigns it to the Shares field. +func (o *ListSharesResponse) SetShares(v []Share) { + o.Shares = v +} + +func (o ListSharesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListSharesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Shares) { + toSerialize["shares"] = o.Shares + } + 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) +} diff --git a/services/sfs/v1betaapi/model_list_snapshot_schedules_response.go b/services/sfs/v1betaapi/model_list_snapshot_schedules_response.go new file mode 100644 index 000000000..1db2ed848 --- /dev/null +++ b/services/sfs/v1betaapi/model_list_snapshot_schedules_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ListSnapshotSchedulesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListSnapshotSchedulesResponse{} + +// ListSnapshotSchedulesResponse struct for ListSnapshotSchedulesResponse +type ListSnapshotSchedulesResponse struct { + // List of Snapshot Schedules + SnapshotSchedules []SnapshotSchedule `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() []SnapshotSchedule { + if o == nil || IsNil(o.SnapshotSchedules) { + var ret []SnapshotSchedule + return ret + } + return o.SnapshotSchedules +} + +// 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() ([]SnapshotSchedule, bool) { + if o == nil || IsNil(o.SnapshotSchedules) { + return nil, false + } + return o.SnapshotSchedules, true +} + +// HasSnapshotSchedules returns a boolean if a field has been set. +func (o *ListSnapshotSchedulesResponse) HasSnapshotSchedules() bool { + if o != nil && !IsNil(o.SnapshotSchedules) { + return true + } + + return false +} + +// SetSnapshotSchedules gets a reference to the given []SnapshotSchedule and assigns it to the SnapshotSchedules field. +func (o *ListSnapshotSchedulesResponse) SetSnapshotSchedules(v []SnapshotSchedule) { + o.SnapshotSchedules = v +} + +func (o ListSnapshotSchedulesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListSnapshotSchedulesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SnapshotSchedules) { + toSerialize["snapshotSchedules"] = o.SnapshotSchedules + } + 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) +} diff --git a/services/sfs/v1betaapi/model_performance_class.go b/services/sfs/v1betaapi/model_performance_class.go new file mode 100644 index 000000000..a8aaedbcd --- /dev/null +++ b/services/sfs/v1betaapi/model_performance_class.go @@ -0,0 +1,199 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the PerformanceClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PerformanceClass{} + +// PerformanceClass struct for PerformanceClass +type PerformanceClass struct { + // IOPS of the Performance Class + Iops *int32 `json:"iops,omitempty"` + // Name of the Performance Class + Name *string `json:"name,omitempty"` + // Throughput of the Performance Class + Throughput *int32 `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() int32 { + if o == nil || IsNil(o.Iops) { + var ret int32 + return ret + } + return *o.Iops +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Iops) { + return nil, false + } + return o.Iops, true +} + +// HasIops returns a boolean if a field has been set. +func (o *PerformanceClass) HasIops() bool { + if o != nil && !IsNil(o.Iops) { + return true + } + + return false +} + +// SetIops gets a reference to the given int32 and assigns it to the Iops field. +func (o *PerformanceClass) SetIops(v int32) { + o.Iops = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PerformanceClass) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *PerformanceClass) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *PerformanceClass) SetName(v string) { + o.Name = &v +} + +// GetThroughput returns the Throughput field value if set, zero value otherwise. +func (o *PerformanceClass) GetThroughput() int32 { + if o == nil || IsNil(o.Throughput) { + var ret int32 + return ret + } + return *o.Throughput +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Throughput) { + return nil, false + } + return o.Throughput, true +} + +// HasThroughput returns a boolean if a field has been set. +func (o *PerformanceClass) HasThroughput() bool { + if o != nil && !IsNil(o.Throughput) { + return true + } + + return false +} + +// SetThroughput gets a reference to the given int32 and assigns it to the Throughput field. +func (o *PerformanceClass) SetThroughput(v int32) { + o.Throughput = &v +} + +func (o PerformanceClass) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PerformanceClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Iops) { + toSerialize["iops"] = o.Iops + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Throughput) { + toSerialize["throughput"] = o.Throughput + } + 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) +} diff --git a/services/sfs/v1betaapi/model_resource_pool.go b/services/sfs/v1betaapi/model_resource_pool.go new file mode 100644 index 000000000..073750e48 --- /dev/null +++ b/services/sfs/v1betaapi/model_resource_pool.go @@ -0,0 +1,641 @@ +/* +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 v1betaapi + +import ( + "encoding/json" + "time" +) + +// checks if the ResourcePool type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePool{} + +// ResourcePool struct for ResourcePool +type ResourcePool struct { + // Name of the respective availability zone + AvailabilityZone *string `json:"availabilityZone,omitempty"` + // Number of Shares in the Resource Pool + CountShares *int32 `json:"countShares,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // ID of the Resource Pool + Id *string `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 []string `json:"ipAcl,omitempty"` + Labels *map[string]string `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 *string `json:"mountPath,omitempty"` + // Name of the Resource Pool + Name *string `json:"name,omitempty"` + // Information about the performance class + PerformanceClass *ResourcePoolPerformanceClass `json:"performanceClass,omitempty"` + // Time when the performance class can be downgraded again. + PerformanceClassDowngradableAt *time.Time `json:"performanceClassDowngradableAt,omitempty"` + // Time when the size can be reduced again. + SizeReducibleAt *time.Time `json:"sizeReducibleAt,omitempty"` + SnapshotSchedule *SnapshotSchedule `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 *bool `json:"snapshotsAreVisible,omitempty"` + // Space information + Space *ResourcePoolSpace `json:"space,omitempty"` + // State of the Resource Pool (possible values: [\"pending\", \"creating\", \"created\", \"updating\", \"error\", \"deleting\"]) + State *string `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() string { + if o == nil || IsNil(o.AvailabilityZone) { + var ret string + return ret + } + return *o.AvailabilityZone +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.AvailabilityZone) { + return nil, false + } + return o.AvailabilityZone, true +} + +// HasAvailabilityZone returns a boolean if a field has been set. +func (o *ResourcePool) HasAvailabilityZone() bool { + if o != nil && !IsNil(o.AvailabilityZone) { + return true + } + + return false +} + +// SetAvailabilityZone gets a reference to the given string and assigns it to the AvailabilityZone field. +func (o *ResourcePool) SetAvailabilityZone(v string) { + o.AvailabilityZone = &v +} + +// GetCountShares returns the CountShares field value if set, zero value otherwise. +func (o *ResourcePool) GetCountShares() int32 { + if o == nil || IsNil(o.CountShares) { + var ret int32 + return ret + } + return *o.CountShares +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.CountShares) { + return nil, false + } + return o.CountShares, true +} + +// HasCountShares returns a boolean if a field has been set. +func (o *ResourcePool) HasCountShares() bool { + if o != nil && !IsNil(o.CountShares) { + return true + } + + return false +} + +// SetCountShares gets a reference to the given int32 and assigns it to the CountShares field. +func (o *ResourcePool) SetCountShares(v int32) { + o.CountShares = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ResourcePool) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ResourcePool) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ResourcePool) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ResourcePool) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ResourcePool) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ResourcePool) SetId(v string) { + o.Id = &v +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *ResourcePool) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *ResourcePool) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *ResourcePool) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ResourcePool) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ResourcePool) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ResourcePool) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetMountPath returns the MountPath field value if set, zero value otherwise. +func (o *ResourcePool) GetMountPath() string { + if o == nil || IsNil(o.MountPath) { + var ret string + return ret + } + return *o.MountPath +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.MountPath) { + return nil, false + } + return o.MountPath, true +} + +// HasMountPath returns a boolean if a field has been set. +func (o *ResourcePool) HasMountPath() bool { + if o != nil && !IsNil(o.MountPath) { + return true + } + + return false +} + +// SetMountPath gets a reference to the given string and assigns it to the MountPath field. +func (o *ResourcePool) SetMountPath(v string) { + o.MountPath = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ResourcePool) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ResourcePool) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ResourcePool) SetName(v string) { + o.Name = &v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *ResourcePool) GetPerformanceClass() ResourcePoolPerformanceClass { + if o == nil || IsNil(o.PerformanceClass) { + var ret ResourcePoolPerformanceClass + return ret + } + return *o.PerformanceClass +} + +// 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() (*ResourcePoolPerformanceClass, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *ResourcePool) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given ResourcePoolPerformanceClass and assigns it to the PerformanceClass field. +func (o *ResourcePool) SetPerformanceClass(v ResourcePoolPerformanceClass) { + o.PerformanceClass = &v +} + +// GetPerformanceClassDowngradableAt returns the PerformanceClassDowngradableAt field value if set, zero value otherwise. +func (o *ResourcePool) GetPerformanceClassDowngradableAt() time.Time { + if o == nil || IsNil(o.PerformanceClassDowngradableAt) { + var ret time.Time + return ret + } + return *o.PerformanceClassDowngradableAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.PerformanceClassDowngradableAt) { + return nil, false + } + return o.PerformanceClassDowngradableAt, true +} + +// HasPerformanceClassDowngradableAt returns a boolean if a field has been set. +func (o *ResourcePool) HasPerformanceClassDowngradableAt() bool { + if o != nil && !IsNil(o.PerformanceClassDowngradableAt) { + return true + } + + return false +} + +// SetPerformanceClassDowngradableAt gets a reference to the given time.Time and assigns it to the PerformanceClassDowngradableAt field. +func (o *ResourcePool) SetPerformanceClassDowngradableAt(v time.Time) { + o.PerformanceClassDowngradableAt = &v +} + +// GetSizeReducibleAt returns the SizeReducibleAt field value if set, zero value otherwise. +func (o *ResourcePool) GetSizeReducibleAt() time.Time { + if o == nil || IsNil(o.SizeReducibleAt) { + var ret time.Time + return ret + } + return *o.SizeReducibleAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.SizeReducibleAt) { + return nil, false + } + return o.SizeReducibleAt, true +} + +// HasSizeReducibleAt returns a boolean if a field has been set. +func (o *ResourcePool) HasSizeReducibleAt() bool { + if o != nil && !IsNil(o.SizeReducibleAt) { + return true + } + + return false +} + +// SetSizeReducibleAt gets a reference to the given time.Time and assigns it to the SizeReducibleAt field. +func (o *ResourcePool) SetSizeReducibleAt(v time.Time) { + o.SizeReducibleAt = &v +} + +// GetSnapshotSchedule returns the SnapshotSchedule field value if set, zero value otherwise. +func (o *ResourcePool) GetSnapshotSchedule() SnapshotSchedule { + if o == nil || IsNil(o.SnapshotSchedule) { + var ret SnapshotSchedule + return ret + } + return *o.SnapshotSchedule +} + +// 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() (*SnapshotSchedule, bool) { + if o == nil || IsNil(o.SnapshotSchedule) { + return nil, false + } + return o.SnapshotSchedule, true +} + +// HasSnapshotSchedule returns a boolean if a field has been set. +func (o *ResourcePool) HasSnapshotSchedule() bool { + if o != nil && !IsNil(o.SnapshotSchedule) { + return true + } + + return false +} + +// SetSnapshotSchedule gets a reference to the given SnapshotSchedule and assigns it to the SnapshotSchedule field. +func (o *ResourcePool) SetSnapshotSchedule(v SnapshotSchedule) { + o.SnapshotSchedule = &v +} + +// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +func (o *ResourcePool) GetSnapshotsAreVisible() bool { + if o == nil || IsNil(o.SnapshotsAreVisible) { + var ret bool + return ret + } + return *o.SnapshotsAreVisible +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SnapshotsAreVisible) { + return nil, false + } + return o.SnapshotsAreVisible, true +} + +// HasSnapshotsAreVisible returns a boolean if a field has been set. +func (o *ResourcePool) HasSnapshotsAreVisible() bool { + if o != nil && !IsNil(o.SnapshotsAreVisible) { + return true + } + + return false +} + +// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field. +func (o *ResourcePool) SetSnapshotsAreVisible(v bool) { + o.SnapshotsAreVisible = &v +} + +// GetSpace returns the Space field value if set, zero value otherwise. +func (o *ResourcePool) GetSpace() ResourcePoolSpace { + if o == nil || IsNil(o.Space) { + var ret ResourcePoolSpace + return ret + } + return *o.Space +} + +// 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() (*ResourcePoolSpace, bool) { + if o == nil || IsNil(o.Space) { + return nil, false + } + return o.Space, true +} + +// HasSpace returns a boolean if a field has been set. +func (o *ResourcePool) HasSpace() bool { + if o != nil && !IsNil(o.Space) { + return true + } + + return false +} + +// SetSpace gets a reference to the given ResourcePoolSpace and assigns it to the Space field. +func (o *ResourcePool) SetSpace(v ResourcePoolSpace) { + o.Space = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *ResourcePool) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *ResourcePool) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *ResourcePool) SetState(v string) { + o.State = &v +} + +func (o ResourcePool) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePool) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvailabilityZone) { + toSerialize["availabilityZone"] = o.AvailabilityZone + } + if !IsNil(o.CountShares) { + toSerialize["countShares"] = o.CountShares + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.MountPath) { + toSerialize["mountPath"] = o.MountPath + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if !IsNil(o.PerformanceClassDowngradableAt) { + toSerialize["performanceClassDowngradableAt"] = o.PerformanceClassDowngradableAt + } + if !IsNil(o.SizeReducibleAt) { + toSerialize["sizeReducibleAt"] = o.SizeReducibleAt + } + if !IsNil(o.SnapshotSchedule) { + toSerialize["snapshotSchedule"] = o.SnapshotSchedule + } + if !IsNil(o.SnapshotsAreVisible) { + toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible + } + if !IsNil(o.Space) { + toSerialize["space"] = o.Space + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + 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) +} diff --git a/services/sfs/v1betaapi/model_resource_pool_performance_class.go b/services/sfs/v1betaapi/model_resource_pool_performance_class.go new file mode 100644 index 000000000..db8544169 --- /dev/null +++ b/services/sfs/v1betaapi/model_resource_pool_performance_class.go @@ -0,0 +1,199 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ResourcePoolPerformanceClass type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePoolPerformanceClass{} + +// ResourcePoolPerformanceClass struct for ResourcePoolPerformanceClass +type ResourcePoolPerformanceClass struct { + // Name of the performance class + Name *string `json:"name,omitempty"` + // Max. IOPS of the Resource Pool. This is shared between every Share in the Resource Pool. + PeakIops *int32 `json:"peakIops,omitempty"` + // Throughput of the Resource Pool. + Throughput *int32 `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() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ResourcePoolPerformanceClass) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ResourcePoolPerformanceClass) SetName(v string) { + o.Name = &v +} + +// GetPeakIops returns the PeakIops field value if set, zero value otherwise. +func (o *ResourcePoolPerformanceClass) GetPeakIops() int32 { + if o == nil || IsNil(o.PeakIops) { + var ret int32 + return ret + } + return *o.PeakIops +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.PeakIops) { + return nil, false + } + return o.PeakIops, true +} + +// HasPeakIops returns a boolean if a field has been set. +func (o *ResourcePoolPerformanceClass) HasPeakIops() bool { + if o != nil && !IsNil(o.PeakIops) { + return true + } + + return false +} + +// SetPeakIops gets a reference to the given int32 and assigns it to the PeakIops field. +func (o *ResourcePoolPerformanceClass) SetPeakIops(v int32) { + o.PeakIops = &v +} + +// GetThroughput returns the Throughput field value if set, zero value otherwise. +func (o *ResourcePoolPerformanceClass) GetThroughput() int32 { + if o == nil || IsNil(o.Throughput) { + var ret int32 + return ret + } + return *o.Throughput +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Throughput) { + return nil, false + } + return o.Throughput, true +} + +// HasThroughput returns a boolean if a field has been set. +func (o *ResourcePoolPerformanceClass) HasThroughput() bool { + if o != nil && !IsNil(o.Throughput) { + return true + } + + return false +} + +// SetThroughput gets a reference to the given int32 and assigns it to the Throughput field. +func (o *ResourcePoolPerformanceClass) SetThroughput(v int32) { + o.Throughput = &v +} + +func (o ResourcePoolPerformanceClass) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePoolPerformanceClass) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.PeakIops) { + toSerialize["peakIops"] = o.PeakIops + } + if !IsNil(o.Throughput) { + toSerialize["throughput"] = o.Throughput + } + 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) +} diff --git a/services/sfs/v1betaapi/model_resource_pool_snapshot.go b/services/sfs/v1betaapi/model_resource_pool_snapshot.go new file mode 100644 index 000000000..91c250630 --- /dev/null +++ b/services/sfs/v1betaapi/model_resource_pool_snapshot.go @@ -0,0 +1,321 @@ +/* +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 v1betaapi + +import ( + "encoding/json" + "time" +) + +// checks if the ResourcePoolSnapshot type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePoolSnapshot{} + +// ResourcePoolSnapshot struct for ResourcePoolSnapshot +type ResourcePoolSnapshot struct { + // (optional) A comment to add more information about a snapshot + Comment NullableString `json:"comment,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Represents the user-visible data size at the time of the snapshot in Gibibytes (e.g. what’s in the snapshot) + LogicalSizeGigabytes *int32 `json:"logicalSizeGigabytes,omitempty"` + // ID of the Resource Pool of the Snapshot + ResourcePoolId *string `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). + SizeGigabytes *int32 `json:"sizeGigabytes,omitempty"` + // Name of the Resource Pool Snapshot + SnapshotName *string `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() string { + if o == nil || IsNil(o.Comment.Get()) { + var ret string + return ret + } + return *o.Comment.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Comment.Get(), o.Comment.IsSet() +} + +// HasComment returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasComment() bool { + if o != nil && o.Comment.IsSet() { + return true + } + + return false +} + +// SetComment gets a reference to the given NullableString and assigns it to the Comment field. +func (o *ResourcePoolSnapshot) SetComment(v string) { + o.Comment.Set(&v) +} + +// SetCommentNil sets the value for Comment to be an explicit nil +func (o *ResourcePoolSnapshot) SetCommentNil() { + o.Comment.Set(nil) +} + +// UnsetComment ensures that no value is present for Comment, not even an explicit nil +func (o *ResourcePoolSnapshot) UnsetComment() { + o.Comment.Unset() +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetCreatedAt() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ResourcePoolSnapshot) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetLogicalSizeGigabytes returns the LogicalSizeGigabytes field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetLogicalSizeGigabytes() int32 { + if o == nil || IsNil(o.LogicalSizeGigabytes) { + var ret int32 + return ret + } + return *o.LogicalSizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.LogicalSizeGigabytes) { + return nil, false + } + return o.LogicalSizeGigabytes, true +} + +// HasLogicalSizeGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasLogicalSizeGigabytes() bool { + if o != nil && !IsNil(o.LogicalSizeGigabytes) { + return true + } + + return false +} + +// SetLogicalSizeGigabytes gets a reference to the given int32 and assigns it to the LogicalSizeGigabytes field. +func (o *ResourcePoolSnapshot) SetLogicalSizeGigabytes(v int32) { + o.LogicalSizeGigabytes = &v +} + +// GetResourcePoolId returns the ResourcePoolId field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetResourcePoolId() string { + if o == nil || IsNil(o.ResourcePoolId) { + var ret string + return ret + } + return *o.ResourcePoolId +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.ResourcePoolId) { + return nil, false + } + return o.ResourcePoolId, true +} + +// HasResourcePoolId returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasResourcePoolId() bool { + if o != nil && !IsNil(o.ResourcePoolId) { + return true + } + + return false +} + +// SetResourcePoolId gets a reference to the given string and assigns it to the ResourcePoolId field. +func (o *ResourcePoolSnapshot) SetResourcePoolId(v string) { + o.ResourcePoolId = &v +} + +// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetSizeGigabytes() int32 { + if o == nil || IsNil(o.SizeGigabytes) { + var ret int32 + return ret + } + return *o.SizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SizeGigabytes) { + return nil, false + } + return o.SizeGigabytes, true +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasSizeGigabytes() bool { + if o != nil && !IsNil(o.SizeGigabytes) { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given int32 and assigns it to the SizeGigabytes field. +func (o *ResourcePoolSnapshot) SetSizeGigabytes(v int32) { + o.SizeGigabytes = &v +} + +// GetSnapshotName returns the SnapshotName field value if set, zero value otherwise. +func (o *ResourcePoolSnapshot) GetSnapshotName() string { + if o == nil || IsNil(o.SnapshotName) { + var ret string + return ret + } + return *o.SnapshotName +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.SnapshotName) { + return nil, false + } + return o.SnapshotName, true +} + +// HasSnapshotName returns a boolean if a field has been set. +func (o *ResourcePoolSnapshot) HasSnapshotName() bool { + if o != nil && !IsNil(o.SnapshotName) { + return true + } + + return false +} + +// SetSnapshotName gets a reference to the given string and assigns it to the SnapshotName field. +func (o *ResourcePoolSnapshot) SetSnapshotName(v string) { + o.SnapshotName = &v +} + +func (o ResourcePoolSnapshot) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePoolSnapshot) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Comment.IsSet() { + toSerialize["comment"] = o.Comment.Get() + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.LogicalSizeGigabytes) { + toSerialize["logicalSizeGigabytes"] = o.LogicalSizeGigabytes + } + if !IsNil(o.ResourcePoolId) { + toSerialize["resourcePoolId"] = o.ResourcePoolId + } + if !IsNil(o.SizeGigabytes) { + toSerialize["sizeGigabytes"] = o.SizeGigabytes + } + if !IsNil(o.SnapshotName) { + toSerialize["snapshotName"] = o.SnapshotName + } + 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) +} diff --git a/services/sfs/v1betaapi/model_resource_pool_space.go b/services/sfs/v1betaapi/model_resource_pool_space.go new file mode 100644 index 000000000..4325c1344 --- /dev/null +++ b/services/sfs/v1betaapi/model_resource_pool_space.go @@ -0,0 +1,221 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the ResourcePoolSpace type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ResourcePoolSpace{} + +// ResourcePoolSpace struct for ResourcePoolSpace +type ResourcePoolSpace struct { + // Available space of the Resource Pool (only available when retrieving a single Resource Pool by ID) + AvailableGigabytes NullableFloat64 `json:"availableGigabytes,omitempty"` + // Size of the Resource Pool in Gibibytes. + SizeGigabytes *int32 `json:"sizeGigabytes,omitempty"` + // Used space of the Resource Pool (only available when retrieving a single Resource Pool by ID) + UsedGigabytes NullableFloat64 `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() float64 { + if o == nil || IsNil(o.AvailableGigabytes.Get()) { + var ret float64 + return ret + } + return *o.AvailableGigabytes.Get() +} + +// 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() (*float64, bool) { + if o == nil { + return nil, false + } + return o.AvailableGigabytes.Get(), o.AvailableGigabytes.IsSet() +} + +// HasAvailableGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSpace) HasAvailableGigabytes() bool { + if o != nil && o.AvailableGigabytes.IsSet() { + return true + } + + return false +} + +// SetAvailableGigabytes gets a reference to the given NullableFloat64 and assigns it to the AvailableGigabytes field. +func (o *ResourcePoolSpace) SetAvailableGigabytes(v float64) { + o.AvailableGigabytes.Set(&v) +} + +// SetAvailableGigabytesNil sets the value for AvailableGigabytes to be an explicit nil +func (o *ResourcePoolSpace) SetAvailableGigabytesNil() { + o.AvailableGigabytes.Set(nil) +} + +// UnsetAvailableGigabytes ensures that no value is present for AvailableGigabytes, not even an explicit nil +func (o *ResourcePoolSpace) UnsetAvailableGigabytes() { + o.AvailableGigabytes.Unset() +} + +// GetSizeGigabytes returns the SizeGigabytes field value if set, zero value otherwise. +func (o *ResourcePoolSpace) GetSizeGigabytes() int32 { + if o == nil || IsNil(o.SizeGigabytes) { + var ret int32 + return ret + } + return *o.SizeGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SizeGigabytes) { + return nil, false + } + return o.SizeGigabytes, true +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSpace) HasSizeGigabytes() bool { + if o != nil && !IsNil(o.SizeGigabytes) { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given int32 and assigns it to the SizeGigabytes field. +func (o *ResourcePoolSpace) SetSizeGigabytes(v int32) { + 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() float64 { + if o == nil || IsNil(o.UsedGigabytes.Get()) { + var ret float64 + return ret + } + return *o.UsedGigabytes.Get() +} + +// 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() (*float64, bool) { + if o == nil { + return nil, false + } + return o.UsedGigabytes.Get(), o.UsedGigabytes.IsSet() +} + +// HasUsedGigabytes returns a boolean if a field has been set. +func (o *ResourcePoolSpace) HasUsedGigabytes() bool { + if o != nil && o.UsedGigabytes.IsSet() { + return true + } + + return false +} + +// SetUsedGigabytes gets a reference to the given NullableFloat64 and assigns it to the UsedGigabytes field. +func (o *ResourcePoolSpace) SetUsedGigabytes(v float64) { + o.UsedGigabytes.Set(&v) +} + +// SetUsedGigabytesNil sets the value for UsedGigabytes to be an explicit nil +func (o *ResourcePoolSpace) SetUsedGigabytesNil() { + o.UsedGigabytes.Set(nil) +} + +// UnsetUsedGigabytes ensures that no value is present for UsedGigabytes, not even an explicit nil +func (o *ResourcePoolSpace) UnsetUsedGigabytes() { + o.UsedGigabytes.Unset() +} + +func (o ResourcePoolSpace) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ResourcePoolSpace) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.AvailableGigabytes.IsSet() { + toSerialize["availableGigabytes"] = o.AvailableGigabytes.Get() + } + if !IsNil(o.SizeGigabytes) { + toSerialize["sizeGigabytes"] = o.SizeGigabytes + } + if o.UsedGigabytes.IsSet() { + toSerialize["usedGigabytes"] = o.UsedGigabytes.Get() + } + 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) +} diff --git a/services/sfs/v1betaapi/model_share.go b/services/sfs/v1betaapi/model_share.go new file mode 100644 index 000000000..a52707c8d --- /dev/null +++ b/services/sfs/v1betaapi/model_share.go @@ -0,0 +1,395 @@ +/* +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 v1betaapi + +import ( + "encoding/json" + "time" +) + +// checks if the Share type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Share{} + +// Share struct for Share +type Share struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // 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 + ExportPolicy NullableShareExportPolicy `json:"exportPolicy,omitempty"` + // ID of the Share + Id *string `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 *map[string]string `json:"labels,omitempty"` + // Mount path of the Share, used to mount the Share + MountPath *string `json:"mountPath,omitempty"` + // Name of the Share + Name *string `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) + SpaceHardLimitGigabytes *int32 `json:"spaceHardLimitGigabytes,omitempty"` + // State of the Resource Pool Snapshot (possible values: [\"pending\", \"creating\", \"created\", \"error\", \"deleting\"]) + State *string `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() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *Share) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *Share) SetCreatedAt(v time.Time) { + 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() ShareExportPolicy { + if o == nil || IsNil(o.ExportPolicy.Get()) { + var ret ShareExportPolicy + return ret + } + return *o.ExportPolicy.Get() +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil { + return nil, false + } + return o.ExportPolicy.Get(), o.ExportPolicy.IsSet() +} + +// HasExportPolicy returns a boolean if a field has been set. +func (o *Share) HasExportPolicy() bool { + if o != nil && o.ExportPolicy.IsSet() { + return true + } + + return false +} + +// SetExportPolicy gets a reference to the given NullableShareExportPolicy and assigns it to the ExportPolicy field. +func (o *Share) SetExportPolicy(v ShareExportPolicy) { + o.ExportPolicy.Set(&v) +} + +// SetExportPolicyNil sets the value for ExportPolicy to be an explicit nil +func (o *Share) SetExportPolicyNil() { + o.ExportPolicy.Set(nil) +} + +// UnsetExportPolicy ensures that no value is present for ExportPolicy, not even an explicit nil +func (o *Share) UnsetExportPolicy() { + o.ExportPolicy.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Share) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *Share) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *Share) SetId(v string) { + o.Id = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Share) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *Share) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *Share) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetMountPath returns the MountPath field value if set, zero value otherwise. +func (o *Share) GetMountPath() string { + if o == nil || IsNil(o.MountPath) { + var ret string + return ret + } + return *o.MountPath +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.MountPath) { + return nil, false + } + return o.MountPath, true +} + +// HasMountPath returns a boolean if a field has been set. +func (o *Share) HasMountPath() bool { + if o != nil && !IsNil(o.MountPath) { + return true + } + + return false +} + +// SetMountPath gets a reference to the given string and assigns it to the MountPath field. +func (o *Share) SetMountPath(v string) { + o.MountPath = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Share) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *Share) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *Share) SetName(v string) { + o.Name = &v +} + +// GetSpaceHardLimitGigabytes returns the SpaceHardLimitGigabytes field value if set, zero value otherwise. +func (o *Share) GetSpaceHardLimitGigabytes() int32 { + if o == nil || IsNil(o.SpaceHardLimitGigabytes) { + var ret int32 + return ret + } + return *o.SpaceHardLimitGigabytes +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SpaceHardLimitGigabytes) { + return nil, false + } + return o.SpaceHardLimitGigabytes, true +} + +// HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +func (o *Share) HasSpaceHardLimitGigabytes() bool { + if o != nil && !IsNil(o.SpaceHardLimitGigabytes) { + return true + } + + return false +} + +// SetSpaceHardLimitGigabytes gets a reference to the given int32 and assigns it to the SpaceHardLimitGigabytes field. +func (o *Share) SetSpaceHardLimitGigabytes(v int32) { + o.SpaceHardLimitGigabytes = &v +} + +// GetState returns the State field value if set, zero value otherwise. +func (o *Share) GetState() string { + if o == nil || IsNil(o.State) { + var ret string + return ret + } + return *o.State +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.State) { + return nil, false + } + return o.State, true +} + +// HasState returns a boolean if a field has been set. +func (o *Share) HasState() bool { + if o != nil && !IsNil(o.State) { + return true + } + + return false +} + +// SetState gets a reference to the given string and assigns it to the State field. +func (o *Share) SetState(v string) { + o.State = &v +} + +func (o Share) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Share) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if o.ExportPolicy.IsSet() { + toSerialize["exportPolicy"] = o.ExportPolicy.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.MountPath) { + toSerialize["mountPath"] = o.MountPath + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.SpaceHardLimitGigabytes) { + toSerialize["spaceHardLimitGigabytes"] = o.SpaceHardLimitGigabytes + } + if !IsNil(o.State) { + toSerialize["state"] = o.State + } + 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) +} diff --git a/services/sfs/v1betaapi/model_share_export_policy.go b/services/sfs/v1betaapi/model_share_export_policy.go new file mode 100644 index 000000000..a9b7482f9 --- /dev/null +++ b/services/sfs/v1betaapi/model_share_export_policy.go @@ -0,0 +1,310 @@ +/* +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 v1betaapi + +import ( + "encoding/json" + "time" +) + +// checks if the ShareExportPolicy type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShareExportPolicy{} + +// ShareExportPolicy struct for ShareExportPolicy +type ShareExportPolicy struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // ID of the Share Export Policy + Id *string `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 *map[string]string `json:"labels,omitempty"` + // Name of the Share Export Policy + Name *string `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 []ShareExportPolicyRule `json:"rules,omitempty"` + // Number of Shares using this Share Export Policy + SharesUsingExportPolicy *int32 `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() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ShareExportPolicy) SetCreatedAt(v time.Time) { + o.CreatedAt = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ShareExportPolicy) SetId(v string) { + o.Id = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *ShareExportPolicy) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *ShareExportPolicy) SetName(v string) { + o.Name = &v +} + +// GetRules returns the Rules field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetRules() []ShareExportPolicyRule { + if o == nil || IsNil(o.Rules) { + var ret []ShareExportPolicyRule + return ret + } + return o.Rules +} + +// 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() ([]ShareExportPolicyRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []ShareExportPolicyRule and assigns it to the Rules field. +func (o *ShareExportPolicy) SetRules(v []ShareExportPolicyRule) { + o.Rules = v +} + +// GetSharesUsingExportPolicy returns the SharesUsingExportPolicy field value if set, zero value otherwise. +func (o *ShareExportPolicy) GetSharesUsingExportPolicy() int32 { + if o == nil || IsNil(o.SharesUsingExportPolicy) { + var ret int32 + return ret + } + return *o.SharesUsingExportPolicy +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.SharesUsingExportPolicy) { + return nil, false + } + return o.SharesUsingExportPolicy, true +} + +// HasSharesUsingExportPolicy returns a boolean if a field has been set. +func (o *ShareExportPolicy) HasSharesUsingExportPolicy() bool { + if o != nil && !IsNil(o.SharesUsingExportPolicy) { + return true + } + + return false +} + +// SetSharesUsingExportPolicy gets a reference to the given int32 and assigns it to the SharesUsingExportPolicy field. +func (o *ShareExportPolicy) SetSharesUsingExportPolicy(v int32) { + o.SharesUsingExportPolicy = &v +} + +func (o ShareExportPolicy) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShareExportPolicy) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Rules) { + toSerialize["rules"] = o.Rules + } + if !IsNil(o.SharesUsingExportPolicy) { + toSerialize["sharesUsingExportPolicy"] = o.SharesUsingExportPolicy + } + 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) +} diff --git a/services/sfs/v1betaapi/model_share_export_policy_rule.go b/services/sfs/v1betaapi/model_share_export_policy_rule.go new file mode 100644 index 000000000..c2885fb12 --- /dev/null +++ b/services/sfs/v1betaapi/model_share_export_policy_rule.go @@ -0,0 +1,395 @@ +/* +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 v1betaapi + +import ( + "encoding/json" + "time" +) + +// checks if the ShareExportPolicyRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShareExportPolicyRule{} + +// ShareExportPolicyRule struct for ShareExportPolicyRule +type ShareExportPolicyRule struct { + CreatedAt *time.Time `json:"createdAt,omitempty"` + // Description of the Rule (optional) + Description NullableString `json:"description,omitempty"` + // ID of the Share Export Policy Rule + Id *string `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 []string `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 + Order *int32 `json:"order,omitempty"` + // Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false + ReadOnly *bool `json:"readOnly,omitempty"` + // Flag to honor set UUID Default: false + SetUuid *bool `json:"setUuid,omitempty"` + // Flag to indicate if client IPs matching this rule have root access on the Share Default: true + SuperUser *bool `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() time.Time { + if o == nil || IsNil(o.CreatedAt) { + var ret time.Time + return ret + } + return *o.CreatedAt +} + +// 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() (*time.Time, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. +func (o *ShareExportPolicyRule) SetCreatedAt(v time.Time) { + 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() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *ShareExportPolicyRule) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *ShareExportPolicyRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *ShareExportPolicyRule) UnsetDescription() { + o.Description.Unset() +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *ShareExportPolicyRule) SetId(v string) { + o.Id = &v +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *ShareExportPolicyRule) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *ShareExportPolicyRule) SetOrder(v int32) { + o.Order = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *ShareExportPolicyRule) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetSetUuid returns the SetUuid field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetSetUuid() bool { + if o == nil || IsNil(o.SetUuid) { + var ret bool + return ret + } + return *o.SetUuid +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SetUuid) { + return nil, false + } + return o.SetUuid, true +} + +// HasSetUuid returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasSetUuid() bool { + if o != nil && !IsNil(o.SetUuid) { + return true + } + + return false +} + +// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field. +func (o *ShareExportPolicyRule) SetSetUuid(v bool) { + o.SetUuid = &v +} + +// GetSuperUser returns the SuperUser field value if set, zero value otherwise. +func (o *ShareExportPolicyRule) GetSuperUser() bool { + if o == nil || IsNil(o.SuperUser) { + var ret bool + return ret + } + return *o.SuperUser +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SuperUser) { + return nil, false + } + return o.SuperUser, true +} + +// HasSuperUser returns a boolean if a field has been set. +func (o *ShareExportPolicyRule) HasSuperUser() bool { + if o != nil && !IsNil(o.SuperUser) { + return true + } + + return false +} + +// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field. +func (o *ShareExportPolicyRule) SetSuperUser(v bool) { + o.SuperUser = &v +} + +func (o ShareExportPolicyRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShareExportPolicyRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.SetUuid) { + toSerialize["setUuid"] = o.SetUuid + } + if !IsNil(o.SuperUser) { + toSerialize["superUser"] = o.SuperUser + } + 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) +} diff --git a/services/sfs/v1betaapi/model_snapshot_schedule.go b/services/sfs/v1betaapi/model_snapshot_schedule.go new file mode 100644 index 000000000..0669024cd --- /dev/null +++ b/services/sfs/v1betaapi/model_snapshot_schedule.go @@ -0,0 +1,162 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the SnapshotSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SnapshotSchedule{} + +// SnapshotSchedule struct for SnapshotSchedule +type SnapshotSchedule struct { + // Cron of the Snapshot Schedule (follows the cron schedule expression in Unix-like systems) + Cron *string `json:"cron,omitempty"` + // Name of the Snapshot Schedule + Name *string `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() string { + if o == nil || IsNil(o.Cron) { + var ret string + return ret + } + return *o.Cron +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Cron) { + return nil, false + } + return o.Cron, true +} + +// HasCron returns a boolean if a field has been set. +func (o *SnapshotSchedule) HasCron() bool { + if o != nil && !IsNil(o.Cron) { + return true + } + + return false +} + +// SetCron gets a reference to the given string and assigns it to the Cron field. +func (o *SnapshotSchedule) SetCron(v string) { + o.Cron = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *SnapshotSchedule) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *SnapshotSchedule) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *SnapshotSchedule) SetName(v string) { + o.Name = &v +} + +func (o SnapshotSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SnapshotSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cron) { + toSerialize["cron"] = o.Cron + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + 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) +} diff --git a/services/sfs/v1betaapi/model_status.go b/services/sfs/v1betaapi/model_status.go new file mode 100644 index 000000000..05302f21e --- /dev/null +++ b/services/sfs/v1betaapi/model_status.go @@ -0,0 +1,199 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the Status type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Status{} + +// 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]. + Code *int32 `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 []GoogleProtobufAny `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 *string `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() int32 { + if o == nil || IsNil(o.Code) { + var ret int32 + return ret + } + return *o.Code +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Code) { + return nil, false + } + return o.Code, true +} + +// HasCode returns a boolean if a field has been set. +func (o *Status) HasCode() bool { + if o != nil && !IsNil(o.Code) { + return true + } + + return false +} + +// SetCode gets a reference to the given int32 and assigns it to the Code field. +func (o *Status) SetCode(v int32) { + o.Code = &v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *Status) GetDetails() []GoogleProtobufAny { + if o == nil || IsNil(o.Details) { + var ret []GoogleProtobufAny + return ret + } + return o.Details +} + +// 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() ([]GoogleProtobufAny, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *Status) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given []GoogleProtobufAny and assigns it to the Details field. +func (o *Status) SetDetails(v []GoogleProtobufAny) { + o.Details = v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Status) GetMessage() string { + if o == nil || IsNil(o.Message) { + var ret string + return ret + } + return *o.Message +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.Message) { + return nil, false + } + return o.Message, true +} + +// HasMessage returns a boolean if a field has been set. +func (o *Status) HasMessage() bool { + if o != nil && !IsNil(o.Message) { + return true + } + + return false +} + +// SetMessage gets a reference to the given string and assigns it to the Message field. +func (o *Status) SetMessage(v string) { + o.Message = &v +} + +func (o Status) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Status) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_resource_pool_payload.go b/services/sfs/v1betaapi/model_update_resource_pool_payload.go new file mode 100644 index 000000000..0a9c650cc --- /dev/null +++ b/services/sfs/v1betaapi/model_update_resource_pool_payload.go @@ -0,0 +1,321 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateResourcePoolPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateResourcePoolPayload{} + +// 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 []string `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 *map[string]string `json:"labels,omitempty"` + // (optional) Name of the performance class + PerformanceClass *string `json:"performanceClass,omitempty"` + // (optional) Size of the Resource Pool (unit: gigabytes) + SizeGigabytes NullableInt32 `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 *string `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 *bool `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() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *UpdateResourcePoolPayload) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateResourcePoolPayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetPerformanceClass returns the PerformanceClass field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetPerformanceClass() string { + if o == nil || IsNil(o.PerformanceClass) { + var ret string + return ret + } + return *o.PerformanceClass +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.PerformanceClass) { + return nil, false + } + return o.PerformanceClass, true +} + +// HasPerformanceClass returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasPerformanceClass() bool { + if o != nil && !IsNil(o.PerformanceClass) { + return true + } + + return false +} + +// SetPerformanceClass gets a reference to the given string and assigns it to the PerformanceClass field. +func (o *UpdateResourcePoolPayload) SetPerformanceClass(v string) { + 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() int32 { + if o == nil || IsNil(o.SizeGigabytes.Get()) { + var ret int32 + return ret + } + return *o.SizeGigabytes.Get() +} + +// 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() (*int32, bool) { + if o == nil { + return nil, false + } + return o.SizeGigabytes.Get(), o.SizeGigabytes.IsSet() +} + +// HasSizeGigabytes returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasSizeGigabytes() bool { + if o != nil && o.SizeGigabytes.IsSet() { + return true + } + + return false +} + +// SetSizeGigabytes gets a reference to the given NullableInt32 and assigns it to the SizeGigabytes field. +func (o *UpdateResourcePoolPayload) SetSizeGigabytes(v int32) { + o.SizeGigabytes.Set(&v) +} + +// SetSizeGigabytesNil sets the value for SizeGigabytes to be an explicit nil +func (o *UpdateResourcePoolPayload) SetSizeGigabytesNil() { + o.SizeGigabytes.Set(nil) +} + +// UnsetSizeGigabytes ensures that no value is present for SizeGigabytes, not even an explicit nil +func (o *UpdateResourcePoolPayload) UnsetSizeGigabytes() { + o.SizeGigabytes.Unset() +} + +// GetSnapshotScheduleName returns the SnapshotScheduleName field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetSnapshotScheduleName() string { + if o == nil || IsNil(o.SnapshotScheduleName) { + var ret string + return ret + } + return *o.SnapshotScheduleName +} + +// 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() (*string, bool) { + if o == nil || IsNil(o.SnapshotScheduleName) { + return nil, false + } + return o.SnapshotScheduleName, true +} + +// HasSnapshotScheduleName returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasSnapshotScheduleName() bool { + if o != nil && !IsNil(o.SnapshotScheduleName) { + return true + } + + return false +} + +// SetSnapshotScheduleName gets a reference to the given string and assigns it to the SnapshotScheduleName field. +func (o *UpdateResourcePoolPayload) SetSnapshotScheduleName(v string) { + o.SnapshotScheduleName = &v +} + +// GetSnapshotsAreVisible returns the SnapshotsAreVisible field value if set, zero value otherwise. +func (o *UpdateResourcePoolPayload) GetSnapshotsAreVisible() bool { + if o == nil || IsNil(o.SnapshotsAreVisible) { + var ret bool + return ret + } + return *o.SnapshotsAreVisible +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SnapshotsAreVisible) { + return nil, false + } + return o.SnapshotsAreVisible, true +} + +// HasSnapshotsAreVisible returns a boolean if a field has been set. +func (o *UpdateResourcePoolPayload) HasSnapshotsAreVisible() bool { + if o != nil && !IsNil(o.SnapshotsAreVisible) { + return true + } + + return false +} + +// SetSnapshotsAreVisible gets a reference to the given bool and assigns it to the SnapshotsAreVisible field. +func (o *UpdateResourcePoolPayload) SetSnapshotsAreVisible(v bool) { + o.SnapshotsAreVisible = &v +} + +func (o UpdateResourcePoolPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateResourcePoolPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.PerformanceClass) { + toSerialize["performanceClass"] = o.PerformanceClass + } + if o.SizeGigabytes.IsSet() { + toSerialize["sizeGigabytes"] = o.SizeGigabytes.Get() + } + if !IsNil(o.SnapshotScheduleName) { + toSerialize["snapshotScheduleName"] = o.SnapshotScheduleName + } + if !IsNil(o.SnapshotsAreVisible) { + toSerialize["snapshotsAreVisible"] = o.SnapshotsAreVisible + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_resource_pool_response.go b/services/sfs/v1betaapi/model_update_resource_pool_response.go new file mode 100644 index 000000000..9b1fd5651 --- /dev/null +++ b/services/sfs/v1betaapi/model_update_resource_pool_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateResourcePoolResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateResourcePoolResponse{} + +// UpdateResourcePoolResponse struct for UpdateResourcePoolResponse +type UpdateResourcePoolResponse struct { + // Updated Resource Pool + ResourcePool *ResourcePool `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() ResourcePool { + if o == nil || IsNil(o.ResourcePool) { + var ret ResourcePool + return ret + } + return *o.ResourcePool +} + +// 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() (*ResourcePool, bool) { + if o == nil || IsNil(o.ResourcePool) { + return nil, false + } + return o.ResourcePool, true +} + +// HasResourcePool returns a boolean if a field has been set. +func (o *UpdateResourcePoolResponse) HasResourcePool() bool { + if o != nil && !IsNil(o.ResourcePool) { + return true + } + + return false +} + +// SetResourcePool gets a reference to the given ResourcePool and assigns it to the ResourcePool field. +func (o *UpdateResourcePoolResponse) SetResourcePool(v ResourcePool) { + o.ResourcePool = &v +} + +func (o UpdateResourcePoolResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateResourcePoolResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ResourcePool) { + toSerialize["resourcePool"] = o.ResourcePool + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_share_export_policy_body_rule.go b/services/sfs/v1betaapi/model_update_share_export_policy_body_rule.go new file mode 100644 index 000000000..bccb2869e --- /dev/null +++ b/services/sfs/v1betaapi/model_update_share_export_policy_body_rule.go @@ -0,0 +1,333 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateShareExportPolicyBodyRule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareExportPolicyBodyRule{} + +// UpdateShareExportPolicyBodyRule struct for UpdateShareExportPolicyBodyRule +type UpdateShareExportPolicyBodyRule struct { + // Description of the Rule (optional) + Description NullableString `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 []string `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 + Order *int32 `json:"order,omitempty"` + // Flag to indicate if client IPs matching this rule can only mount the share in read only mode Default: false + ReadOnly *bool `json:"readOnly,omitempty"` + // Flag to honor set UUID Default: false + SetUuid *bool `json:"setUuid,omitempty"` + // Flag to indicate if client IPs matching this rule have root access on the Share Default: true + SuperUser *bool `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{} + var readOnly bool = false + this.ReadOnly = &readOnly + var setUuid bool = false + this.SetUuid = &setUuid + var superUser bool = true + this.SuperUser = &superUser + 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() string { + if o == nil || IsNil(o.Description.Get()) { + var ret string + return ret + } + return *o.Description.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.Description.Get(), o.Description.IsSet() +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasDescription() bool { + if o != nil && o.Description.IsSet() { + return true + } + + return false +} + +// SetDescription gets a reference to the given NullableString and assigns it to the Description field. +func (o *UpdateShareExportPolicyBodyRule) SetDescription(v string) { + o.Description.Set(&v) +} + +// SetDescriptionNil sets the value for Description to be an explicit nil +func (o *UpdateShareExportPolicyBodyRule) SetDescriptionNil() { + o.Description.Set(nil) +} + +// UnsetDescription ensures that no value is present for Description, not even an explicit nil +func (o *UpdateShareExportPolicyBodyRule) UnsetDescription() { + o.Description.Unset() +} + +// GetIpAcl returns the IpAcl field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetIpAcl() []string { + if o == nil || IsNil(o.IpAcl) { + var ret []string + return ret + } + return o.IpAcl +} + +// 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() ([]string, bool) { + if o == nil || IsNil(o.IpAcl) { + return nil, false + } + return o.IpAcl, true +} + +// HasIpAcl returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasIpAcl() bool { + if o != nil && !IsNil(o.IpAcl) { + return true + } + + return false +} + +// SetIpAcl gets a reference to the given []string and assigns it to the IpAcl field. +func (o *UpdateShareExportPolicyBodyRule) SetIpAcl(v []string) { + o.IpAcl = v +} + +// GetOrder returns the Order field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetOrder() int32 { + if o == nil || IsNil(o.Order) { + var ret int32 + return ret + } + return *o.Order +} + +// 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() (*int32, bool) { + if o == nil || IsNil(o.Order) { + return nil, false + } + return o.Order, true +} + +// HasOrder returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasOrder() bool { + if o != nil && !IsNil(o.Order) { + return true + } + + return false +} + +// SetOrder gets a reference to the given int32 and assigns it to the Order field. +func (o *UpdateShareExportPolicyBodyRule) SetOrder(v int32) { + o.Order = &v +} + +// GetReadOnly returns the ReadOnly field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetReadOnly() bool { + if o == nil || IsNil(o.ReadOnly) { + var ret bool + return ret + } + return *o.ReadOnly +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.ReadOnly) { + return nil, false + } + return o.ReadOnly, true +} + +// HasReadOnly returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasReadOnly() bool { + if o != nil && !IsNil(o.ReadOnly) { + return true + } + + return false +} + +// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field. +func (o *UpdateShareExportPolicyBodyRule) SetReadOnly(v bool) { + o.ReadOnly = &v +} + +// GetSetUuid returns the SetUuid field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetSetUuid() bool { + if o == nil || IsNil(o.SetUuid) { + var ret bool + return ret + } + return *o.SetUuid +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SetUuid) { + return nil, false + } + return o.SetUuid, true +} + +// HasSetUuid returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasSetUuid() bool { + if o != nil && !IsNil(o.SetUuid) { + return true + } + + return false +} + +// SetSetUuid gets a reference to the given bool and assigns it to the SetUuid field. +func (o *UpdateShareExportPolicyBodyRule) SetSetUuid(v bool) { + o.SetUuid = &v +} + +// GetSuperUser returns the SuperUser field value if set, zero value otherwise. +func (o *UpdateShareExportPolicyBodyRule) GetSuperUser() bool { + if o == nil || IsNil(o.SuperUser) { + var ret bool + return ret + } + return *o.SuperUser +} + +// 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() (*bool, bool) { + if o == nil || IsNil(o.SuperUser) { + return nil, false + } + return o.SuperUser, true +} + +// HasSuperUser returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyBodyRule) HasSuperUser() bool { + if o != nil && !IsNil(o.SuperUser) { + return true + } + + return false +} + +// SetSuperUser gets a reference to the given bool and assigns it to the SuperUser field. +func (o *UpdateShareExportPolicyBodyRule) SetSuperUser(v bool) { + o.SuperUser = &v +} + +func (o UpdateShareExportPolicyBodyRule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareExportPolicyBodyRule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Description.IsSet() { + toSerialize["description"] = o.Description.Get() + } + if !IsNil(o.IpAcl) { + toSerialize["ipAcl"] = o.IpAcl + } + if !IsNil(o.Order) { + toSerialize["order"] = o.Order + } + if !IsNil(o.ReadOnly) { + toSerialize["readOnly"] = o.ReadOnly + } + if !IsNil(o.SetUuid) { + toSerialize["setUuid"] = o.SetUuid + } + if !IsNil(o.SuperUser) { + toSerialize["superUser"] = o.SuperUser + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_share_export_policy_payload.go b/services/sfs/v1betaapi/model_update_share_export_policy_payload.go new file mode 100644 index 000000000..0d08cfe53 --- /dev/null +++ b/services/sfs/v1betaapi/model_update_share_export_policy_payload.go @@ -0,0 +1,163 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateShareExportPolicyPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareExportPolicyPayload{} + +// 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 *map[string]string `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 []UpdateShareExportPolicyBodyRule `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() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyPayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateShareExportPolicyPayload) SetLabels(v map[string]string) { + 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() []UpdateShareExportPolicyBodyRule { + if o == nil { + var ret []UpdateShareExportPolicyBodyRule + return ret + } + return o.Rules +} + +// 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() ([]UpdateShareExportPolicyBodyRule, bool) { + if o == nil || IsNil(o.Rules) { + return nil, false + } + return o.Rules, true +} + +// HasRules returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyPayload) HasRules() bool { + if o != nil && !IsNil(o.Rules) { + return true + } + + return false +} + +// SetRules gets a reference to the given []UpdateShareExportPolicyBodyRule and assigns it to the Rules field. +func (o *UpdateShareExportPolicyPayload) SetRules(v []UpdateShareExportPolicyBodyRule) { + o.Rules = v +} + +func (o UpdateShareExportPolicyPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareExportPolicyPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.Rules != nil { + toSerialize["rules"] = o.Rules + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_share_export_policy_response.go b/services/sfs/v1betaapi/model_update_share_export_policy_response.go new file mode 100644 index 000000000..3b57b5b9b --- /dev/null +++ b/services/sfs/v1betaapi/model_update_share_export_policy_response.go @@ -0,0 +1,124 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateShareExportPolicyResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareExportPolicyResponse{} + +// UpdateShareExportPolicyResponse struct for UpdateShareExportPolicyResponse +type UpdateShareExportPolicyResponse struct { + ShareExportPolicy *ShareExportPolicy `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() ShareExportPolicy { + if o == nil || IsNil(o.ShareExportPolicy) { + var ret ShareExportPolicy + return ret + } + return *o.ShareExportPolicy +} + +// 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() (*ShareExportPolicy, bool) { + if o == nil || IsNil(o.ShareExportPolicy) { + return nil, false + } + return o.ShareExportPolicy, true +} + +// HasShareExportPolicy returns a boolean if a field has been set. +func (o *UpdateShareExportPolicyResponse) HasShareExportPolicy() bool { + if o != nil && !IsNil(o.ShareExportPolicy) { + return true + } + + return false +} + +// SetShareExportPolicy gets a reference to the given ShareExportPolicy and assigns it to the ShareExportPolicy field. +func (o *UpdateShareExportPolicyResponse) SetShareExportPolicy(v ShareExportPolicy) { + o.ShareExportPolicy = &v +} + +func (o UpdateShareExportPolicyResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareExportPolicyResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.ShareExportPolicy) { + toSerialize["shareExportPolicy"] = o.ShareExportPolicy + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_share_payload.go b/services/sfs/v1betaapi/model_update_share_payload.go new file mode 100644 index 000000000..e11a03948 --- /dev/null +++ b/services/sfs/v1betaapi/model_update_share_payload.go @@ -0,0 +1,221 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateSharePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateSharePayload{} + +// 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 NullableString `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 *map[string]string `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) + SpaceHardLimitGigabytes NullableInt32 `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() string { + if o == nil || IsNil(o.ExportPolicyName.Get()) { + var ret string + return ret + } + return *o.ExportPolicyName.Get() +} + +// 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() (*string, bool) { + if o == nil { + return nil, false + } + return o.ExportPolicyName.Get(), o.ExportPolicyName.IsSet() +} + +// HasExportPolicyName returns a boolean if a field has been set. +func (o *UpdateSharePayload) HasExportPolicyName() bool { + if o != nil && o.ExportPolicyName.IsSet() { + return true + } + + return false +} + +// SetExportPolicyName gets a reference to the given NullableString and assigns it to the ExportPolicyName field. +func (o *UpdateSharePayload) SetExportPolicyName(v string) { + o.ExportPolicyName.Set(&v) +} + +// SetExportPolicyNameNil sets the value for ExportPolicyName to be an explicit nil +func (o *UpdateSharePayload) SetExportPolicyNameNil() { + o.ExportPolicyName.Set(nil) +} + +// UnsetExportPolicyName ensures that no value is present for ExportPolicyName, not even an explicit nil +func (o *UpdateSharePayload) UnsetExportPolicyName() { + o.ExportPolicyName.Unset() +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateSharePayload) GetLabels() map[string]string { + if o == nil || IsNil(o.Labels) { + var ret map[string]string + return ret + } + return *o.Labels +} + +// 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() (*map[string]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *UpdateSharePayload) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field. +func (o *UpdateSharePayload) SetLabels(v map[string]string) { + 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() int32 { + if o == nil || IsNil(o.SpaceHardLimitGigabytes.Get()) { + var ret int32 + return ret + } + return *o.SpaceHardLimitGigabytes.Get() +} + +// 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() (*int32, bool) { + if o == nil { + return nil, false + } + return o.SpaceHardLimitGigabytes.Get(), o.SpaceHardLimitGigabytes.IsSet() +} + +// HasSpaceHardLimitGigabytes returns a boolean if a field has been set. +func (o *UpdateSharePayload) HasSpaceHardLimitGigabytes() bool { + if o != nil && o.SpaceHardLimitGigabytes.IsSet() { + return true + } + + return false +} + +// SetSpaceHardLimitGigabytes gets a reference to the given NullableInt32 and assigns it to the SpaceHardLimitGigabytes field. +func (o *UpdateSharePayload) SetSpaceHardLimitGigabytes(v int32) { + o.SpaceHardLimitGigabytes.Set(&v) +} + +// SetSpaceHardLimitGigabytesNil sets the value for SpaceHardLimitGigabytes to be an explicit nil +func (o *UpdateSharePayload) SetSpaceHardLimitGigabytesNil() { + o.SpaceHardLimitGigabytes.Set(nil) +} + +// UnsetSpaceHardLimitGigabytes ensures that no value is present for SpaceHardLimitGigabytes, not even an explicit nil +func (o *UpdateSharePayload) UnsetSpaceHardLimitGigabytes() { + o.SpaceHardLimitGigabytes.Unset() +} + +func (o UpdateSharePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateSharePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ExportPolicyName.IsSet() { + toSerialize["exportPolicyName"] = o.ExportPolicyName.Get() + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if o.SpaceHardLimitGigabytes.IsSet() { + toSerialize["spaceHardLimitGigabytes"] = o.SpaceHardLimitGigabytes.Get() + } + 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) +} diff --git a/services/sfs/v1betaapi/model_update_share_response.go b/services/sfs/v1betaapi/model_update_share_response.go new file mode 100644 index 000000000..af6235743 --- /dev/null +++ b/services/sfs/v1betaapi/model_update_share_response.go @@ -0,0 +1,125 @@ +/* +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 v1betaapi + +import ( + "encoding/json" +) + +// checks if the UpdateShareResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateShareResponse{} + +// UpdateShareResponse struct for UpdateShareResponse +type UpdateShareResponse struct { + // Updated Share + Share *Share `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() Share { + if o == nil || IsNil(o.Share) { + var ret Share + return ret + } + return *o.Share +} + +// 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() (*Share, bool) { + if o == nil || IsNil(o.Share) { + return nil, false + } + return o.Share, true +} + +// HasShare returns a boolean if a field has been set. +func (o *UpdateShareResponse) HasShare() bool { + if o != nil && !IsNil(o.Share) { + return true + } + + return false +} + +// SetShare gets a reference to the given Share and assigns it to the Share field. +func (o *UpdateShareResponse) SetShare(v Share) { + o.Share = &v +} + +func (o UpdateShareResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateShareResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Share) { + toSerialize["share"] = o.Share + } + 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) +} diff --git a/services/sfs/v1betaapi/model_validation_error.go b/services/sfs/v1betaapi/model_validation_error.go new file mode 100644 index 000000000..3774ec8fd --- /dev/null +++ b/services/sfs/v1betaapi/model_validation_error.go @@ -0,0 +1,256 @@ +/* +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 v1betaapi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ValidationError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationError{} + +// ValidationError struct for ValidationError +type ValidationError struct { + // Human-readable string of the error that occured + // Deprecated + ErrorDescription interface{} `json:"error_description,omitempty"` + // Human-readable description of the error that occurred. + Title string `json:"title"` + // URI Uniquely identifies the error type. It will be in the format of storage.stackit.cloud/ e.g. storage.stackit.cloud/validation-error + Type string `json:"type"` + Fields []ValidationErrorField `json:"fields"` +} + +type _ValidationError ValidationError + +// NewValidationError instantiates a new ValidationError 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 NewValidationError(title string, types string, fields []ValidationErrorField) *ValidationError { + this := ValidationError{} + this.Title = title + this.Type = types + this.Fields = fields + return &this +} + +// NewValidationErrorWithDefaults instantiates a new ValidationError 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 NewValidationErrorWithDefaults() *ValidationError { + this := ValidationError{} + 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 *ValidationError) GetErrorDescription() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.ErrorDescription +} + +// 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 *ValidationError) GetErrorDescriptionOk() (*interface{}, bool) { + if o == nil || IsNil(o.ErrorDescription) { + return nil, false + } + return &o.ErrorDescription, true +} + +// HasErrorDescription returns a boolean if a field has been set. +func (o *ValidationError) HasErrorDescription() bool { + if o != nil && !IsNil(o.ErrorDescription) { + return true + } + + return false +} + +// SetErrorDescription gets a reference to the given interface{} and assigns it to the ErrorDescription field. +// Deprecated +func (o *ValidationError) SetErrorDescription(v interface{}) { + o.ErrorDescription = v +} + +// GetTitle returns the Title field value +func (o *ValidationError) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// GetTitleOk returns a tuple with the Title field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetTitleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Title, true +} + +// SetTitle sets field value +func (o *ValidationError) SetTitle(v string) { + o.Title = v +} + +// GetType returns the Type field value +func (o *ValidationError) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ValidationError) SetType(v string) { + o.Type = v +} + +// GetFields returns the Fields field value +func (o *ValidationError) GetFields() []ValidationErrorField { + if o == nil { + var ret []ValidationErrorField + return ret + } + + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value +// and a boolean to check if the value has been set. +func (o *ValidationError) GetFieldsOk() ([]ValidationErrorField, bool) { + if o == nil { + return nil, false + } + return o.Fields, true +} + +// SetFields sets field value +func (o *ValidationError) SetFields(v []ValidationErrorField) { + o.Fields = v +} + +func (o ValidationError) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ErrorDescription != nil { + toSerialize["error_description"] = o.ErrorDescription + } + toSerialize["title"] = o.Title + toSerialize["type"] = o.Type + toSerialize["fields"] = o.Fields + return toSerialize, nil +} + +func (o *ValidationError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "title", + "type", + "fields", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varValidationError := _ValidationError{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varValidationError) + + if err != nil { + return err + } + + *o = ValidationError(varValidationError) + + return err +} + +type NullableValidationError struct { + value *ValidationError + isSet bool +} + +func (v NullableValidationError) Get() *ValidationError { + return v.value +} + +func (v *NullableValidationError) Set(val *ValidationError) { + v.value = val + v.isSet = true +} + +func (v NullableValidationError) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationError(val *ValidationError) *NullableValidationError { + return &NullableValidationError{value: val, isSet: true} +} + +func (v NullableValidationError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sfs/v1betaapi/model_validation_error_field.go b/services/sfs/v1betaapi/model_validation_error_field.go new file mode 100644 index 000000000..9dca75f11 --- /dev/null +++ b/services/sfs/v1betaapi/model_validation_error_field.go @@ -0,0 +1,186 @@ +/* +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 v1betaapi + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the ValidationErrorField type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorField{} + +// ValidationErrorField struct for ValidationErrorField +type ValidationErrorField struct { + // The name of the field in the request that has failed the validation + Field string `json:"field"` + // The reason why the validation failed + Reason string `json:"reason"` +} + +type _ValidationErrorField ValidationErrorField + +// NewValidationErrorField instantiates a new ValidationErrorField 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 NewValidationErrorField(field string, reason string) *ValidationErrorField { + this := ValidationErrorField{} + this.Field = field + this.Reason = reason + return &this +} + +// NewValidationErrorFieldWithDefaults instantiates a new ValidationErrorField 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 NewValidationErrorFieldWithDefaults() *ValidationErrorField { + this := ValidationErrorField{} + return &this +} + +// GetField returns the Field field value +func (o *ValidationErrorField) GetField() string { + if o == nil { + var ret string + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *ValidationErrorField) GetFieldOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *ValidationErrorField) SetField(v string) { + o.Field = v +} + +// GetReason returns the Reason field value +func (o *ValidationErrorField) GetReason() string { + if o == nil { + var ret string + return ret + } + + return o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value +// and a boolean to check if the value has been set. +func (o *ValidationErrorField) GetReasonOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Reason, true +} + +// SetReason sets field value +func (o *ValidationErrorField) SetReason(v string) { + o.Reason = v +} + +func (o ValidationErrorField) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationErrorField) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["field"] = o.Field + toSerialize["reason"] = o.Reason + return toSerialize, nil +} + +func (o *ValidationErrorField) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "field", + "reason", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err + } + + for _, requiredProperty := range requiredProperties { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varValidationErrorField := _ValidationErrorField{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varValidationErrorField) + + if err != nil { + return err + } + + *o = ValidationErrorField(varValidationErrorField) + + return err +} + +type NullableValidationErrorField struct { + value *ValidationErrorField + isSet bool +} + +func (v NullableValidationErrorField) Get() *ValidationErrorField { + return v.value +} + +func (v *NullableValidationErrorField) Set(val *ValidationErrorField) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorField) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorField) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorField(val *ValidationErrorField) *NullableValidationErrorField { + return &NullableValidationErrorField{value: val, isSet: true} +} + +func (v NullableValidationErrorField) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorField) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/sfs/v1betaapi/response.go b/services/sfs/v1betaapi/response.go new file mode 100644 index 000000000..4ddc4ba08 --- /dev/null +++ b/services/sfs/v1betaapi/response.go @@ -0,0 +1,47 @@ +/* +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 v1betaapi + +import ( + "net/http" +) + +// APIResponse stores the API response returned by the server. +type APIResponse struct { + *http.Response `json:"-"` + Message string `json:"message,omitempty"` + // Operation is the name of the OpenAPI operation. + Operation string `json:"operation,omitempty"` + // RequestURL is the request URL. This value is always available, even if the + // embedded *http.Response is nil. + RequestURL string `json:"url,omitempty"` + // Method is the HTTP method used for the request. This value is always + // available, even if the embedded *http.Response is nil. + Method string `json:"method,omitempty"` + // Payload holds the contents of the response body (which may be nil or empty). + // This is provided here as the raw response.Body() reader will have already + // been drained. + Payload []byte `json:"-"` +} + +// NewAPIResponse returns a new APIResponse object. +func NewAPIResponse(r *http.Response) *APIResponse { + + response := &APIResponse{Response: r} + return response +} + +// NewAPIResponseWithError returns a new APIResponse object with the provided error message. +func NewAPIResponseWithError(errorMessage string) *APIResponse { + + response := &APIResponse{Message: errorMessage} + return response +} diff --git a/services/sfs/v1betaapi/utils.go b/services/sfs/v1betaapi/utils.go new file mode 100644 index 000000000..bc73a224a --- /dev/null +++ b/services/sfs/v1betaapi/utils.go @@ -0,0 +1,361 @@ +/* +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 v1betaapi + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "time" +) + +// PtrBool is a helper routine that returns a pointer to given boolean value. +func PtrBool(v bool) *bool { return &v } + +// PtrInt is a helper routine that returns a pointer to given integer value. +func PtrInt(v int) *int { return &v } + +// PtrInt32 is a helper routine that returns a pointer to given integer value. +func PtrInt32(v int32) *int32 { return &v } + +// PtrInt64 is a helper routine that returns a pointer to given integer value. +func PtrInt64(v int64) *int64 { return &v } + +// PtrFloat32 is a helper routine that returns a pointer to given float value. +func PtrFloat32(v float32) *float32 { return &v } + +// PtrFloat64 is a helper routine that returns a pointer to given float value. +func PtrFloat64(v float64) *float64 { return &v } + +// PtrString is a helper routine that returns a pointer to given string value. +func PtrString(v string) *string { return &v } + +// PtrTime is helper routine that returns a pointer to given Time value. +func PtrTime(v time.Time) *time.Time { return &v } + +type NullableBool struct { + value *bool + isSet bool +} + +func (v NullableBool) Get() *bool { + return v.value +} + +func (v *NullableBool) Set(val *bool) { + v.value = val + v.isSet = true +} + +func (v NullableBool) IsSet() bool { + return v.isSet +} + +func (v *NullableBool) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBool(val *bool) *NullableBool { + return &NullableBool{value: val, isSet: true} +} + +func (v NullableBool) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBool) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt struct { + value *int + isSet bool +} + +func (v NullableInt) Get() *int { + return v.value +} + +func (v *NullableInt) Set(val *int) { + v.value = val + v.isSet = true +} + +func (v NullableInt) IsSet() bool { + return v.isSet +} + +func (v *NullableInt) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt(val *int) *NullableInt { + return &NullableInt{value: val, isSet: true} +} + +func (v NullableInt) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt32 struct { + value *int32 + isSet bool +} + +func (v NullableInt32) Get() *int32 { + return v.value +} + +func (v *NullableInt32) Set(val *int32) { + v.value = val + v.isSet = true +} + +func (v NullableInt32) IsSet() bool { + return v.isSet +} + +func (v *NullableInt32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt32(val *int32) *NullableInt32 { + return &NullableInt32{value: val, isSet: true} +} + +func (v NullableInt32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableInt64 struct { + value *int64 + isSet bool +} + +func (v NullableInt64) Get() *int64 { + return v.value +} + +func (v *NullableInt64) Set(val *int64) { + v.value = val + v.isSet = true +} + +func (v NullableInt64) IsSet() bool { + return v.isSet +} + +func (v *NullableInt64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInt64(val *int64) *NullableInt64 { + return &NullableInt64{value: val, isSet: true} +} + +func (v NullableInt64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInt64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat32 struct { + value *float32 + isSet bool +} + +func (v NullableFloat32) Get() *float32 { + return v.value +} + +func (v *NullableFloat32) Set(val *float32) { + v.value = val + v.isSet = true +} + +func (v NullableFloat32) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat32) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat32(val *float32) *NullableFloat32 { + return &NullableFloat32{value: val, isSet: true} +} + +func (v NullableFloat32) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat32) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableFloat64 struct { + value *float64 + isSet bool +} + +func (v NullableFloat64) Get() *float64 { + return v.value +} + +func (v *NullableFloat64) Set(val *float64) { + v.value = val + v.isSet = true +} + +func (v NullableFloat64) IsSet() bool { + return v.isSet +} + +func (v *NullableFloat64) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFloat64(val *float64) *NullableFloat64 { + return &NullableFloat64{value: val, isSet: true} +} + +func (v NullableFloat64) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFloat64) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableString struct { + value *string + isSet bool +} + +func (v NullableString) Get() *string { + return v.value +} + +func (v *NullableString) Set(val *string) { + v.value = val + v.isSet = true +} + +func (v NullableString) IsSet() bool { + return v.isSet +} + +func (v *NullableString) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableString(val *string) *NullableString { + return &NullableString{value: val, isSet: true} +} + +func (v NullableString) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableString) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +type NullableTime struct { + value *time.Time + isSet bool +} + +func (v NullableTime) Get() *time.Time { + return v.value +} + +func (v *NullableTime) Set(val *time.Time) { + v.value = val + v.isSet = true +} + +func (v NullableTime) IsSet() bool { + return v.isSet +} + +func (v *NullableTime) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableTime(val *time.Time) *NullableTime { + return &NullableTime{value: val, isSet: true} +} + +func (v NullableTime) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableTime) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +} + +type MappedNullable interface { + ToMap() (map[string]interface{}, error) +} + +// A wrapper for strict JSON decoding +func newStrictDecoder(data []byte) *json.Decoder { + dec := json.NewDecoder(bytes.NewBuffer(data)) + dec.DisallowUnknownFields() + return dec +} + +// Prevent trying to import "fmt" +func reportError(format string, a ...interface{}) error { + return fmt.Errorf(format, a...) +} diff --git a/services/sfs/wait/deprecation.go b/services/sfs/wait/deprecation.go new file mode 100644 index 000000000..58f184c09 --- /dev/null +++ b/services/sfs/wait/deprecation.go @@ -0,0 +1,2 @@ +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead +package wait