diff --git a/services/mongodbflex/api_default.go b/services/mongodbflex/api_default.go index e6ff9417e..69cb6e315 100644 --- a/services/mongodbflex/api_default.go +++ b/services/mongodbflex/api_default.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex 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 { /* CloneInstance Clone instance @@ -34,6 +36,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiCloneInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CloneInstance(ctx context.Context, projectId string, instanceId string, region string) ApiCloneInstanceRequest /* @@ -45,6 +49,7 @@ type DefaultApi interface { @param region The region which should be addressed @return CloneInstanceResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CloneInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*CloneInstanceResponse, error) /* @@ -55,6 +60,8 @@ type DefaultApi interface { @param projectId project id @param region The region which should be addressed @return ApiCreateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest /* @@ -65,6 +72,7 @@ type DefaultApi interface { @param region The region which should be addressed @return CreateInstanceResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateInstanceExecute(ctx context.Context, projectId string, region string) (*CreateInstanceResponse, error) /* @@ -76,6 +84,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiCreateUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest /* @@ -87,6 +97,7 @@ type DefaultApi interface { @param region The region which should be addressed @return CreateUserResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ CreateUserExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateUserResponse, error) /* @@ -98,11 +109,14 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiDeleteInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest /* DeleteInstanceExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) error /* @@ -115,11 +129,14 @@ type DefaultApi interface { @param userId user id @param region The region which should be addressed @return ApiDeleteUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest /* DeleteUserExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error /* @@ -132,6 +149,8 @@ type DefaultApi interface { @param backupId backup id @param region The region which should be addressed @return ApiGetBackupRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest /* @@ -144,6 +163,7 @@ type DefaultApi interface { @param region The region which should be addressed @return GetBackupResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string, region string) (*GetBackupResponse, error) /* @@ -155,6 +175,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiGetInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest /* @@ -166,6 +188,7 @@ type DefaultApi interface { @param region The region which should be addressed @return InstanceResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*InstanceResponse, error) /* @@ -178,6 +201,8 @@ type DefaultApi interface { @param userId user id @param region The region which should be addressed @return ApiGetUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest /* @@ -190,6 +215,7 @@ type DefaultApi interface { @param region The region which should be addressed @return GetUserResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*GetUserResponse, error) /* @@ -201,6 +227,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiListAdvisorSlowQueriesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string, region string) ApiListAdvisorSlowQueriesRequest /* @@ -212,6 +240,7 @@ type DefaultApi interface { @param region The region which should be addressed @return HandlersInstancesSlowQueriesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSlowQueriesResponse, error) /* @@ -223,6 +252,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiListBackupsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest /* @@ -234,6 +265,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListBackupsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListBackupsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListBackupsResponse, error) /* @@ -244,6 +276,8 @@ type DefaultApi interface { @param projectId project id @param region The region which should be addressed @return ApiListFlavorsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest /* @@ -254,6 +288,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListFlavorsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListFlavorsExecute(ctx context.Context, projectId string, region string) (*ListFlavorsResponse, error) /* @@ -264,6 +299,8 @@ type DefaultApi interface { @param projectId project id @param region The region which should be addressed @return ApiListInstancesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest /* @@ -274,6 +311,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListInstancesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) /* @@ -286,6 +324,8 @@ type DefaultApi interface { @param metric metric type @param region The region which should be addressed @return ApiListMetricsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListMetrics(ctx context.Context, projectId string, instanceId string, metric string, region string) ApiListMetricsRequest /* @@ -298,6 +338,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListMetricsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string, region string) (*ListMetricsResponse, error) /* @@ -309,6 +350,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiListRestoreJobsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest /* @@ -320,6 +363,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListRestoreJobsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRestoreJobsResponse, error) /* @@ -331,6 +375,8 @@ type DefaultApi interface { @param flavor flavor id @param region The region which should be addressed @return ApiListStoragesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListStorages(ctx context.Context, projectId string, flavor string, region string) ApiListStoragesRequest /* @@ -342,6 +388,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListStoragesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListStoragesExecute(ctx context.Context, projectId string, flavor string, region string) (*ListStoragesResponse, error) /* @@ -353,6 +400,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiListSuggestedIndexesRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string, region string) ApiListSuggestedIndexesRequest /* @@ -364,6 +413,7 @@ type DefaultApi interface { @param region The region which should be addressed @return HandlersInstancesSuggestedIndexesResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSuggestedIndexesResponse, error) /* @@ -375,6 +425,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiListUsersRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest /* @@ -386,6 +438,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListUsersResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListUsersExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListUsersResponse, error) /* @@ -396,6 +449,8 @@ type DefaultApi interface { @param projectId project id @param region The region which should be addressed @return ApiListVersionsRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest /* @@ -406,6 +461,7 @@ type DefaultApi interface { @param region The region which should be addressed @return ListVersionsResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) /* @@ -417,6 +473,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiPartialUpdateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest /* @@ -428,6 +486,7 @@ type DefaultApi interface { @param region The region which should be addressed @return UpdateInstanceResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) /* @@ -440,11 +499,14 @@ type DefaultApi interface { @param userId user id @param region The region which should be addressed @return ApiPartialUpdateUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiPartialUpdateUserRequest /* PartialUpdateUserExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error /* @@ -457,6 +519,8 @@ type DefaultApi interface { @param userId user id @param region The region which should be addressed @return ApiResetUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest /* @@ -469,6 +533,7 @@ type DefaultApi interface { @param region The region which should be addressed @return User + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*User, error) /* @@ -480,6 +545,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiRestoreInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ RestoreInstance(ctx context.Context, projectId string, instanceId string, region string) ApiRestoreInstanceRequest /* @@ -491,6 +558,7 @@ type DefaultApi interface { @param region The region which should be addressed @return RestoreInstanceResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ RestoreInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*RestoreInstanceResponse, error) /* @@ -502,6 +570,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiUpdateBackupScheduleRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateBackupScheduleRequest /* @@ -513,6 +583,7 @@ type DefaultApi interface { @param region The region which should be addressed @return BackupSchedule + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string, region string) (*BackupSchedule, error) /* @@ -524,6 +595,8 @@ type DefaultApi interface { @param instanceId instance id @param region The region which should be addressed @return ApiUpdateInstanceRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest /* @@ -535,6 +608,7 @@ type DefaultApi interface { @param region The region which should be addressed @return UpdateInstanceResponse + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) /* @@ -547,146 +621,215 @@ type DefaultApi interface { @param userId user id @param region The region which should be addressed @return ApiUpdateUserRequest + + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiUpdateUserRequest /* UpdateUserExecute executes the request + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead */ UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCloneInstanceRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CloneInstancePayload(cloneInstancePayload CloneInstancePayload) ApiCloneInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CloneInstanceResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateInstanceRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateInstanceResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiCreateUserRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*CreateUserResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiDeleteUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetBackupRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetBackupResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetInstanceRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*InstanceResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiGetUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*GetUserResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListAdvisorSlowQueriesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*HandlersInstancesSlowQueriesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListBackupsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListBackupsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListFlavorsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListFlavorsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListInstancesRequest interface { // instance tag + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Tag(tag string) ApiListInstancesRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListInstancesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListMetricsRequest interface { // granularity + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Granularity(granularity string) ApiListMetricsRequest // period + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Period(period string) ApiListMetricsRequest // period start + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Start(start string) ApiListMetricsRequest // period end + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead End(end string) ApiListMetricsRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListMetricsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListRestoreJobsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListRestoreJobsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListStoragesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListStoragesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListSuggestedIndexesRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*HandlersInstancesSuggestedIndexesResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListUsersRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListUsersResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiListVersionsRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*ListVersionsResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiPartialUpdateInstanceRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*UpdateInstanceResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiPartialUpdateUserRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead PartialUpdateUserPayload(partialUpdateUserPayload PartialUpdateUserPayload) ApiPartialUpdateUserRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() error } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiResetUserRequest interface { + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*User, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiRestoreInstanceRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead RestoreInstancePayload(restoreInstancePayload RestoreInstancePayload) ApiRestoreInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*RestoreInstanceResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateBackupScheduleRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateBackupSchedulePayload(updateBackupSchedulePayload UpdateBackupSchedulePayload) ApiUpdateBackupScheduleRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*BackupSchedule, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateInstanceRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() (*UpdateInstanceResponse, error) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ApiUpdateUserRequest interface { // payload + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead Execute() 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 CloneInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -697,12 +840,13 @@ type CloneInstanceRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CloneInstanceRequest) CloneInstancePayload(cloneInstancePayload CloneInstancePayload) ApiCloneInstanceRequest { r.cloneInstancePayload = &cloneInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -834,8 +978,7 @@ func (r CloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { /* CloneInstance: Clone instance -Clone an instance via PIT restore
Note that the Timestamp is a RFC3339 standard and uses by default UTC time format
-As an example a valid timestamp look like "2023-04-20T15:05:15Z" +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 project id @@ -853,6 +996,7 @@ func (a *APIClient) CloneInstance(ctx context.Context, projectId string, instanc } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CloneInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*CloneInstanceResponse, error) { r := CloneInstanceRequest{ apiService: a.defaultApi, @@ -864,6 +1008,7 @@ func (a *APIClient) CloneInstanceExecute(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 CreateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -873,12 +1018,13 @@ type CreateInstanceRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { r.createInstancePayload = &createInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1020,7 +1166,7 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { /* CreateInstance: Create instance -Create and deploys an instance
Note that the time format for the backupSchedule is in UTC +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 project id @@ -1036,6 +1182,7 @@ func (a *APIClient) CreateInstance(ctx context.Context, projectId string, region } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateInstanceExecute(ctx context.Context, projectId string, region string) (*CreateInstanceResponse, error) { r := CreateInstanceRequest{ apiService: a.defaultApi, @@ -1046,6 +1193,7 @@ func (a *APIClient) CreateInstanceExecute(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 CreateUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -1056,12 +1204,13 @@ type CreateUserRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { r.createUserPayload = &createUserPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -1215,7 +1364,7 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { /* CreateUser: Create User -create a new user for a mongodb instance +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 project id @@ -1233,6 +1382,7 @@ func (a *APIClient) CreateUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateUserResponse, error) { r := CreateUserRequest{ apiService: a.defaultApi, @@ -1244,6 +1394,7 @@ func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, ins return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DeleteInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -1252,6 +1403,7 @@ type DeleteInstanceRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteInstanceRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1378,7 +1530,7 @@ func (r DeleteInstanceRequest) Execute() error { /* DeleteInstance: Delete instance -removes an instance +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 project id @@ -1396,6 +1548,7 @@ func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instan } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) error { r := DeleteInstanceRequest{ apiService: a.defaultApi, @@ -1407,6 +1560,7 @@ func (a *APIClient) DeleteInstanceExecute(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 DeleteUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -1416,6 +1570,7 @@ type DeleteUserRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r DeleteUserRequest) Execute() error { var ( localVarHTTPMethod = http.MethodDelete @@ -1543,7 +1698,7 @@ func (r DeleteUserRequest) Execute() error { /* DeleteUser: Delete User -delete mongodb user +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 project id @@ -1563,6 +1718,7 @@ func (a *APIClient) DeleteUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { r := DeleteUserRequest{ apiService: a.defaultApi, @@ -1575,6 +1731,7 @@ func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, ins return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetBackupRequest struct { ctx context.Context apiService *DefaultApiService @@ -1584,6 +1741,7 @@ type GetBackupRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1711,7 +1869,7 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { /* GetBackup: Get backup -Get details about a specific backup +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 project id @@ -1731,6 +1889,7 @@ func (a *APIClient) GetBackup(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string, region string) (*GetBackupResponse, error) { r := GetBackupRequest{ apiService: a.defaultApi, @@ -1743,6 +1902,7 @@ func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -1751,6 +1911,7 @@ type GetInstanceRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetInstanceRequest) Execute() (*InstanceResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -1877,7 +2038,7 @@ func (r GetInstanceRequest) Execute() (*InstanceResponse, error) { /* GetInstance: Get instance -gets information of an instance +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 project id @@ -1895,6 +2056,7 @@ func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*InstanceResponse, error) { r := GetInstanceRequest{ apiService: a.defaultApi, @@ -1906,6 +2068,7 @@ func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, in return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -1915,6 +2078,7 @@ type GetUserRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r GetUserRequest) Execute() (*GetUserResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2053,7 +2217,7 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { /* GetUser: Get User -get detailed information of a user of a mongodb instance +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 project id @@ -2073,6 +2237,7 @@ func (a *APIClient) GetUser(ctx context.Context, projectId string, instanceId st } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*GetUserResponse, error) { r := GetUserRequest{ apiService: a.defaultApi, @@ -2085,6 +2250,7 @@ func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instan return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListAdvisorSlowQueriesRequest struct { ctx context.Context apiService *DefaultApiService @@ -2093,6 +2259,7 @@ type ListAdvisorSlowQueriesRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2230,7 +2397,7 @@ func (r ListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesR /* ListAdvisorSlowQueries: Get slow queries -gets slow queries from the Opsmanager performance advisor +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 project id @@ -2248,6 +2415,7 @@ func (a *APIClient) ListAdvisorSlowQueries(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) ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSlowQueriesResponse, error) { r := ListAdvisorSlowQueriesRequest{ apiService: a.defaultApi, @@ -2259,6 +2427,7 @@ func (a *APIClient) ListAdvisorSlowQueriesExecute(ctx context.Context, projectId return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2267,6 +2436,7 @@ type ListBackupsRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2393,7 +2563,7 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { /* ListBackups: List backup -List backups of an instance +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 project id @@ -2411,6 +2581,7 @@ func (a *APIClient) ListBackups(ctx context.Context, projectId string, instanceI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListBackupsResponse, error) { r := ListBackupsRequest{ apiService: a.defaultApi, @@ -2422,6 +2593,7 @@ func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, in return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFlavorsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2429,6 +2601,7 @@ type ListFlavorsRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2554,7 +2727,7 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { /* ListFlavors: Flavors -returns all possible flavors +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 project id @@ -2570,6 +2743,7 @@ func (a *APIClient) ListFlavors(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) ListFlavorsExecute(ctx context.Context, projectId string, region string) (*ListFlavorsResponse, error) { r := ListFlavorsRequest{ apiService: a.defaultApi, @@ -2580,6 +2754,7 @@ func (a *APIClient) ListFlavorsExecute(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 ListInstancesRequest struct { ctx context.Context apiService *DefaultApiService @@ -2589,12 +2764,13 @@ type ListInstancesRequest struct { } // instance tag - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListInstancesRequest) Tag(tag string) ApiListInstancesRequest { r.tag = &tag return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2724,7 +2900,7 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { /* ListInstances: List Instances -list all instances for a projectID +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 project id @@ -2740,6 +2916,7 @@ func (a *APIClient) ListInstances(ctx context.Context, projectId string, region } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) { r := ListInstancesRequest{ apiService: a.defaultApi, @@ -2750,6 +2927,7 @@ func (a *APIClient) ListInstancesExecute(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 ListMetricsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2764,33 +2942,34 @@ type ListMetricsRequest struct { } // granularity - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListMetricsRequest) Granularity(granularity string) ApiListMetricsRequest { r.granularity = &granularity return r } // period - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListMetricsRequest) Period(period string) ApiListMetricsRequest { r.period = &period return r } // period start - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListMetricsRequest) Start(start string) ApiListMetricsRequest { r.start = &start return r } // period end - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListMetricsRequest) End(end string) ApiListMetricsRequest { r.end = &end return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -2942,7 +3121,7 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { /* ListMetrics: Metrics -returns metrics for an instance +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 project id @@ -2962,6 +3141,7 @@ func (a *APIClient) ListMetrics(ctx context.Context, projectId string, instanceI } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string, region string) (*ListMetricsResponse, error) { r := ListMetricsRequest{ apiService: a.defaultApi, @@ -2974,6 +3154,7 @@ func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, in return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListRestoreJobsRequest struct { ctx context.Context apiService *DefaultApiService @@ -2982,6 +3163,7 @@ type ListRestoreJobsRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3108,7 +3290,7 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { /* ListRestoreJobs: List restore jobs -List restore jobs of an instance +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 project id @@ -3126,6 +3308,7 @@ func (a *APIClient) ListRestoreJobs(ctx context.Context, projectId string, insta } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRestoreJobsResponse, error) { r := ListRestoreJobsRequest{ apiService: a.defaultApi, @@ -3137,6 +3320,7 @@ func (a *APIClient) ListRestoreJobsExecute(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 ListStoragesRequest struct { ctx context.Context apiService *DefaultApiService @@ -3145,6 +3329,7 @@ type ListStoragesRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3271,7 +3456,7 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { /* ListStorages: Get storage -returns the storage for a certain flavor +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 project id @@ -3289,6 +3474,7 @@ func (a *APIClient) ListStorages(ctx context.Context, projectId string, flavor s } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, flavor string, region string) (*ListStoragesResponse, error) { r := ListStoragesRequest{ apiService: a.defaultApi, @@ -3300,6 +3486,7 @@ func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, f return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListSuggestedIndexesRequest struct { ctx context.Context apiService *DefaultApiService @@ -3308,6 +3495,7 @@ type ListSuggestedIndexesRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndexesResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3445,7 +3633,7 @@ func (r ListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndex /* ListSuggestedIndexes: Get suggested indexes -gets suggested indexes from the Opsmanager performance advisor +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 project id @@ -3463,6 +3651,7 @@ func (a *APIClient) ListSuggestedIndexes(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) ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSuggestedIndexesResponse, error) { r := ListSuggestedIndexesRequest{ apiService: a.defaultApi, @@ -3474,6 +3663,7 @@ func (a *APIClient) ListSuggestedIndexesExecute(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 ListUsersRequest struct { ctx context.Context apiService *DefaultApiService @@ -3482,6 +3672,7 @@ type ListUsersRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3619,7 +3810,7 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { /* ListUsers: List Users -list all users for a mongodb instance +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 project id @@ -3637,6 +3828,7 @@ func (a *APIClient) ListUsers(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListUsersResponse, error) { r := ListUsersRequest{ apiService: a.defaultApi, @@ -3648,6 +3840,7 @@ func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListVersionsRequest struct { ctx context.Context apiService *DefaultApiService @@ -3655,6 +3848,7 @@ type ListVersionsRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { var ( localVarHTTPMethod = http.MethodGet @@ -3769,7 +3963,7 @@ func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { /* ListVersions: Get versions -returns all available versions for creating endpoint +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 project id @@ -3785,6 +3979,7 @@ func (a *APIClient) ListVersions(ctx context.Context, projectId string, region s } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) { r := ListVersionsRequest{ apiService: a.defaultApi, @@ -3795,6 +3990,7 @@ func (a *APIClient) ListVersionsExecute(ctx context.Context, projectId string, r return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -3805,12 +4001,13 @@ type PartialUpdateInstanceRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateInstanceRequest) PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest { r.partialUpdateInstancePayload = &partialUpdateInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { var ( localVarHTTPMethod = http.MethodPatch @@ -3964,7 +4161,7 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) /* PartialUpdateInstance: Patch endpoint -Updates a deployment plan
Note that the time format for the backupSchedule is in UTC +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 project id @@ -3982,6 +4179,7 @@ func (a *APIClient) PartialUpdateInstance(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) PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) { r := PartialUpdateInstanceRequest{ apiService: a.defaultApi, @@ -3993,6 +4191,7 @@ func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -4004,12 +4203,13 @@ type PartialUpdateUserRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateUserRequest) PartialUpdateUserPayload(partialUpdateUserPayload PartialUpdateUserPayload) ApiPartialUpdateUserRequest { r.partialUpdateUserPayload = &partialUpdateUserPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r PartialUpdateUserRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPatch @@ -4142,7 +4342,7 @@ func (r PartialUpdateUserRequest) Execute() error { /* PartialUpdateUser: Update User -updates user for a mongodb instance +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 project id @@ -4162,6 +4362,7 @@ func (a *APIClient) PartialUpdateUser(ctx context.Context, projectId string, ins } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { r := PartialUpdateUserRequest{ apiService: a.defaultApi, @@ -4174,6 +4375,7 @@ func (a *APIClient) PartialUpdateUserExecute(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 ResetUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -4183,6 +4385,7 @@ type ResetUserRequest struct { region string } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r ResetUserRequest) Execute() (*User, error) { var ( localVarHTTPMethod = http.MethodPost @@ -4321,7 +4524,7 @@ func (r ResetUserRequest) Execute() (*User, error) { /* ResetUser: Reset User -resets mongodb user's password +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 project id @@ -4341,6 +4544,7 @@ func (a *APIClient) ResetUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*User, error) { r := ResetUserRequest{ apiService: a.defaultApi, @@ -4353,6 +4557,7 @@ func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, inst return r.Execute() } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -4363,12 +4568,13 @@ type RestoreInstanceRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r RestoreInstanceRequest) RestoreInstancePayload(restoreInstancePayload RestoreInstancePayload) ApiRestoreInstanceRequest { r.restoreInstancePayload = &restoreInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r RestoreInstanceRequest) Execute() (*RestoreInstanceResponse, error) { var ( localVarHTTPMethod = http.MethodPost @@ -4500,7 +4706,7 @@ func (r RestoreInstanceRequest) Execute() (*RestoreInstanceResponse, error) { /* RestoreInstance: Restore instance -Restore an instance based on snapshot +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 project id @@ -4518,6 +4724,7 @@ func (a *APIClient) RestoreInstance(ctx context.Context, projectId string, insta } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) RestoreInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*RestoreInstanceResponse, error) { r := RestoreInstanceRequest{ apiService: a.defaultApi, @@ -4529,6 +4736,7 @@ func (a *APIClient) RestoreInstanceExecute(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 UpdateBackupScheduleRequest struct { ctx context.Context apiService *DefaultApiService @@ -4539,12 +4747,13 @@ type UpdateBackupScheduleRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateBackupScheduleRequest) UpdateBackupSchedulePayload(updateBackupSchedulePayload UpdateBackupSchedulePayload) ApiUpdateBackupScheduleRequest { r.updateBackupSchedulePayload = &updateBackupSchedulePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateBackupScheduleRequest) Execute() (*BackupSchedule, error) { var ( localVarHTTPMethod = http.MethodPut @@ -4676,7 +4885,7 @@ func (r UpdateBackupScheduleRequest) Execute() (*BackupSchedule, error) { /* UpdateBackupSchedule: Update schedule -Updates a backup schedule
Note that the time format is in UTC +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 project id @@ -4694,6 +4903,7 @@ func (a *APIClient) UpdateBackupSchedule(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) UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string, region string) (*BackupSchedule, error) { r := UpdateBackupScheduleRequest{ apiService: a.defaultApi, @@ -4705,6 +4915,7 @@ func (a *APIClient) UpdateBackupScheduleExecute(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 UpdateInstanceRequest struct { ctx context.Context apiService *DefaultApiService @@ -4715,12 +4926,13 @@ type UpdateInstanceRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { r.updateInstancePayload = &updateInstancePayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { var ( localVarHTTPMethod = http.MethodPut @@ -4874,7 +5086,7 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { /* UpdateInstance: Put endpoint -Updates a deployment plan
Note that the time format for the backupSchedule is in UTC +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 project id @@ -4892,6 +5104,7 @@ func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, instan } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) { r := UpdateInstanceRequest{ apiService: a.defaultApi, @@ -4903,6 +5116,7 @@ func (a *APIClient) UpdateInstanceExecute(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 UpdateUserRequest struct { ctx context.Context apiService *DefaultApiService @@ -4914,12 +5128,13 @@ type UpdateUserRequest struct { } // payload - +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateUserRequest) UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest { r.updateUserPayload = &updateUserPayload return r } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (r UpdateUserRequest) Execute() error { var ( localVarHTTPMethod = http.MethodPut @@ -5052,7 +5267,7 @@ func (r UpdateUserRequest) Execute() error { /* UpdateUser: Update User -updates user for a mongodb instance +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 project id @@ -5072,6 +5287,7 @@ func (a *APIClient) UpdateUser(ctx context.Context, projectId string, instanceId } } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (a *APIClient) UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { r := UpdateUserRequest{ apiService: a.defaultApi, diff --git a/services/mongodbflex/client.go b/services/mongodbflex/client.go index 2ce6698df..8cf54a8f1 100644 --- a/services/mongodbflex/client.go +++ b/services/mongodbflex/client.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -44,18 +45,21 @@ var ( // APIClient manages communication with the STACKIT MongoDB Service API API v2.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/mongodbflex/configuration.go b/services/mongodbflex/configuration.go index 078cdeaeb..56881d609 100644 --- a/services/mongodbflex/configuration.go +++ b/services/mongodbflex/configuration.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex 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/mongodbflex/go.mod b/services/mongodbflex/go.mod index 1bf7f19b1..bb434cc26 100644 --- a/services/mongodbflex/go.mod +++ b/services/mongodbflex/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/google/go-cmp v0.7.0 - github.com/stackitcloud/stackit-sdk-go/core v0.21.1 + github.com/stackitcloud/stackit-sdk-go/core v0.22.0 ) require ( diff --git a/services/mongodbflex/go.sum b/services/mongodbflex/go.sum index ca103c909..195011dd5 100644 --- a/services/mongodbflex/go.sum +++ b/services/mongodbflex/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/mongodbflex/model_acl.go b/services/mongodbflex/model_acl.go index 246d3755b..dc973728c 100644 --- a/services/mongodbflex/model_acl.go +++ b/services/mongodbflex/model_acl.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ACL{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetItemsAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetItemsArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACLGetItemsRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getACLGetItemsAttributeTypeOk(arg ACLGetItemsAttributeType) (ret ACLGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getACLGetItemsAttributeTypeOk(arg ACLGetItemsAttributeType) (ret ACLGetItem return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setACLGetItemsAttributeType(arg *ACLGetItemsAttributeType, val ACLGetItemsRetType) { *arg = &val } // ACL struct for ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ACL struct { Items ACLGetItemsAttributeType `json:"items,omitempty"` } @@ -46,6 +55,7 @@ type ACL 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 NewACL() *ACL { this := ACL{} return &this @@ -54,12 +64,14 @@ func NewACL() *ACL { // NewACLWithDefaults instantiates a new ACL object // This 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 NewACLWithDefaults() *ACL { this := ACL{} return &this } // GetItems returns the Items 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 *ACL) GetItems() (res ACLGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -67,21 +79,25 @@ func (o *ACL) GetItems() (res ACLGetItemsRetType) { // GetItemsOk returns a tuple with the Items 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 *ACL) GetItemsOk() (ret ACLGetItemsRetType, ok bool) { return getACLGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *ACL) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []string and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ACL) SetItems(v ACLGetItemsRetType) { setACLGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ACL) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getACLGetItemsAttributeTypeOk(o.Items); ok { @@ -90,37 +106,45 @@ func (o ACL) 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 NullableACL struct { value *ACL isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableACL) Get() *ACL { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableACL) Set(val *ACL) { 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 NullableACL) 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 *NullableACL) 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 NewNullableACL(val *ACL) *NullableACL { return &NullableACL{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 NullableACL) 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 *NullableACL) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_backup.go b/services/mongodbflex/model_backup.go index 2c82d2d72..fc0de3bb1 100644 --- a/services/mongodbflex/model_backup.go +++ b/services/mongodbflex/model_backup.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Backup{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetEndTimeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetEndTimeAttributeTypeOk(arg BackupGetEndTimeAttributeType) (ret BackupGetEndTimeRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getBackupGetEndTimeAttributeTypeOk(arg BackupGetEndTimeAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetEndTimeAttributeType(arg *BackupGetEndTimeAttributeType, val BackupGetEndTimeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetEndTimeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetEndTimeRetType = string /* @@ -43,8 +50,10 @@ type BackupGetEndTimeRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetErrorAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetErrorAttributeTypeOk(arg BackupGetErrorAttributeType) (ret BackupGetErrorRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getBackupGetErrorAttributeTypeOk(arg BackupGetErrorAttributeType) (ret Back return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetErrorAttributeType(arg *BackupGetErrorAttributeType, val BackupGetErrorRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetErrorArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetErrorRetType = string /* @@ -64,8 +77,10 @@ type BackupGetErrorRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getBackupGetIdAttributeTypeOk(arg BackupGetIdAttributeType) (ret BackupGetI return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetIdAttributeType(arg *BackupGetIdAttributeType, val BackupGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetIdRetType = string /* @@ -85,10 +104,16 @@ type BackupGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetLabelsAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetLabelsArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetLabelsRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetLabelsAttributeTypeOk(arg BackupGetLabelsAttributeType) (ret BackupGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -96,6 +121,7 @@ func getBackupGetLabelsAttributeTypeOk(arg BackupGetLabelsAttributeType) (ret Ba return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetLabelsAttributeType(arg *BackupGetLabelsAttributeType, val BackupGetLabelsRetType) { *arg = &val } @@ -105,8 +131,10 @@ func setBackupGetLabelsAttributeType(arg *BackupGetLabelsAttributeType, val Back */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetNameAttributeTypeOk(arg BackupGetNameAttributeType) (ret BackupGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -114,11 +142,15 @@ func getBackupGetNameAttributeTypeOk(arg BackupGetNameAttributeType) (ret Backup return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetNameAttributeType(arg *BackupGetNameAttributeType, val BackupGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetNameRetType = string /* @@ -126,10 +158,16 @@ type BackupGetNameRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetOptionsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetOptionsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetOptionsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetOptionsAttributeTypeOk(arg BackupGetOptionsAttributeType) (ret BackupGetOptionsRetType, ok bool) { if arg == nil { return ret, false @@ -137,6 +175,7 @@ func getBackupGetOptionsAttributeTypeOk(arg BackupGetOptionsAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetOptionsAttributeType(arg *BackupGetOptionsAttributeType, val BackupGetOptionsRetType) { *arg = &val } @@ -146,10 +185,16 @@ func setBackupGetOptionsAttributeType(arg *BackupGetOptionsAttributeType, val Ba */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetSizeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetSizeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetSizeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret BackupGetSizeRetType, ok bool) { if arg == nil { return ret, false @@ -157,6 +202,7 @@ func getBackupGetSizeAttributeTypeOk(arg BackupGetSizeAttributeType) (ret Backup return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGetSizeRetType) { *arg = &val } @@ -166,8 +212,10 @@ func setBackupGetSizeAttributeType(arg *BackupGetSizeAttributeType, val BackupGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetStartTimeAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupGetStartTimeAttributeTypeOk(arg BackupGetStartTimeAttributeType) (ret BackupGetStartTimeRetType, ok bool) { if arg == nil { return ret, false @@ -175,14 +223,19 @@ func getBackupGetStartTimeAttributeTypeOk(arg BackupGetStartTimeAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupGetStartTimeAttributeType(arg *BackupGetStartTimeAttributeType, val BackupGetStartTimeRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetStartTimeArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupGetStartTimeRetType = string // Backup struct for Backup +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Backup struct { EndTime BackupGetEndTimeAttributeType `json:"endTime,omitempty"` Error BackupGetErrorAttributeType `json:"error,omitempty"` @@ -198,6 +251,7 @@ type Backup 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 NewBackup() *Backup { this := Backup{} return &this @@ -206,12 +260,14 @@ func NewBackup() *Backup { // NewBackupWithDefaults instantiates a new Backup object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewBackupWithDefaults() *Backup { this := Backup{} return &this } // GetEndTime returns the EndTime 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 *Backup) GetEndTime() (res BackupGetEndTimeRetType) { res, _ = o.GetEndTimeOk() return @@ -219,22 +275,26 @@ func (o *Backup) GetEndTime() (res BackupGetEndTimeRetType) { // GetEndTimeOk returns a tuple with the EndTime 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 *Backup) GetEndTimeOk() (ret BackupGetEndTimeRetType, ok bool) { return getBackupGetEndTimeAttributeTypeOk(o.EndTime) } // HasEndTime 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 *Backup) HasEndTime() bool { _, ok := o.GetEndTimeOk() return ok } // SetEndTime gets a reference to the given string and assigns it to the EndTime field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Backup) SetEndTime(v BackupGetEndTimeRetType) { setBackupGetEndTimeAttributeType(&o.EndTime, v) } // GetError returns the Error 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 *Backup) GetError() (res BackupGetErrorRetType) { res, _ = o.GetErrorOk() return @@ -242,22 +302,26 @@ func (o *Backup) GetError() (res BackupGetErrorRetType) { // GetErrorOk returns a tuple with the Error 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 *Backup) GetErrorOk() (ret BackupGetErrorRetType, ok bool) { return getBackupGetErrorAttributeTypeOk(o.Error) } // HasError 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 *Backup) HasError() bool { _, ok := o.GetErrorOk() return ok } // SetError gets a reference to the given string and assigns it to the Error field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Backup) SetError(v BackupGetErrorRetType) { setBackupGetErrorAttributeType(&o.Error, 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 *Backup) GetId() (res BackupGetIdRetType) { res, _ = o.GetIdOk() return @@ -265,22 +329,26 @@ func (o *Backup) GetId() (res BackupGetIdRetType) { // 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 *Backup) GetIdOk() (ret BackupGetIdRetType, ok bool) { return getBackupGetIdAttributeTypeOk(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 *Backup) 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 *Backup) SetId(v BackupGetIdRetType) { setBackupGetIdAttributeType(&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 *Backup) GetLabels() (res BackupGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -288,22 +356,26 @@ func (o *Backup) GetLabels() (res BackupGetLabelsRetType) { // 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 *Backup) GetLabelsOk() (ret BackupGetLabelsRetType, ok bool) { return getBackupGetLabelsAttributeTypeOk(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 *Backup) HasLabels() bool { _, ok := o.GetLabelsOk() return ok } // SetLabels gets a reference to the given []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 *Backup) SetLabels(v BackupGetLabelsRetType) { setBackupGetLabelsAttributeType(&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 *Backup) GetName() (res BackupGetNameRetType) { res, _ = o.GetNameOk() return @@ -311,22 +383,26 @@ func (o *Backup) GetName() (res BackupGetNameRetType) { // 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 *Backup) GetNameOk() (ret BackupGetNameRetType, ok bool) { return getBackupGetNameAttributeTypeOk(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 *Backup) 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 *Backup) SetName(v BackupGetNameRetType) { setBackupGetNameAttributeType(&o.Name, v) } // GetOptions returns the Options 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 *Backup) GetOptions() (res BackupGetOptionsRetType) { res, _ = o.GetOptionsOk() return @@ -334,22 +410,26 @@ func (o *Backup) GetOptions() (res BackupGetOptionsRetType) { // GetOptionsOk returns a tuple with the Options 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 *Backup) GetOptionsOk() (ret BackupGetOptionsRetType, ok bool) { return getBackupGetOptionsAttributeTypeOk(o.Options) } // HasOptions 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 *Backup) HasOptions() bool { _, ok := o.GetOptionsOk() return ok } // SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Backup) SetOptions(v BackupGetOptionsRetType) { setBackupGetOptionsAttributeType(&o.Options, v) } // GetSize returns the Size 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 *Backup) GetSize() (res BackupGetSizeRetType) { res, _ = o.GetSizeOk() return @@ -357,22 +437,26 @@ func (o *Backup) GetSize() (res BackupGetSizeRetType) { // GetSizeOk returns a tuple with the Size 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 *Backup) GetSizeOk() (ret BackupGetSizeRetType, ok bool) { return getBackupGetSizeAttributeTypeOk(o.Size) } // HasSize 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 *Backup) HasSize() bool { _, ok := o.GetSizeOk() return ok } // SetSize gets a reference to the given int64 and assigns it to the Size field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Backup) SetSize(v BackupGetSizeRetType) { setBackupGetSizeAttributeType(&o.Size, v) } // GetStartTime returns the StartTime 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 *Backup) GetStartTime() (res BackupGetStartTimeRetType) { res, _ = o.GetStartTimeOk() return @@ -380,21 +464,25 @@ func (o *Backup) GetStartTime() (res BackupGetStartTimeRetType) { // GetStartTimeOk returns a tuple with the StartTime 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 *Backup) GetStartTimeOk() (ret BackupGetStartTimeRetType, ok bool) { return getBackupGetStartTimeAttributeTypeOk(o.StartTime) } // HasStartTime 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 *Backup) HasStartTime() bool { _, ok := o.GetStartTimeOk() return ok } // SetStartTime gets a reference to the given string and assigns it to the StartTime field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Backup) SetStartTime(v BackupGetStartTimeRetType) { setBackupGetStartTimeAttributeType(&o.StartTime, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Backup) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getBackupGetEndTimeAttributeTypeOk(o.EndTime); ok { @@ -424,37 +512,45 @@ func (o Backup) 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 NullableBackup struct { value *Backup isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBackup) Get() *Backup { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBackup) Set(val *Backup) { 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 NullableBackup) 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 *NullableBackup) 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 NewNullableBackup(val *Backup) *NullableBackup { return &NullableBackup{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 NullableBackup) 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 *NullableBackup) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_backup_schedule.go b/services/mongodbflex/model_backup_schedule.go index 1fa663c42..e927581df 100644 --- a/services/mongodbflex/model_backup_schedule.go +++ b/services/mongodbflex/model_backup_schedule.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &BackupSchedule{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetBackupScheduleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupScheduleGetBackupScheduleAttributeTypeOk(arg BackupScheduleGetBackupScheduleAttributeType) (ret BackupScheduleGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getBackupScheduleGetBackupScheduleAttributeTypeOk(arg BackupScheduleGetBack return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupScheduleGetBackupScheduleAttributeType(arg *BackupScheduleGetBackupScheduleAttributeType, val BackupScheduleGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetBackupScheduleRetType = string /* @@ -43,10 +50,16 @@ type BackupScheduleGetBackupScheduleRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetDailySnapshotRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetDailySnapshotRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetDailySnapshotRetentionDaysRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupScheduleGetDailySnapshotRetentionDaysAttributeTypeOk(arg BackupScheduleGetDailySnapshotRetentionDaysAttributeType) (ret BackupScheduleGetDailySnapshotRetentionDaysRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getBackupScheduleGetDailySnapshotRetentionDaysAttributeTypeOk(arg BackupSch return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupScheduleGetDailySnapshotRetentionDaysAttributeType(arg *BackupScheduleGetDailySnapshotRetentionDaysAttributeType, val BackupScheduleGetDailySnapshotRetentionDaysRetType) { *arg = &val } @@ -63,10 +77,16 @@ func setBackupScheduleGetDailySnapshotRetentionDaysAttributeType(arg *BackupSche */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetMonthlySnapshotRetentionMonthsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetMonthlySnapshotRetentionMonthsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupScheduleGetMonthlySnapshotRetentionMonthsAttributeTypeOk(arg BackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType) (ret BackupScheduleGetMonthlySnapshotRetentionMonthsRetType, ok bool) { if arg == nil { return ret, false @@ -74,6 +94,7 @@ func getBackupScheduleGetMonthlySnapshotRetentionMonthsAttributeTypeOk(arg Backu return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType(arg *BackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType, val BackupScheduleGetMonthlySnapshotRetentionMonthsRetType) { *arg = &val } @@ -83,10 +104,16 @@ func setBackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType(arg *Backup */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetPointInTimeWindowHoursAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetPointInTimeWindowHoursArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetPointInTimeWindowHoursRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupScheduleGetPointInTimeWindowHoursAttributeTypeOk(arg BackupScheduleGetPointInTimeWindowHoursAttributeType) (ret BackupScheduleGetPointInTimeWindowHoursRetType, ok bool) { if arg == nil { return ret, false @@ -94,6 +121,7 @@ func getBackupScheduleGetPointInTimeWindowHoursAttributeTypeOk(arg BackupSchedul return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupScheduleGetPointInTimeWindowHoursAttributeType(arg *BackupScheduleGetPointInTimeWindowHoursAttributeType, val BackupScheduleGetPointInTimeWindowHoursRetType) { *arg = &val } @@ -103,10 +131,16 @@ func setBackupScheduleGetPointInTimeWindowHoursAttributeType(arg *BackupSchedule */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetSnapshotRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetSnapshotRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetSnapshotRetentionDaysRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupScheduleGetSnapshotRetentionDaysAttributeTypeOk(arg BackupScheduleGetSnapshotRetentionDaysAttributeType) (ret BackupScheduleGetSnapshotRetentionDaysRetType, ok bool) { if arg == nil { return ret, false @@ -114,6 +148,7 @@ func getBackupScheduleGetSnapshotRetentionDaysAttributeTypeOk(arg BackupSchedule return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupScheduleGetSnapshotRetentionDaysAttributeType(arg *BackupScheduleGetSnapshotRetentionDaysAttributeType, val BackupScheduleGetSnapshotRetentionDaysRetType) { *arg = &val } @@ -123,10 +158,16 @@ func setBackupScheduleGetSnapshotRetentionDaysAttributeType(arg *BackupScheduleG */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetWeeklySnapshotRetentionWeeksArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupScheduleGetWeeklySnapshotRetentionWeeksRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getBackupScheduleGetWeeklySnapshotRetentionWeeksAttributeTypeOk(arg BackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType) (ret BackupScheduleGetWeeklySnapshotRetentionWeeksRetType, ok bool) { if arg == nil { return ret, false @@ -134,11 +175,13 @@ func getBackupScheduleGetWeeklySnapshotRetentionWeeksAttributeTypeOk(arg BackupS return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setBackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType(arg *BackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType, val BackupScheduleGetWeeklySnapshotRetentionWeeksRetType) { *arg = &val } // BackupSchedule struct for BackupSchedule +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type BackupSchedule struct { BackupSchedule BackupScheduleGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` // Can be cast to int32 without loss of precision. @@ -157,6 +200,7 @@ type BackupSchedule 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 NewBackupSchedule() *BackupSchedule { this := BackupSchedule{} return &this @@ -165,12 +209,14 @@ func NewBackupSchedule() *BackupSchedule { // NewBackupScheduleWithDefaults instantiates a new BackupSchedule object // This 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 NewBackupScheduleWithDefaults() *BackupSchedule { this := BackupSchedule{} return &this } // GetBackupSchedule returns the BackupSchedule 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 *BackupSchedule) GetBackupSchedule() (res BackupScheduleGetBackupScheduleRetType) { res, _ = o.GetBackupScheduleOk() return @@ -178,22 +224,26 @@ func (o *BackupSchedule) GetBackupSchedule() (res BackupScheduleGetBackupSchedul // GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *BackupSchedule) GetBackupScheduleOk() (ret BackupScheduleGetBackupScheduleRetType, ok bool) { return getBackupScheduleGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // HasBackupSchedule 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 *BackupSchedule) HasBackupSchedule() bool { _, ok := o.GetBackupScheduleOk() return ok } // SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BackupSchedule) SetBackupSchedule(v BackupScheduleGetBackupScheduleRetType) { setBackupScheduleGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays 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 *BackupSchedule) GetDailySnapshotRetentionDays() (res BackupScheduleGetDailySnapshotRetentionDaysRetType) { res, _ = o.GetDailySnapshotRetentionDaysOk() return @@ -201,22 +251,26 @@ func (o *BackupSchedule) GetDailySnapshotRetentionDays() (res BackupScheduleGetD // GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays 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 *BackupSchedule) GetDailySnapshotRetentionDaysOk() (ret BackupScheduleGetDailySnapshotRetentionDaysRetType, ok bool) { return getBackupScheduleGetDailySnapshotRetentionDaysAttributeTypeOk(o.DailySnapshotRetentionDays) } // HasDailySnapshotRetentionDays 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 *BackupSchedule) HasDailySnapshotRetentionDays() bool { _, ok := o.GetDailySnapshotRetentionDaysOk() return ok } // SetDailySnapshotRetentionDays gets a reference to the given int64 and assigns it to the DailySnapshotRetentionDays field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BackupSchedule) SetDailySnapshotRetentionDays(v BackupScheduleGetDailySnapshotRetentionDaysRetType) { setBackupScheduleGetDailySnapshotRetentionDaysAttributeType(&o.DailySnapshotRetentionDays, v) } // GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths 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 *BackupSchedule) GetMonthlySnapshotRetentionMonths() (res BackupScheduleGetMonthlySnapshotRetentionMonthsRetType) { res, _ = o.GetMonthlySnapshotRetentionMonthsOk() return @@ -224,22 +278,26 @@ func (o *BackupSchedule) GetMonthlySnapshotRetentionMonths() (res BackupSchedule // GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths 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 *BackupSchedule) GetMonthlySnapshotRetentionMonthsOk() (ret BackupScheduleGetMonthlySnapshotRetentionMonthsRetType, ok bool) { return getBackupScheduleGetMonthlySnapshotRetentionMonthsAttributeTypeOk(o.MonthlySnapshotRetentionMonths) } // HasMonthlySnapshotRetentionMonths 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 *BackupSchedule) HasMonthlySnapshotRetentionMonths() bool { _, ok := o.GetMonthlySnapshotRetentionMonthsOk() return ok } // SetMonthlySnapshotRetentionMonths gets a reference to the given int64 and assigns it to the MonthlySnapshotRetentionMonths field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BackupSchedule) SetMonthlySnapshotRetentionMonths(v BackupScheduleGetMonthlySnapshotRetentionMonthsRetType) { setBackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType(&o.MonthlySnapshotRetentionMonths, v) } // GetPointInTimeWindowHours returns the PointInTimeWindowHours 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 *BackupSchedule) GetPointInTimeWindowHours() (res BackupScheduleGetPointInTimeWindowHoursRetType) { res, _ = o.GetPointInTimeWindowHoursOk() return @@ -247,22 +305,26 @@ func (o *BackupSchedule) GetPointInTimeWindowHours() (res BackupScheduleGetPoint // GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours 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 *BackupSchedule) GetPointInTimeWindowHoursOk() (ret BackupScheduleGetPointInTimeWindowHoursRetType, ok bool) { return getBackupScheduleGetPointInTimeWindowHoursAttributeTypeOk(o.PointInTimeWindowHours) } // HasPointInTimeWindowHours 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 *BackupSchedule) HasPointInTimeWindowHours() bool { _, ok := o.GetPointInTimeWindowHoursOk() return ok } // SetPointInTimeWindowHours gets a reference to the given int64 and assigns it to the PointInTimeWindowHours field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BackupSchedule) SetPointInTimeWindowHours(v BackupScheduleGetPointInTimeWindowHoursRetType) { setBackupScheduleGetPointInTimeWindowHoursAttributeType(&o.PointInTimeWindowHours, v) } // GetSnapshotRetentionDays returns the SnapshotRetentionDays 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 *BackupSchedule) GetSnapshotRetentionDays() (res BackupScheduleGetSnapshotRetentionDaysRetType) { res, _ = o.GetSnapshotRetentionDaysOk() return @@ -270,22 +332,26 @@ func (o *BackupSchedule) GetSnapshotRetentionDays() (res BackupScheduleGetSnapsh // GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays 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 *BackupSchedule) GetSnapshotRetentionDaysOk() (ret BackupScheduleGetSnapshotRetentionDaysRetType, ok bool) { return getBackupScheduleGetSnapshotRetentionDaysAttributeTypeOk(o.SnapshotRetentionDays) } // HasSnapshotRetentionDays 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 *BackupSchedule) HasSnapshotRetentionDays() bool { _, ok := o.GetSnapshotRetentionDaysOk() return ok } // SetSnapshotRetentionDays gets a reference to the given int64 and assigns it to the SnapshotRetentionDays field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BackupSchedule) SetSnapshotRetentionDays(v BackupScheduleGetSnapshotRetentionDaysRetType) { setBackupScheduleGetSnapshotRetentionDaysAttributeType(&o.SnapshotRetentionDays, v) } // GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks 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 *BackupSchedule) GetWeeklySnapshotRetentionWeeks() (res BackupScheduleGetWeeklySnapshotRetentionWeeksRetType) { res, _ = o.GetWeeklySnapshotRetentionWeeksOk() return @@ -293,21 +359,25 @@ func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeks() (res BackupScheduleGe // GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks 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 *BackupSchedule) GetWeeklySnapshotRetentionWeeksOk() (ret BackupScheduleGetWeeklySnapshotRetentionWeeksRetType, ok bool) { return getBackupScheduleGetWeeklySnapshotRetentionWeeksAttributeTypeOk(o.WeeklySnapshotRetentionWeeks) } // HasWeeklySnapshotRetentionWeeks 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 *BackupSchedule) HasWeeklySnapshotRetentionWeeks() bool { _, ok := o.GetWeeklySnapshotRetentionWeeksOk() return ok } // SetWeeklySnapshotRetentionWeeks gets a reference to the given int64 and assigns it to the WeeklySnapshotRetentionWeeks field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *BackupSchedule) SetWeeklySnapshotRetentionWeeks(v BackupScheduleGetWeeklySnapshotRetentionWeeksRetType) { setBackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType(&o.WeeklySnapshotRetentionWeeks, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o BackupSchedule) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getBackupScheduleGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { @@ -331,37 +401,45 @@ func (o BackupSchedule) 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 NullableBackupSchedule struct { value *BackupSchedule isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableBackupSchedule) Get() *BackupSchedule { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableBackupSchedule) Set(val *BackupSchedule) { 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 NullableBackupSchedule) 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 *NullableBackupSchedule) 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 NewNullableBackupSchedule(val *BackupSchedule) *NullableBackupSchedule { return &NullableBackupSchedule{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 NullableBackupSchedule) 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 *NullableBackupSchedule) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_clone_instance_payload.go b/services/mongodbflex/model_clone_instance_payload.go index 39cc22836..2db244350 100644 --- a/services/mongodbflex/model_clone_instance_payload.go +++ b/services/mongodbflex/model_clone_instance_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CloneInstancePayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayloadGetInstanceIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCloneInstancePayloadGetInstanceIdAttributeTypeOk(arg CloneInstancePayloadGetInstanceIdAttributeType) (ret CloneInstancePayloadGetInstanceIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCloneInstancePayloadGetInstanceIdAttributeTypeOk(arg CloneInstancePayloa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCloneInstancePayloadGetInstanceIdAttributeType(arg *CloneInstancePayloadGetInstanceIdAttributeType, val CloneInstancePayloadGetInstanceIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayloadGetInstanceIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayloadGetInstanceIdRetType = string /* @@ -43,8 +50,10 @@ type CloneInstancePayloadGetInstanceIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayloadGetTimestampAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCloneInstancePayloadGetTimestampAttributeTypeOk(arg CloneInstancePayloadGetTimestampAttributeType) (ret CloneInstancePayloadGetTimestampRetType, ok bool) { if arg == nil { return ret, false @@ -52,26 +61,33 @@ func getCloneInstancePayloadGetTimestampAttributeTypeOk(arg CloneInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCloneInstancePayloadGetTimestampAttributeType(arg *CloneInstancePayloadGetTimestampAttributeType, val CloneInstancePayloadGetTimestampRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayloadGetTimestampArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayloadGetTimestampRetType = string // CloneInstancePayload struct for CloneInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstancePayload struct { // REQUIRED InstanceId CloneInstancePayloadGetInstanceIdAttributeType `json:"instanceId" required:"true"` Timestamp CloneInstancePayloadGetTimestampAttributeType `json:"timestamp,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CloneInstancePayload CloneInstancePayload // NewCloneInstancePayload instantiates a new CloneInstancePayload 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 NewCloneInstancePayload(instanceId CloneInstancePayloadGetInstanceIdArgType) *CloneInstancePayload { this := CloneInstancePayload{} setCloneInstancePayloadGetInstanceIdAttributeType(&this.InstanceId, instanceId) @@ -81,12 +97,14 @@ func NewCloneInstancePayload(instanceId CloneInstancePayloadGetInstanceIdArgType // NewCloneInstancePayloadWithDefaults instantiates a new CloneInstancePayload object // This 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 NewCloneInstancePayloadWithDefaults() *CloneInstancePayload { this := CloneInstancePayload{} return &this } // GetInstanceId returns the InstanceId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CloneInstancePayload) GetInstanceId() (ret CloneInstancePayloadGetInstanceIdRetType) { ret, _ = o.GetInstanceIdOk() return ret @@ -94,16 +112,19 @@ func (o *CloneInstancePayload) GetInstanceId() (ret CloneInstancePayloadGetInsta // GetInstanceIdOk returns a tuple with the InstanceId 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 *CloneInstancePayload) GetInstanceIdOk() (ret CloneInstancePayloadGetInstanceIdRetType, ok bool) { return getCloneInstancePayloadGetInstanceIdAttributeTypeOk(o.InstanceId) } // SetInstanceId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CloneInstancePayload) SetInstanceId(v CloneInstancePayloadGetInstanceIdRetType) { setCloneInstancePayloadGetInstanceIdAttributeType(&o.InstanceId, v) } // GetTimestamp returns the Timestamp 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 *CloneInstancePayload) GetTimestamp() (res CloneInstancePayloadGetTimestampRetType) { res, _ = o.GetTimestampOk() return @@ -111,21 +132,25 @@ func (o *CloneInstancePayload) GetTimestamp() (res CloneInstancePayloadGetTimest // GetTimestampOk returns a tuple with the Timestamp 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 *CloneInstancePayload) GetTimestampOk() (ret CloneInstancePayloadGetTimestampRetType, ok bool) { return getCloneInstancePayloadGetTimestampAttributeTypeOk(o.Timestamp) } // HasTimestamp 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 *CloneInstancePayload) HasTimestamp() bool { _, ok := o.GetTimestampOk() return ok } // SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CloneInstancePayload) SetTimestamp(v CloneInstancePayloadGetTimestampRetType) { setCloneInstancePayloadGetTimestampAttributeType(&o.Timestamp, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CloneInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCloneInstancePayloadGetInstanceIdAttributeTypeOk(o.InstanceId); ok { @@ -137,37 +162,45 @@ func (o CloneInstancePayload) 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 NullableCloneInstancePayload struct { value *CloneInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCloneInstancePayload) Get() *CloneInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCloneInstancePayload) Set(val *CloneInstancePayload) { 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 NullableCloneInstancePayload) 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 *NullableCloneInstancePayload) 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 NewNullableCloneInstancePayload(val *CloneInstancePayload) *NullableCloneInstancePayload { return &NullableCloneInstancePayload{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 NullableCloneInstancePayload) 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 *NullableCloneInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_clone_instance_response.go b/services/mongodbflex/model_clone_instance_response.go index c4ad7b09b..b019aabab 100644 --- a/services/mongodbflex/model_clone_instance_response.go +++ b/services/mongodbflex/model_clone_instance_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CloneInstanceResponse{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstanceResponseGetInstanceIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCloneInstanceResponseGetInstanceIdAttributeTypeOk(arg CloneInstanceResponseGetInstanceIdAttributeType) (ret CloneInstanceResponseGetInstanceIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getCloneInstanceResponseGetInstanceIdAttributeTypeOk(arg CloneInstanceRespo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCloneInstanceResponseGetInstanceIdAttributeType(arg *CloneInstanceResponseGetInstanceIdAttributeType, val CloneInstanceResponseGetInstanceIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstanceResponseGetInstanceIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstanceResponseGetInstanceIdRetType = string // CloneInstanceResponse struct for CloneInstanceResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CloneInstanceResponse struct { InstanceId CloneInstanceResponseGetInstanceIdAttributeType `json:"instanceId,omitempty"` } @@ -47,6 +55,7 @@ type CloneInstanceResponse 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 NewCloneInstanceResponse() *CloneInstanceResponse { this := CloneInstanceResponse{} return &this @@ -55,12 +64,14 @@ func NewCloneInstanceResponse() *CloneInstanceResponse { // NewCloneInstanceResponseWithDefaults instantiates a new CloneInstanceResponse object // This 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 NewCloneInstanceResponseWithDefaults() *CloneInstanceResponse { this := CloneInstanceResponse{} return &this } // GetInstanceId returns the InstanceId 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 *CloneInstanceResponse) GetInstanceId() (res CloneInstanceResponseGetInstanceIdRetType) { res, _ = o.GetInstanceIdOk() return @@ -68,21 +79,25 @@ func (o *CloneInstanceResponse) GetInstanceId() (res CloneInstanceResponseGetIns // GetInstanceIdOk returns a tuple with the InstanceId 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 *CloneInstanceResponse) GetInstanceIdOk() (ret CloneInstanceResponseGetInstanceIdRetType, ok bool) { return getCloneInstanceResponseGetInstanceIdAttributeTypeOk(o.InstanceId) } // HasInstanceId 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 *CloneInstanceResponse) HasInstanceId() bool { _, ok := o.GetInstanceIdOk() return ok } // SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CloneInstanceResponse) SetInstanceId(v CloneInstanceResponseGetInstanceIdRetType) { setCloneInstanceResponseGetInstanceIdAttributeType(&o.InstanceId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CloneInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCloneInstanceResponseGetInstanceIdAttributeTypeOk(o.InstanceId); ok { @@ -91,37 +106,45 @@ func (o CloneInstanceResponse) 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 NullableCloneInstanceResponse struct { value *CloneInstanceResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCloneInstanceResponse) Get() *CloneInstanceResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCloneInstanceResponse) Set(val *CloneInstanceResponse) { 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 NullableCloneInstanceResponse) 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 *NullableCloneInstanceResponse) 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 NewNullableCloneInstanceResponse(val *CloneInstanceResponse) *NullableCloneInstanceResponse { return &NullableCloneInstanceResponse{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 NullableCloneInstanceResponse) 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 *NullableCloneInstanceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_create_instance_payload.go b/services/mongodbflex/model_create_instance_payload.go index ea514474c..706db2ca6 100644 --- a/services/mongodbflex/model_create_instance_payload.go +++ b/services/mongodbflex/model_create_instance_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateInstancePayload{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetAclAttributeType = *CreateInstancePayloadAcl + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetAclArgType = CreateInstancePayloadAcl + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetAclRetType = CreateInstancePayloadAcl +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetAclAttributeType) (ret CreateInstancePayloadGetAclRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetAclAttributeType(arg *CreateInstancePayloadGetAclAttributeType, val CreateInstancePayloadGetAclRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setCreateInstancePayloadGetAclAttributeType(arg *CreateInstancePayloadGetAc */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetBackupScheduleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(arg CreateInstancePayloadGetBackupScheduleAttributeType) (ret CreateInstancePayloadGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(arg CreateInstance return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetBackupScheduleAttributeType(arg *CreateInstancePayloadGetBackupScheduleAttributeType, val CreateInstancePayloadGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetBackupScheduleRetType = string /* @@ -63,8 +77,10 @@ type CreateInstancePayloadGetBackupScheduleRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetFlavorIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetFlavorIdAttributeTypeOk(arg CreateInstancePayloadGetFlavorIdAttributeType) (ret CreateInstancePayloadGetFlavorIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +88,15 @@ func getCreateInstancePayloadGetFlavorIdAttributeTypeOk(arg CreateInstancePayloa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetFlavorIdAttributeType(arg *CreateInstancePayloadGetFlavorIdAttributeType, val CreateInstancePayloadGetFlavorIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetFlavorIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetFlavorIdRetType = string /* @@ -84,10 +104,16 @@ type CreateInstancePayloadGetFlavorIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetLabelsAttributeTypeOk(arg CreateInstancePayloadGetLabelsAttributeType) (ret CreateInstancePayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +121,7 @@ func getCreateInstancePayloadGetLabelsAttributeTypeOk(arg CreateInstancePayloadG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetLabelsAttributeType(arg *CreateInstancePayloadGetLabelsAttributeType, val CreateInstancePayloadGetLabelsRetType) { *arg = &val } @@ -104,8 +131,10 @@ func setCreateInstancePayloadGetLabelsAttributeType(arg *CreateInstancePayloadGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetNameAttributeTypeOk(arg CreateInstancePayloadGetNameAttributeType) (ret CreateInstancePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +142,15 @@ func getCreateInstancePayloadGetNameAttributeTypeOk(arg CreateInstancePayloadGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetNameAttributeType(arg *CreateInstancePayloadGetNameAttributeType, val CreateInstancePayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetNameRetType = string /* @@ -125,10 +158,16 @@ type CreateInstancePayloadGetNameRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetOptionsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetOptionsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetOptionsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetOptionsAttributeTypeOk(arg CreateInstancePayloadGetOptionsAttributeType) (ret CreateInstancePayloadGetOptionsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +175,7 @@ func getCreateInstancePayloadGetOptionsAttributeTypeOk(arg CreateInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetOptionsAttributeType(arg *CreateInstancePayloadGetOptionsAttributeType, val CreateInstancePayloadGetOptionsRetType) { *arg = &val } @@ -145,10 +185,16 @@ func setCreateInstancePayloadGetOptionsAttributeType(arg *CreateInstancePayloadG */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetReplicasAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetReplicasArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetReplicasRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetReplicasAttributeTypeOk(arg CreateInstancePayloadGetReplicasAttributeType) (ret CreateInstancePayloadGetReplicasRetType, ok bool) { if arg == nil { return ret, false @@ -156,6 +202,7 @@ func getCreateInstancePayloadGetReplicasAttributeTypeOk(arg CreateInstancePayloa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetReplicasAttributeType(arg *CreateInstancePayloadGetReplicasAttributeType, val CreateInstancePayloadGetReplicasRetType) { *arg = &val } @@ -165,10 +212,16 @@ func setCreateInstancePayloadGetReplicasAttributeType(arg *CreateInstancePayload */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetStorageAttributeType = *Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetStorageArgType = Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetStorageRetType = Storage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetStorageAttributeTypeOk(arg CreateInstancePayloadGetStorageAttributeType) (ret CreateInstancePayloadGetStorageRetType, ok bool) { if arg == nil { return ret, false @@ -176,6 +229,7 @@ func getCreateInstancePayloadGetStorageAttributeTypeOk(arg CreateInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetStorageAttributeType(arg *CreateInstancePayloadGetStorageAttributeType, val CreateInstancePayloadGetStorageRetType) { *arg = &val } @@ -185,8 +239,10 @@ func setCreateInstancePayloadGetStorageAttributeType(arg *CreateInstancePayloadG */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadGetVersionAttributeTypeOk(arg CreateInstancePayloadGetVersionAttributeType) (ret CreateInstancePayloadGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -194,14 +250,19 @@ func getCreateInstancePayloadGetVersionAttributeTypeOk(arg CreateInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadGetVersionAttributeType(arg *CreateInstancePayloadGetVersionAttributeType, val CreateInstancePayloadGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadGetVersionRetType = string // CreateInstancePayload struct for CreateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayload struct { // REQUIRED Acl CreateInstancePayloadGetAclAttributeType `json:"acl" required:"true"` @@ -224,12 +285,14 @@ type CreateInstancePayload struct { Version CreateInstancePayloadGetVersionAttributeType `json:"version" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateInstancePayload CreateInstancePayload // NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(acl CreateInstancePayloadGetAclArgType, backupSchedule CreateInstancePayloadGetBackupScheduleArgType, flavorId CreateInstancePayloadGetFlavorIdArgType, name CreateInstancePayloadGetNameArgType, options CreateInstancePayloadGetOptionsArgType, replicas CreateInstancePayloadGetReplicasArgType, storage CreateInstancePayloadGetStorageArgType, version CreateInstancePayloadGetVersionArgType) *CreateInstancePayload { this := CreateInstancePayload{} setCreateInstancePayloadGetAclAttributeType(&this.Acl, acl) @@ -246,12 +309,14 @@ func NewCreateInstancePayload(acl CreateInstancePayloadGetAclArgType, backupSche // NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload object // This 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { this := CreateInstancePayload{} return &this } // GetAcl returns the Acl field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetAcl() (ret CreateInstancePayloadGetAclRetType) { ret, _ = o.GetAclOk() return ret @@ -259,16 +324,19 @@ func (o *CreateInstancePayload) GetAcl() (ret CreateInstancePayloadGetAclRetType // GetAclOk returns a tuple with the Acl 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 *CreateInstancePayload) GetAclOk() (ret CreateInstancePayloadGetAclRetType, ok bool) { return getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl) } // SetAcl sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetAcl(v CreateInstancePayloadGetAclRetType) { setCreateInstancePayloadGetAclAttributeType(&o.Acl, v) } // GetBackupSchedule returns the BackupSchedule field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetBackupSchedule() (ret CreateInstancePayloadGetBackupScheduleRetType) { ret, _ = o.GetBackupScheduleOk() return ret @@ -276,16 +344,19 @@ func (o *CreateInstancePayload) GetBackupSchedule() (ret CreateInstancePayloadGe // GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *CreateInstancePayload) GetBackupScheduleOk() (ret CreateInstancePayloadGetBackupScheduleRetType, ok bool) { return getCreateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // SetBackupSchedule sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetBackupSchedule(v CreateInstancePayloadGetBackupScheduleRetType) { setCreateInstancePayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetFlavorId returns the FlavorId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetFlavorId() (ret CreateInstancePayloadGetFlavorIdRetType) { ret, _ = o.GetFlavorIdOk() return ret @@ -293,16 +364,19 @@ func (o *CreateInstancePayload) GetFlavorId() (ret CreateInstancePayloadGetFlavo // GetFlavorIdOk returns a tuple with the FlavorId 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 *CreateInstancePayload) GetFlavorIdOk() (ret CreateInstancePayloadGetFlavorIdRetType, ok bool) { return getCreateInstancePayloadGetFlavorIdAttributeTypeOk(o.FlavorId) } // SetFlavorId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetFlavorId(v CreateInstancePayloadGetFlavorIdRetType) { setCreateInstancePayloadGetFlavorIdAttributeType(&o.FlavorId, 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 *CreateInstancePayload) GetLabels() (res CreateInstancePayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -310,22 +384,26 @@ func (o *CreateInstancePayload) GetLabels() (res CreateInstancePayloadGetLabelsR // 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 *CreateInstancePayload) GetLabelsOk() (ret CreateInstancePayloadGetLabelsRetType, ok bool) { return getCreateInstancePayloadGetLabelsAttributeTypeOk(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 *CreateInstancePayload) 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 *CreateInstancePayload) SetLabels(v CreateInstancePayloadGetLabelsRetType) { setCreateInstancePayloadGetLabelsAttributeType(&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 *CreateInstancePayload) GetName() (ret CreateInstancePayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -333,16 +411,19 @@ func (o *CreateInstancePayload) GetName() (ret CreateInstancePayloadGetNameRetTy // 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 *CreateInstancePayload) GetNameOk() (ret CreateInstancePayloadGetNameRetType, ok bool) { return getCreateInstancePayloadGetNameAttributeTypeOk(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 *CreateInstancePayload) SetName(v CreateInstancePayloadGetNameRetType) { setCreateInstancePayloadGetNameAttributeType(&o.Name, v) } // GetOptions returns the Options field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetOptions() (ret CreateInstancePayloadGetOptionsRetType) { ret, _ = o.GetOptionsOk() return ret @@ -350,16 +431,19 @@ func (o *CreateInstancePayload) GetOptions() (ret CreateInstancePayloadGetOption // GetOptionsOk returns a tuple with the Options 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 *CreateInstancePayload) GetOptionsOk() (ret CreateInstancePayloadGetOptionsRetType, ok bool) { return getCreateInstancePayloadGetOptionsAttributeTypeOk(o.Options) } // SetOptions sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetOptions(v CreateInstancePayloadGetOptionsRetType) { setCreateInstancePayloadGetOptionsAttributeType(&o.Options, v) } // GetReplicas returns the Replicas field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetReplicas() (ret CreateInstancePayloadGetReplicasRetType) { ret, _ = o.GetReplicasOk() return ret @@ -367,16 +451,19 @@ func (o *CreateInstancePayload) GetReplicas() (ret CreateInstancePayloadGetRepli // GetReplicasOk returns a tuple with the Replicas 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 *CreateInstancePayload) GetReplicasOk() (ret CreateInstancePayloadGetReplicasRetType, ok bool) { return getCreateInstancePayloadGetReplicasAttributeTypeOk(o.Replicas) } // SetReplicas sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetReplicas(v CreateInstancePayloadGetReplicasRetType) { setCreateInstancePayloadGetReplicasAttributeType(&o.Replicas, v) } // GetStorage returns the Storage field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetStorage() (ret CreateInstancePayloadGetStorageRetType) { ret, _ = o.GetStorageOk() return ret @@ -384,16 +471,19 @@ func (o *CreateInstancePayload) GetStorage() (ret CreateInstancePayloadGetStorag // GetStorageOk returns a tuple with the Storage 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 *CreateInstancePayload) GetStorageOk() (ret CreateInstancePayloadGetStorageRetType, ok bool) { return getCreateInstancePayloadGetStorageAttributeTypeOk(o.Storage) } // SetStorage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetStorage(v CreateInstancePayloadGetStorageRetType) { setCreateInstancePayloadGetStorageAttributeType(&o.Storage, v) } // GetVersion returns the Version field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) GetVersion() (ret CreateInstancePayloadGetVersionRetType) { ret, _ = o.GetVersionOk() return ret @@ -401,15 +491,18 @@ func (o *CreateInstancePayload) GetVersion() (ret CreateInstancePayloadGetVersio // GetVersionOk returns a tuple with the Version 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 *CreateInstancePayload) GetVersionOk() (ret CreateInstancePayloadGetVersionRetType, ok bool) { return getCreateInstancePayloadGetVersionAttributeTypeOk(o.Version) } // SetVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayload) SetVersion(v CreateInstancePayloadGetVersionRetType) { setCreateInstancePayloadGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { @@ -442,37 +535,45 @@ func (o CreateInstancePayload) 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 NullableCreateInstancePayload struct { value *CreateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { 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 NullableCreateInstancePayload) 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 *NullableCreateInstancePayload) 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 NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { return &NullableCreateInstancePayload{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 NullableCreateInstancePayload) 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 *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_create_instance_payload_acl.go b/services/mongodbflex/model_create_instance_payload_acl.go index ddfd27971..c82423fed 100644 --- a/services/mongodbflex/model_create_instance_payload_acl.go +++ b/services/mongodbflex/model_create_instance_payload_acl.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateInstancePayloadAcl{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadAclGetItemsAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadAclGetItemsArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadAclGetItemsRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstancePayloadAclGetItemsAttributeTypeOk(arg CreateInstancePayloadAclGetItemsAttributeType) (ret CreateInstancePayloadAclGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getCreateInstancePayloadAclGetItemsAttributeTypeOk(arg CreateInstancePayloa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstancePayloadAclGetItemsAttributeType(arg *CreateInstancePayloadAclGetItemsAttributeType, val CreateInstancePayloadAclGetItemsRetType) { *arg = &val } // CreateInstancePayloadAcl ACL is the Access Control List defining the IP ranges allowed to connect to the database +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstancePayloadAcl struct { Items CreateInstancePayloadAclGetItemsAttributeType `json:"items,omitempty"` } @@ -46,6 +55,7 @@ type CreateInstancePayloadAcl 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 NewCreateInstancePayloadAcl() *CreateInstancePayloadAcl { this := CreateInstancePayloadAcl{} return &this @@ -54,12 +64,14 @@ func NewCreateInstancePayloadAcl() *CreateInstancePayloadAcl { // NewCreateInstancePayloadAclWithDefaults instantiates a new CreateInstancePayloadAcl object // This 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 NewCreateInstancePayloadAclWithDefaults() *CreateInstancePayloadAcl { this := CreateInstancePayloadAcl{} return &this } // GetItems returns the Items 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 *CreateInstancePayloadAcl) GetItems() (res CreateInstancePayloadAclGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -67,21 +79,25 @@ func (o *CreateInstancePayloadAcl) GetItems() (res CreateInstancePayloadAclGetIt // GetItemsOk returns a tuple with the Items 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 *CreateInstancePayloadAcl) GetItemsOk() (ret CreateInstancePayloadAclGetItemsRetType, ok bool) { return getCreateInstancePayloadAclGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *CreateInstancePayloadAcl) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []string and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateInstancePayloadAcl) SetItems(v CreateInstancePayloadAclGetItemsRetType) { setCreateInstancePayloadAclGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateInstancePayloadAcl) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstancePayloadAclGetItemsAttributeTypeOk(o.Items); ok { @@ -90,37 +106,45 @@ func (o CreateInstancePayloadAcl) 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 NullableCreateInstancePayloadAcl struct { value *CreateInstancePayloadAcl isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstancePayloadAcl) Get() *CreateInstancePayloadAcl { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateInstancePayloadAcl) Set(val *CreateInstancePayloadAcl) { 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 NullableCreateInstancePayloadAcl) 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 *NullableCreateInstancePayloadAcl) 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 NewNullableCreateInstancePayloadAcl(val *CreateInstancePayloadAcl) *NullableCreateInstancePayloadAcl { return &NullableCreateInstancePayloadAcl{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 NullableCreateInstancePayloadAcl) 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 *NullableCreateInstancePayloadAcl) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_create_instance_response.go b/services/mongodbflex/model_create_instance_response.go index 174435e45..14ce9de9c 100644 --- a/services/mongodbflex/model_create_instance_response.go +++ b/services/mongodbflex/model_create_instance_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateInstanceResponse{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstanceResponseGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateInstanceResponseGetIdAttributeTypeOk(arg CreateInstanceResponseGetIdAttributeType) (ret CreateInstanceResponseGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,14 +34,19 @@ func getCreateInstanceResponseGetIdAttributeTypeOk(arg CreateInstanceResponseGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateInstanceResponseGetIdAttributeType(arg *CreateInstanceResponseGetIdAttributeType, val CreateInstanceResponseGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstanceResponseGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstanceResponseGetIdRetType = string // CreateInstanceResponse struct for CreateInstanceResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateInstanceResponse struct { Id CreateInstanceResponseGetIdAttributeType `json:"id,omitempty"` } @@ -47,6 +55,7 @@ type CreateInstanceResponse 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 NewCreateInstanceResponse() *CreateInstanceResponse { this := CreateInstanceResponse{} return &this @@ -55,12 +64,14 @@ func NewCreateInstanceResponse() *CreateInstanceResponse { // NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { this := CreateInstanceResponse{} return &this } // 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 *CreateInstanceResponse) GetId() (res CreateInstanceResponseGetIdRetType) { res, _ = o.GetIdOk() return @@ -68,21 +79,25 @@ func (o *CreateInstanceResponse) GetId() (res CreateInstanceResponseGetIdRetType // 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 *CreateInstanceResponse) GetIdOk() (ret CreateInstanceResponseGetIdRetType, ok bool) { return getCreateInstanceResponseGetIdAttributeTypeOk(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 *CreateInstanceResponse) 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 *CreateInstanceResponse) SetId(v CreateInstanceResponseGetIdRetType) { setCreateInstanceResponseGetIdAttributeType(&o.Id, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateInstanceResponseGetIdAttributeTypeOk(o.Id); ok { @@ -91,37 +106,45 @@ func (o CreateInstanceResponse) 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 NullableCreateInstanceResponse struct { value *CreateInstanceResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { 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 NullableCreateInstanceResponse) 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 *NullableCreateInstanceResponse) 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 NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { return &NullableCreateInstanceResponse{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 NullableCreateInstanceResponse) 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 *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_create_user_payload.go b/services/mongodbflex/model_create_user_payload.go index e0b8468cb..e94b157fa 100644 --- a/services/mongodbflex/model_create_user_payload.go +++ b/services/mongodbflex/model_create_user_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &CreateUserPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetDatabaseAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateUserPayloadGetDatabaseAttributeTypeOk(arg CreateUserPayloadGetDatabaseAttributeType) (ret CreateUserPayloadGetDatabaseRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getCreateUserPayloadGetDatabaseAttributeTypeOk(arg CreateUserPayloadGetData return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateUserPayloadGetDatabaseAttributeType(arg *CreateUserPayloadGetDatabaseAttributeType, val CreateUserPayloadGetDatabaseRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetDatabaseRetType = string /* @@ -43,10 +50,16 @@ type CreateUserPayloadGetDatabaseRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetRolesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetRolesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateUserPayloadGetRolesAttributeTypeOk(arg CreateUserPayloadGetRolesAttributeType) (ret CreateUserPayloadGetRolesRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getCreateUserPayloadGetRolesAttributeTypeOk(arg CreateUserPayloadGetRolesAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateUserPayloadGetRolesAttributeType(arg *CreateUserPayloadGetRolesAttributeType, val CreateUserPayloadGetRolesRetType) { *arg = &val } @@ -63,8 +77,10 @@ func setCreateUserPayloadGetRolesAttributeType(arg *CreateUserPayloadGetRolesAtt */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetUsernameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateUserPayloadGetUsernameAttributeTypeOk(arg CreateUserPayloadGetUsernameAttributeType) (ret CreateUserPayloadGetUsernameRetType, ok bool) { if arg == nil { return ret, false @@ -72,14 +88,19 @@ func getCreateUserPayloadGetUsernameAttributeTypeOk(arg CreateUserPayloadGetUser return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateUserPayloadGetUsernameAttributeType(arg *CreateUserPayloadGetUsernameAttributeType, val CreateUserPayloadGetUsernameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayloadGetUsernameRetType = string // CreateUserPayload struct for CreateUserPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserPayload struct { // REQUIRED Database CreateUserPayloadGetDatabaseAttributeType `json:"database" required:"true"` @@ -89,12 +110,14 @@ type CreateUserPayload struct { Username CreateUserPayloadGetUsernameAttributeType `json:"username,omitempty"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _CreateUserPayload CreateUserPayload // NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(database CreateUserPayloadGetDatabaseArgType, roles CreateUserPayloadGetRolesArgType) *CreateUserPayload { this := CreateUserPayload{} setCreateUserPayloadGetDatabaseAttributeType(&this.Database, database) @@ -105,12 +128,14 @@ func NewCreateUserPayload(database CreateUserPayloadGetDatabaseArgType, roles Cr // NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload object // This 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { this := CreateUserPayload{} return &this } // GetDatabase returns the Database field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) GetDatabase() (ret CreateUserPayloadGetDatabaseRetType) { ret, _ = o.GetDatabaseOk() return ret @@ -118,16 +143,19 @@ func (o *CreateUserPayload) GetDatabase() (ret CreateUserPayloadGetDatabaseRetTy // GetDatabaseOk returns a tuple with the Database 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 *CreateUserPayload) GetDatabaseOk() (ret CreateUserPayloadGetDatabaseRetType, ok bool) { return getCreateUserPayloadGetDatabaseAttributeTypeOk(o.Database) } // SetDatabase sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) SetDatabase(v CreateUserPayloadGetDatabaseRetType) { setCreateUserPayloadGetDatabaseAttributeType(&o.Database, v) } // GetRoles returns the Roles field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) GetRoles() (ret CreateUserPayloadGetRolesRetType) { ret, _ = o.GetRolesOk() return ret @@ -135,16 +163,19 @@ func (o *CreateUserPayload) GetRoles() (ret CreateUserPayloadGetRolesRetType) { // GetRolesOk returns a tuple with the Roles 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 *CreateUserPayload) GetRolesOk() (ret CreateUserPayloadGetRolesRetType, ok bool) { return getCreateUserPayloadGetRolesAttributeTypeOk(o.Roles) } // SetRoles sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) SetRoles(v CreateUserPayloadGetRolesRetType) { setCreateUserPayloadGetRolesAttributeType(&o.Roles, v) } // GetUsername returns the Username 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 *CreateUserPayload) GetUsername() (res CreateUserPayloadGetUsernameRetType) { res, _ = o.GetUsernameOk() return @@ -152,21 +183,25 @@ func (o *CreateUserPayload) GetUsername() (res CreateUserPayloadGetUsernameRetTy // GetUsernameOk returns a tuple with the Username 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 *CreateUserPayload) GetUsernameOk() (ret CreateUserPayloadGetUsernameRetType, ok bool) { return getCreateUserPayloadGetUsernameAttributeTypeOk(o.Username) } // HasUsername 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 *CreateUserPayload) HasUsername() bool { _, ok := o.GetUsernameOk() return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserPayload) SetUsername(v CreateUserPayloadGetUsernameRetType) { setCreateUserPayloadGetUsernameAttributeType(&o.Username, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateUserPayloadGetDatabaseAttributeTypeOk(o.Database); ok { @@ -181,37 +216,45 @@ func (o CreateUserPayload) 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 NullableCreateUserPayload struct { value *CreateUserPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateUserPayload) Get() *CreateUserPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { 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 NullableCreateUserPayload) 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 *NullableCreateUserPayload) 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 NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { return &NullableCreateUserPayload{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 NullableCreateUserPayload) 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 *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_create_user_response.go b/services/mongodbflex/model_create_user_response.go index dd2d372db..59ed18b7c 100644 --- a/services/mongodbflex/model_create_user_response.go +++ b/services/mongodbflex/model_create_user_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &CreateUserResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserResponseGetItemAttributeType = *User + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserResponseGetItemArgType = User + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserResponseGetItemRetType = User +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getCreateUserResponseGetItemAttributeTypeOk(arg CreateUserResponseGetItemAttributeType) (ret CreateUserResponseGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getCreateUserResponseGetItemAttributeTypeOk(arg CreateUserResponseGetItemAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setCreateUserResponseGetItemAttributeType(arg *CreateUserResponseGetItemAttributeType, val CreateUserResponseGetItemRetType) { *arg = &val } // CreateUserResponse struct for CreateUserResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type CreateUserResponse struct { Item CreateUserResponseGetItemAttributeType `json:"item,omitempty"` } @@ -46,6 +55,7 @@ type CreateUserResponse 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 NewCreateUserResponse() *CreateUserResponse { this := CreateUserResponse{} return &this @@ -54,12 +64,14 @@ func NewCreateUserResponse() *CreateUserResponse { // NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewCreateUserResponseWithDefaults() *CreateUserResponse { this := CreateUserResponse{} return &this } // GetItem returns the Item 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 *CreateUserResponse) GetItem() (res CreateUserResponseGetItemRetType) { res, _ = o.GetItemOk() return @@ -67,21 +79,25 @@ func (o *CreateUserResponse) GetItem() (res CreateUserResponseGetItemRetType) { // GetItemOk returns a tuple with the Item 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 *CreateUserResponse) GetItemOk() (ret CreateUserResponseGetItemRetType, ok bool) { return getCreateUserResponseGetItemAttributeTypeOk(o.Item) } // HasItem 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 *CreateUserResponse) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given User and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *CreateUserResponse) SetItem(v CreateUserResponseGetItemRetType) { setCreateUserResponseGetItemAttributeType(&o.Item, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getCreateUserResponseGetItemAttributeTypeOk(o.Item); ok { @@ -90,37 +106,45 @@ func (o CreateUserResponse) 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 NullableCreateUserResponse struct { value *CreateUserResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableCreateUserResponse) Get() *CreateUserResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { 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 NullableCreateUserResponse) 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 *NullableCreateUserResponse) 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 NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { return &NullableCreateUserResponse{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 NullableCreateUserResponse) 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 *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_data_point.go b/services/mongodbflex/model_data_point.go index 0a80ba019..2cfc44140 100644 --- a/services/mongodbflex/model_data_point.go +++ b/services/mongodbflex/model_data_point.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &DataPoint{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPointGetTimestampAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getDataPointGetTimestampAttributeTypeOk(arg DataPointGetTimestampAttributeType) (ret DataPointGetTimestampRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getDataPointGetTimestampAttributeTypeOk(arg DataPointGetTimestampAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setDataPointGetTimestampAttributeType(arg *DataPointGetTimestampAttributeType, val DataPointGetTimestampRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPointGetTimestampArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPointGetTimestampRetType = string /* @@ -43,10 +50,16 @@ type DataPointGetTimestampRetType = string */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPointGetValueAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPointGetValueArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPointGetValueRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getDataPointGetValueAttributeTypeOk(arg DataPointGetValueAttributeType) (ret DataPointGetValueRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getDataPointGetValueAttributeTypeOk(arg DataPointGetValueAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setDataPointGetValueAttributeType(arg *DataPointGetValueAttributeType, val DataPointGetValueRetType) { *arg = &val } // DataPoint struct for DataPoint +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type DataPoint struct { Timestamp DataPointGetTimestampAttributeType `json:"timestamp,omitempty"` Value DataPointGetValueAttributeType `json:"value,omitempty"` @@ -68,6 +83,7 @@ type DataPoint 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 NewDataPoint() *DataPoint { this := DataPoint{} return &this @@ -76,12 +92,14 @@ func NewDataPoint() *DataPoint { // NewDataPointWithDefaults instantiates a new DataPoint object // This 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 NewDataPointWithDefaults() *DataPoint { this := DataPoint{} return &this } // GetTimestamp returns the Timestamp 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 *DataPoint) GetTimestamp() (res DataPointGetTimestampRetType) { res, _ = o.GetTimestampOk() return @@ -89,22 +107,26 @@ func (o *DataPoint) GetTimestamp() (res DataPointGetTimestampRetType) { // GetTimestampOk returns a tuple with the Timestamp 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 *DataPoint) GetTimestampOk() (ret DataPointGetTimestampRetType, ok bool) { return getDataPointGetTimestampAttributeTypeOk(o.Timestamp) } // HasTimestamp 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 *DataPoint) HasTimestamp() bool { _, ok := o.GetTimestampOk() return ok } // SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *DataPoint) SetTimestamp(v DataPointGetTimestampRetType) { setDataPointGetTimestampAttributeType(&o.Timestamp, v) } // GetValue returns the Value 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 *DataPoint) GetValue() (res DataPointGetValueRetType) { res, _ = o.GetValueOk() return @@ -112,21 +134,25 @@ func (o *DataPoint) GetValue() (res DataPointGetValueRetType) { // GetValueOk returns a tuple with the Value 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 *DataPoint) GetValueOk() (ret DataPointGetValueRetType, ok bool) { return getDataPointGetValueAttributeTypeOk(o.Value) } // HasValue 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 *DataPoint) HasValue() bool { _, ok := o.GetValueOk() return ok } // SetValue gets a reference to the given float64 and assigns it to the Value field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *DataPoint) SetValue(v DataPointGetValueRetType) { setDataPointGetValueAttributeType(&o.Value, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o DataPoint) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getDataPointGetTimestampAttributeTypeOk(o.Timestamp); ok { @@ -138,37 +164,45 @@ func (o DataPoint) 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 NullableDataPoint struct { value *DataPoint isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableDataPoint) Get() *DataPoint { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableDataPoint) Set(val *DataPoint) { 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 NullableDataPoint) 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 *NullableDataPoint) 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 NewNullableDataPoint(val *DataPoint) *NullableDataPoint { return &NullableDataPoint{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 NullableDataPoint) 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 *NullableDataPoint) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_error.go b/services/mongodbflex/model_error.go index a8e78d18e..63afee398 100644 --- a/services/mongodbflex/model_error.go +++ b/services/mongodbflex/model_error.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Error{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetCodeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetCodeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetCodeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetCodeAttributeTypeOk(arg ErrorGetCodeAttributeType) (ret ErrorGetCodeRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getErrorGetCodeAttributeTypeOk(arg ErrorGetCodeAttributeType) (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 setErrorGetCodeAttributeType(arg *ErrorGetCodeAttributeType, val ErrorGetCodeRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setErrorGetCodeAttributeType(arg *ErrorGetCodeAttributeType, val ErrorGetCo */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetFieldsAttributeType = *map[string][]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetFieldsArgType = map[string][]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetFieldsRetType = map[string][]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetFieldsAttributeTypeOk(arg ErrorGetFieldsAttributeType) (ret ErrorGetFieldsRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getErrorGetFieldsAttributeTypeOk(arg ErrorGetFieldsAttributeType) (ret Erro return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetFieldsAttributeType(arg *ErrorGetFieldsAttributeType, val ErrorGetFieldsRetType) { *arg = &val } @@ -62,8 +77,10 @@ func setErrorGetFieldsAttributeType(arg *ErrorGetFieldsAttributeType, val ErrorG */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetMessageAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret ErrorGetMessageRetType, ok bool) { if arg == nil { return ret, false @@ -71,11 +88,15 @@ func getErrorGetMessageAttributeTypeOk(arg ErrorGetMessageAttributeType) (ret Er return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setErrorGetMessageAttributeType(arg *ErrorGetMessageAttributeType, val ErrorGetMessageRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetMessageArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ErrorGetMessageRetType = string /* @@ -83,8 +104,10 @@ type ErrorGetMessageRetType = 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 @@ -92,14 +115,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 { // Can be cast to int32 without loss of precision. Code ErrorGetCodeAttributeType `json:"code,omitempty"` @@ -112,6 +140,7 @@ type Error 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 NewError() *Error { this := Error{} return &this @@ -120,12 +149,14 @@ func NewError() *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 } // 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 *Error) GetCode() (res ErrorGetCodeRetType) { res, _ = o.GetCodeOk() return @@ -133,22 +164,26 @@ func (o *Error) GetCode() (res ErrorGetCodeRetType) { // 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 *Error) GetCodeOk() (ret ErrorGetCodeRetType, ok bool) { return getErrorGetCodeAttributeTypeOk(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 *Error) 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 *Error) SetCode(v ErrorGetCodeRetType) { setErrorGetCodeAttributeType(&o.Code, v) } // GetFields returns the Fields 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 *Error) GetFields() (res ErrorGetFieldsRetType) { res, _ = o.GetFieldsOk() return @@ -156,22 +191,26 @@ func (o *Error) GetFields() (res ErrorGetFieldsRetType) { // GetFieldsOk returns a tuple with the Fields 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 *Error) GetFieldsOk() (ret ErrorGetFieldsRetType, ok bool) { return getErrorGetFieldsAttributeTypeOk(o.Fields) } // HasFields 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) HasFields() bool { _, ok := o.GetFieldsOk() return ok } // SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Error) SetFields(v ErrorGetFieldsRetType) { setErrorGetFieldsAttributeType(&o.Fields, 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 *Error) GetMessage() (res ErrorGetMessageRetType) { res, _ = o.GetMessageOk() return @@ -179,22 +218,26 @@ func (o *Error) GetMessage() (res ErrorGetMessageRetType) { // 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 *Error) GetMessageOk() (ret ErrorGetMessageRetType, ok bool) { return getErrorGetMessageAttributeTypeOk(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 *Error) 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 *Error) SetMessage(v ErrorGetMessageRetType) { setErrorGetMessageAttributeType(&o.Message, v) } // 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 *Error) GetType() (res ErrorGetTypeRetType) { res, _ = o.GetTypeOk() return @@ -202,21 +245,25 @@ func (o *Error) GetType() (res ErrorGetTypeRetType) { // 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 *Error) GetTypeOk() (ret ErrorGetTypeRetType, ok bool) { return getErrorGetTypeAttributeTypeOk(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 *Error) 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 *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 := getErrorGetCodeAttributeTypeOk(o.Code); ok { @@ -234,37 +281,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/mongodbflex/model_flavor.go b/services/mongodbflex/model_flavor.go index 74820ae1d..a33af8392 100644 --- a/services/mongodbflex/model_flavor.go +++ b/services/mongodbflex/model_flavor.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Flavor{} */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetCpuAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetCpuArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetCpuRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFlavorGetCpuAttributeTypeOk(arg FlavorGetCpuAttributeType) (ret FlavorGetCpuRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getFlavorGetCpuAttributeTypeOk(arg FlavorGetCpuAttributeType) (ret FlavorGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFlavorGetCpuAttributeType(arg *FlavorGetCpuAttributeType, val FlavorGetCpuRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setFlavorGetCpuAttributeType(arg *FlavorGetCpuAttributeType, val FlavorGetC */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFlavorGetDescriptionAttributeTypeOk(arg FlavorGetDescriptionAttributeType) (ret FlavorGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getFlavorGetDescriptionAttributeTypeOk(arg FlavorGetDescriptionAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFlavorGetDescriptionAttributeType(arg *FlavorGetDescriptionAttributeType, val FlavorGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetDescriptionRetType = string /* @@ -63,8 +77,10 @@ type FlavorGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFlavorGetIdAttributeTypeOk(arg FlavorGetIdAttributeType) (ret FlavorGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +88,15 @@ func getFlavorGetIdAttributeTypeOk(arg FlavorGetIdAttributeType) (ret FlavorGetI return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFlavorGetIdAttributeType(arg *FlavorGetIdAttributeType, val FlavorGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetIdRetType = string /* @@ -84,10 +104,16 @@ type FlavorGetIdRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetMemoryAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetMemoryArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type FlavorGetMemoryRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getFlavorGetMemoryAttributeTypeOk(arg FlavorGetMemoryAttributeType) (ret FlavorGetMemoryRetType, ok bool) { if arg == nil { return ret, false @@ -95,11 +121,13 @@ func getFlavorGetMemoryAttributeTypeOk(arg FlavorGetMemoryAttributeType) (ret Fl return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setFlavorGetMemoryAttributeType(arg *FlavorGetMemoryAttributeType, val FlavorGetMemoryRetType) { *arg = &val } // Flavor struct for Flavor +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Flavor struct { // Can be cast to int32 without loss of precision. Cpu FlavorGetCpuAttributeType `json:"cpu,omitempty"` @@ -113,6 +141,7 @@ type Flavor 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 NewFlavor() *Flavor { this := Flavor{} return &this @@ -121,12 +150,14 @@ func NewFlavor() *Flavor { // NewFlavorWithDefaults instantiates a new Flavor object // This 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 NewFlavorWithDefaults() *Flavor { this := Flavor{} return &this } // GetCpu returns the Cpu 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 *Flavor) GetCpu() (res FlavorGetCpuRetType) { res, _ = o.GetCpuOk() return @@ -134,22 +165,26 @@ func (o *Flavor) GetCpu() (res FlavorGetCpuRetType) { // GetCpuOk returns a tuple with the Cpu 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 *Flavor) GetCpuOk() (ret FlavorGetCpuRetType, ok bool) { return getFlavorGetCpuAttributeTypeOk(o.Cpu) } // HasCpu 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 *Flavor) HasCpu() bool { _, ok := o.GetCpuOk() return ok } // SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Flavor) SetCpu(v FlavorGetCpuRetType) { setFlavorGetCpuAttributeType(&o.Cpu, v) } // GetDescription returns the Description 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 *Flavor) GetDescription() (res FlavorGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -157,22 +192,26 @@ func (o *Flavor) GetDescription() (res FlavorGetDescriptionRetType) { // GetDescriptionOk returns a tuple with the Description 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 *Flavor) GetDescriptionOk() (ret FlavorGetDescriptionRetType, ok bool) { return getFlavorGetDescriptionAttributeTypeOk(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 *Flavor) 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 *Flavor) SetDescription(v FlavorGetDescriptionRetType) { setFlavorGetDescriptionAttributeType(&o.Description, 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 *Flavor) GetId() (res FlavorGetIdRetType) { res, _ = o.GetIdOk() return @@ -180,22 +219,26 @@ func (o *Flavor) GetId() (res FlavorGetIdRetType) { // 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 *Flavor) GetIdOk() (ret FlavorGetIdRetType, ok bool) { return getFlavorGetIdAttributeTypeOk(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 *Flavor) 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 *Flavor) SetId(v FlavorGetIdRetType) { setFlavorGetIdAttributeType(&o.Id, v) } // GetMemory returns the Memory 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 *Flavor) GetMemory() (res FlavorGetMemoryRetType) { res, _ = o.GetMemoryOk() return @@ -203,21 +246,25 @@ func (o *Flavor) GetMemory() (res FlavorGetMemoryRetType) { // GetMemoryOk returns a tuple with the Memory 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 *Flavor) GetMemoryOk() (ret FlavorGetMemoryRetType, ok bool) { return getFlavorGetMemoryAttributeTypeOk(o.Memory) } // HasMemory 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 *Flavor) HasMemory() bool { _, ok := o.GetMemoryOk() return ok } // SetMemory gets a reference to the given int64 and assigns it to the Memory field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Flavor) SetMemory(v FlavorGetMemoryRetType) { setFlavorGetMemoryAttributeType(&o.Memory, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Flavor) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getFlavorGetCpuAttributeTypeOk(o.Cpu); ok { @@ -235,37 +282,45 @@ func (o Flavor) 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 NullableFlavor struct { value *Flavor isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableFlavor) Get() *Flavor { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableFlavor) Set(val *Flavor) { 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 NullableFlavor) 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 *NullableFlavor) 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 NewNullableFlavor(val *Flavor) *NullableFlavor { return &NullableFlavor{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 NullableFlavor) 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 *NullableFlavor) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_get_backup_response.go b/services/mongodbflex/model_get_backup_response.go index fa1b42494..7c126bcc5 100644 --- a/services/mongodbflex/model_get_backup_response.go +++ b/services/mongodbflex/model_get_backup_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetBackupResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetBackupResponseGetItemAttributeType = *Backup + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetBackupResponseGetItemArgType = Backup + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetBackupResponseGetItemRetType = Backup +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetBackupResponseGetItemAttributeTypeOk(arg GetBackupResponseGetItemAttributeType) (ret GetBackupResponseGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getGetBackupResponseGetItemAttributeTypeOk(arg GetBackupResponseGetItemAttr return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetBackupResponseGetItemAttributeType(arg *GetBackupResponseGetItemAttributeType, val GetBackupResponseGetItemRetType) { *arg = &val } // GetBackupResponse struct for GetBackupResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetBackupResponse struct { Item GetBackupResponseGetItemAttributeType `json:"item,omitempty"` } @@ -46,6 +55,7 @@ type GetBackupResponse 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 NewGetBackupResponse() *GetBackupResponse { this := GetBackupResponse{} return &this @@ -54,12 +64,14 @@ func NewGetBackupResponse() *GetBackupResponse { // NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetBackupResponseWithDefaults() *GetBackupResponse { this := GetBackupResponse{} return &this } // GetItem returns the Item 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 *GetBackupResponse) GetItem() (res GetBackupResponseGetItemRetType) { res, _ = o.GetItemOk() return @@ -67,21 +79,25 @@ func (o *GetBackupResponse) GetItem() (res GetBackupResponseGetItemRetType) { // GetItemOk returns a tuple with the Item 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 *GetBackupResponse) GetItemOk() (ret GetBackupResponseGetItemRetType, ok bool) { return getGetBackupResponseGetItemAttributeTypeOk(o.Item) } // HasItem 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 *GetBackupResponse) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given Backup and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetBackupResponse) SetItem(v GetBackupResponseGetItemRetType) { setGetBackupResponseGetItemAttributeType(&o.Item, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetBackupResponseGetItemAttributeTypeOk(o.Item); ok { @@ -90,37 +106,45 @@ func (o GetBackupResponse) 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 NullableGetBackupResponse struct { value *GetBackupResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetBackupResponse) Get() *GetBackupResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { 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 NullableGetBackupResponse) 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 *NullableGetBackupResponse) 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 NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { return &NullableGetBackupResponse{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 NullableGetBackupResponse) 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 *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_get_user_response.go b/services/mongodbflex/model_get_user_response.go index 0754f3fd1..e26ef70b7 100644 --- a/services/mongodbflex/model_get_user_response.go +++ b/services/mongodbflex/model_get_user_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &GetUserResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserResponseGetItemAttributeType = *InstanceResponseUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserResponseGetItemArgType = InstanceResponseUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserResponseGetItemRetType = InstanceResponseUser +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getGetUserResponseGetItemAttributeTypeOk(arg GetUserResponseGetItemAttributeType) (ret GetUserResponseGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getGetUserResponseGetItemAttributeTypeOk(arg GetUserResponseGetItemAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setGetUserResponseGetItemAttributeType(arg *GetUserResponseGetItemAttributeType, val GetUserResponseGetItemRetType) { *arg = &val } // GetUserResponse struct for GetUserResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type GetUserResponse struct { Item GetUserResponseGetItemAttributeType `json:"item,omitempty"` } @@ -46,6 +55,7 @@ type GetUserResponse 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 NewGetUserResponse() *GetUserResponse { this := GetUserResponse{} return &this @@ -54,12 +64,14 @@ func NewGetUserResponse() *GetUserResponse { // NewGetUserResponseWithDefaults instantiates a new GetUserResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewGetUserResponseWithDefaults() *GetUserResponse { this := GetUserResponse{} return &this } // GetItem returns the Item 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 *GetUserResponse) GetItem() (res GetUserResponseGetItemRetType) { res, _ = o.GetItemOk() return @@ -67,21 +79,25 @@ func (o *GetUserResponse) GetItem() (res GetUserResponseGetItemRetType) { // GetItemOk returns a tuple with the Item 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 *GetUserResponse) GetItemOk() (ret GetUserResponseGetItemRetType, ok bool) { return getGetUserResponseGetItemAttributeTypeOk(o.Item) } // HasItem 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 *GetUserResponse) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given InstanceResponseUser and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *GetUserResponse) SetItem(v GetUserResponseGetItemRetType) { setGetUserResponseGetItemAttributeType(&o.Item, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o GetUserResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetUserResponseGetItemAttributeTypeOk(o.Item); ok { @@ -90,37 +106,45 @@ func (o GetUserResponse) 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 NullableGetUserResponse struct { value *GetUserResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableGetUserResponse) Get() *GetUserResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableGetUserResponse) Set(val *GetUserResponse) { 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 NullableGetUserResponse) 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 *NullableGetUserResponse) 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 NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { return &NullableGetUserResponse{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 NullableGetUserResponse) 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 *NullableGetUserResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_handlers_instances_slow_queries_response.go b/services/mongodbflex/model_handlers_instances_slow_queries_response.go index 1804ea8f4..fc2d6875d 100644 --- a/services/mongodbflex/model_handlers_instances_slow_queries_response.go +++ b/services/mongodbflex/model_handlers_instances_slow_queries_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &HandlersInstancesSlowQueriesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeType = *[]SlowQuery + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSlowQueriesResponseGetSlowQueriesArgType = []SlowQuery + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSlowQueriesResponseGetSlowQueriesRetType = []SlowQuery +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeTypeOk(arg HandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeType) (ret HandlersInstancesSlowQueriesResponseGetSlowQueriesRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getHandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeTypeOk(arg Ha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeType(arg *HandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeType, val HandlersInstancesSlowQueriesResponseGetSlowQueriesRetType) { *arg = &val } // HandlersInstancesSlowQueriesResponse struct for HandlersInstancesSlowQueriesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSlowQueriesResponse struct { // A list of documents with information about slow queries as detected by the Performance Advisor. SlowQueries HandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeType `json:"slowQueries,omitempty"` @@ -47,6 +56,7 @@ type HandlersInstancesSlowQueriesResponse 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 NewHandlersInstancesSlowQueriesResponse() *HandlersInstancesSlowQueriesResponse { this := HandlersInstancesSlowQueriesResponse{} return &this @@ -55,12 +65,14 @@ func NewHandlersInstancesSlowQueriesResponse() *HandlersInstancesSlowQueriesResp // NewHandlersInstancesSlowQueriesResponseWithDefaults instantiates a new HandlersInstancesSlowQueriesResponse object // This 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 NewHandlersInstancesSlowQueriesResponseWithDefaults() *HandlersInstancesSlowQueriesResponse { this := HandlersInstancesSlowQueriesResponse{} return &this } // GetSlowQueries returns the SlowQueries 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 *HandlersInstancesSlowQueriesResponse) GetSlowQueries() (res HandlersInstancesSlowQueriesResponseGetSlowQueriesRetType) { res, _ = o.GetSlowQueriesOk() return @@ -68,21 +80,25 @@ func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueries() (res HandlersIns // GetSlowQueriesOk returns a tuple with the SlowQueries 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 *HandlersInstancesSlowQueriesResponse) GetSlowQueriesOk() (ret HandlersInstancesSlowQueriesResponseGetSlowQueriesRetType, ok bool) { return getHandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeTypeOk(o.SlowQueries) } // HasSlowQueries 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 *HandlersInstancesSlowQueriesResponse) HasSlowQueries() bool { _, ok := o.GetSlowQueriesOk() return ok } // SetSlowQueries gets a reference to the given []SlowQuery and assigns it to the SlowQueries field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HandlersInstancesSlowQueriesResponse) SetSlowQueries(v HandlersInstancesSlowQueriesResponseGetSlowQueriesRetType) { setHandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeType(&o.SlowQueries, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o HandlersInstancesSlowQueriesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getHandlersInstancesSlowQueriesResponseGetSlowQueriesAttributeTypeOk(o.SlowQueries); ok { @@ -91,37 +107,45 @@ func (o HandlersInstancesSlowQueriesResponse) ToMap() (map[string]interface{}, e return toSerialize, nil } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableHandlersInstancesSlowQueriesResponse struct { value *HandlersInstancesSlowQueriesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableHandlersInstancesSlowQueriesResponse) Get() *HandlersInstancesSlowQueriesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableHandlersInstancesSlowQueriesResponse) Set(val *HandlersInstancesSlowQueriesResponse) { 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 NullableHandlersInstancesSlowQueriesResponse) 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 *NullableHandlersInstancesSlowQueriesResponse) 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 NewNullableHandlersInstancesSlowQueriesResponse(val *HandlersInstancesSlowQueriesResponse) *NullableHandlersInstancesSlowQueriesResponse { return &NullableHandlersInstancesSlowQueriesResponse{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 NullableHandlersInstancesSlowQueriesResponse) 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 *NullableHandlersInstancesSlowQueriesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go index b72fb932b..0ee57636c 100644 --- a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go +++ b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &HandlersInstancesSuggestedIndexesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponseGetShapesAttributeType = *[]Shape + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponseGetShapesArgType = []Shape + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponseGetShapesRetType = []Shape +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHandlersInstancesSuggestedIndexesResponseGetShapesAttributeTypeOk(arg HandlersInstancesSuggestedIndexesResponseGetShapesAttributeType) (ret HandlersInstancesSuggestedIndexesResponseGetShapesRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getHandlersInstancesSuggestedIndexesResponseGetShapesAttributeTypeOk(arg Ha return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHandlersInstancesSuggestedIndexesResponseGetShapesAttributeType(arg *HandlersInstancesSuggestedIndexesResponseGetShapesAttributeType, val HandlersInstancesSuggestedIndexesResponseGetShapesRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setHandlersInstancesSuggestedIndexesResponseGetShapesAttributeType(arg *Han */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeType = *[]SuggestedIndex + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesArgType = []SuggestedIndex + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesRetType = []SuggestedIndex +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeTypeOk(arg HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeType) (ret HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getHandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeType(arg *HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeType, val HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesRetType) { *arg = &val } // HandlersInstancesSuggestedIndexesResponse struct for HandlersInstancesSuggestedIndexesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HandlersInstancesSuggestedIndexesResponse struct { // Documents with information about the query shapes that are served by the suggested indexes. Shapes HandlersInstancesSuggestedIndexesResponseGetShapesAttributeType `json:"shapes,omitempty"` @@ -69,6 +85,7 @@ type HandlersInstancesSuggestedIndexesResponse 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 NewHandlersInstancesSuggestedIndexesResponse() *HandlersInstancesSuggestedIndexesResponse { this := HandlersInstancesSuggestedIndexesResponse{} return &this @@ -77,12 +94,14 @@ func NewHandlersInstancesSuggestedIndexesResponse() *HandlersInstancesSuggestedI // NewHandlersInstancesSuggestedIndexesResponseWithDefaults instantiates a new HandlersInstancesSuggestedIndexesResponse object // This 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 NewHandlersInstancesSuggestedIndexesResponseWithDefaults() *HandlersInstancesSuggestedIndexesResponse { this := HandlersInstancesSuggestedIndexesResponse{} return &this } // GetShapes returns the Shapes 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 *HandlersInstancesSuggestedIndexesResponse) GetShapes() (res HandlersInstancesSuggestedIndexesResponseGetShapesRetType) { res, _ = o.GetShapesOk() return @@ -90,22 +109,26 @@ func (o *HandlersInstancesSuggestedIndexesResponse) GetShapes() (res HandlersIns // GetShapesOk returns a tuple with the Shapes 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 *HandlersInstancesSuggestedIndexesResponse) GetShapesOk() (ret HandlersInstancesSuggestedIndexesResponseGetShapesRetType, ok bool) { return getHandlersInstancesSuggestedIndexesResponseGetShapesAttributeTypeOk(o.Shapes) } // HasShapes 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 *HandlersInstancesSuggestedIndexesResponse) HasShapes() bool { _, ok := o.GetShapesOk() return ok } // SetShapes gets a reference to the given []Shape and assigns it to the Shapes field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HandlersInstancesSuggestedIndexesResponse) SetShapes(v HandlersInstancesSuggestedIndexesResponseGetShapesRetType) { setHandlersInstancesSuggestedIndexesResponseGetShapesAttributeType(&o.Shapes, v) } // GetSuggestedIndexes returns the SuggestedIndexes 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 *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexes() (res HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesRetType) { res, _ = o.GetSuggestedIndexesOk() return @@ -113,21 +136,25 @@ func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexes() (res H // GetSuggestedIndexesOk returns a tuple with the SuggestedIndexes 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 *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexesOk() (ret HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesRetType, ok bool) { return getHandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeTypeOk(o.SuggestedIndexes) } // HasSuggestedIndexes 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 *HandlersInstancesSuggestedIndexesResponse) HasSuggestedIndexes() bool { _, ok := o.GetSuggestedIndexesOk() return ok } // SetSuggestedIndexes gets a reference to the given []SuggestedIndex and assigns it to the SuggestedIndexes field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HandlersInstancesSuggestedIndexesResponse) SetSuggestedIndexes(v HandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesRetType) { setHandlersInstancesSuggestedIndexesResponseGetSuggestedIndexesAttributeType(&o.SuggestedIndexes, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o HandlersInstancesSuggestedIndexesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getHandlersInstancesSuggestedIndexesResponseGetShapesAttributeTypeOk(o.Shapes); ok { @@ -139,37 +166,45 @@ func (o HandlersInstancesSuggestedIndexesResponse) 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 NullableHandlersInstancesSuggestedIndexesResponse struct { value *HandlersInstancesSuggestedIndexesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableHandlersInstancesSuggestedIndexesResponse) Get() *HandlersInstancesSuggestedIndexesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableHandlersInstancesSuggestedIndexesResponse) Set(val *HandlersInstancesSuggestedIndexesResponse) { 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 NullableHandlersInstancesSuggestedIndexesResponse) 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 *NullableHandlersInstancesSuggestedIndexesResponse) 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 NewNullableHandlersInstancesSuggestedIndexesResponse(val *HandlersInstancesSuggestedIndexesResponse) *NullableHandlersInstancesSuggestedIndexesResponse { return &NullableHandlersInstancesSuggestedIndexesResponse{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 NullableHandlersInstancesSuggestedIndexesResponse) 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 *NullableHandlersInstancesSuggestedIndexesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_host.go b/services/mongodbflex/model_host.go index 717c1cb9b..c3021db6d 100644 --- a/services/mongodbflex/model_host.go +++ b/services/mongodbflex/model_host.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Host{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostGetHostMetricsAttributeType = *[]HostMetric + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostGetHostMetricsArgType = []HostMetric + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostGetHostMetricsRetType = []HostMetric +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHostGetHostMetricsAttributeTypeOk(arg HostGetHostMetricsAttributeType) (ret HostGetHostMetricsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getHostGetHostMetricsAttributeTypeOk(arg HostGetHostMetricsAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHostGetHostMetricsAttributeType(arg *HostGetHostMetricsAttributeType, val HostGetHostMetricsRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setHostGetHostMetricsAttributeType(arg *HostGetHostMetricsAttributeType, va */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHostGetIdAttributeTypeOk(arg HostGetIdAttributeType) (ret HostGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -51,14 +61,19 @@ func getHostGetIdAttributeTypeOk(arg HostGetIdAttributeType) (ret HostGetIdRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHostGetIdAttributeType(arg *HostGetIdAttributeType, val HostGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostGetIdRetType = string // Host struct for Host +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Host struct { HostMetrics HostGetHostMetricsAttributeType `json:"hostMetrics,omitempty"` Id HostGetIdAttributeType `json:"id,omitempty"` @@ -68,6 +83,7 @@ type Host 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 NewHost() *Host { this := Host{} return &this @@ -76,12 +92,14 @@ func NewHost() *Host { // NewHostWithDefaults instantiates a new Host object // This 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 NewHostWithDefaults() *Host { this := Host{} return &this } // GetHostMetrics returns the HostMetrics 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 *Host) GetHostMetrics() (res HostGetHostMetricsRetType) { res, _ = o.GetHostMetricsOk() return @@ -89,22 +107,26 @@ func (o *Host) GetHostMetrics() (res HostGetHostMetricsRetType) { // GetHostMetricsOk returns a tuple with the HostMetrics 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 *Host) GetHostMetricsOk() (ret HostGetHostMetricsRetType, ok bool) { return getHostGetHostMetricsAttributeTypeOk(o.HostMetrics) } // HasHostMetrics 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 *Host) HasHostMetrics() bool { _, ok := o.GetHostMetricsOk() return ok } // SetHostMetrics gets a reference to the given []HostMetric and assigns it to the HostMetrics field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Host) SetHostMetrics(v HostGetHostMetricsRetType) { setHostGetHostMetricsAttributeType(&o.HostMetrics, 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 *Host) GetId() (res HostGetIdRetType) { res, _ = o.GetIdOk() return @@ -112,21 +134,25 @@ func (o *Host) GetId() (res HostGetIdRetType) { // 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 *Host) GetIdOk() (ret HostGetIdRetType, ok bool) { return getHostGetIdAttributeTypeOk(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 *Host) 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 *Host) SetId(v HostGetIdRetType) { setHostGetIdAttributeType(&o.Id, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Host) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getHostGetHostMetricsAttributeTypeOk(o.HostMetrics); ok { @@ -138,37 +164,45 @@ func (o Host) 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 NullableHost struct { value *Host isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableHost) Get() *Host { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableHost) Set(val *Host) { 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 NullableHost) 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 *NullableHost) 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 NewNullableHost(val *Host) *NullableHost { return &NullableHost{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 NullableHost) 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 *NullableHost) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_host_metric.go b/services/mongodbflex/model_host_metric.go index 093522982..a6b9ad9d1 100644 --- a/services/mongodbflex/model_host_metric.go +++ b/services/mongodbflex/model_host_metric.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &HostMetric{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetDatapointsAttributeType = *[]DataPoint + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetDatapointsArgType = []DataPoint + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetDatapointsRetType = []DataPoint +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHostMetricGetDatapointsAttributeTypeOk(arg HostMetricGetDatapointsAttributeType) (ret HostMetricGetDatapointsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getHostMetricGetDatapointsAttributeTypeOk(arg HostMetricGetDatapointsAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHostMetricGetDatapointsAttributeType(arg *HostMetricGetDatapointsAttributeType, val HostMetricGetDatapointsRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setHostMetricGetDatapointsAttributeType(arg *HostMetricGetDatapointsAttribu */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHostMetricGetNameAttributeTypeOk(arg HostMetricGetNameAttributeType) (ret HostMetricGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getHostMetricGetNameAttributeTypeOk(arg HostMetricGetNameAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHostMetricGetNameAttributeType(arg *HostMetricGetNameAttributeType, val HostMetricGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetNameRetType = string /* @@ -63,8 +77,10 @@ type HostMetricGetNameRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetUnitsAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getHostMetricGetUnitsAttributeTypeOk(arg HostMetricGetUnitsAttributeType) (ret HostMetricGetUnitsRetType, ok bool) { if arg == nil { return ret, false @@ -72,14 +88,19 @@ func getHostMetricGetUnitsAttributeTypeOk(arg HostMetricGetUnitsAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setHostMetricGetUnitsAttributeType(arg *HostMetricGetUnitsAttributeType, val HostMetricGetUnitsRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetUnitsArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetricGetUnitsRetType = string // HostMetric struct for HostMetric +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type HostMetric struct { Datapoints HostMetricGetDatapointsAttributeType `json:"datapoints,omitempty"` Name HostMetricGetNameAttributeType `json:"name,omitempty"` @@ -90,6 +111,7 @@ type HostMetric 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 NewHostMetric() *HostMetric { this := HostMetric{} return &this @@ -98,12 +120,14 @@ func NewHostMetric() *HostMetric { // NewHostMetricWithDefaults instantiates a new HostMetric object // This 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 NewHostMetricWithDefaults() *HostMetric { this := HostMetric{} return &this } // GetDatapoints returns the Datapoints 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 *HostMetric) GetDatapoints() (res HostMetricGetDatapointsRetType) { res, _ = o.GetDatapointsOk() return @@ -111,22 +135,26 @@ func (o *HostMetric) GetDatapoints() (res HostMetricGetDatapointsRetType) { // GetDatapointsOk returns a tuple with the Datapoints 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 *HostMetric) GetDatapointsOk() (ret HostMetricGetDatapointsRetType, ok bool) { return getHostMetricGetDatapointsAttributeTypeOk(o.Datapoints) } // HasDatapoints 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 *HostMetric) HasDatapoints() bool { _, ok := o.GetDatapointsOk() return ok } // SetDatapoints gets a reference to the given []DataPoint and assigns it to the Datapoints field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HostMetric) SetDatapoints(v HostMetricGetDatapointsRetType) { setHostMetricGetDatapointsAttributeType(&o.Datapoints, 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 *HostMetric) GetName() (res HostMetricGetNameRetType) { res, _ = o.GetNameOk() return @@ -134,22 +162,26 @@ func (o *HostMetric) GetName() (res HostMetricGetNameRetType) { // 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 *HostMetric) GetNameOk() (ret HostMetricGetNameRetType, ok bool) { return getHostMetricGetNameAttributeTypeOk(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 *HostMetric) 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 *HostMetric) SetName(v HostMetricGetNameRetType) { setHostMetricGetNameAttributeType(&o.Name, v) } // GetUnits returns the Units 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 *HostMetric) GetUnits() (res HostMetricGetUnitsRetType) { res, _ = o.GetUnitsOk() return @@ -157,21 +189,25 @@ func (o *HostMetric) GetUnits() (res HostMetricGetUnitsRetType) { // GetUnitsOk returns a tuple with the Units 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 *HostMetric) GetUnitsOk() (ret HostMetricGetUnitsRetType, ok bool) { return getHostMetricGetUnitsAttributeTypeOk(o.Units) } // HasUnits 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 *HostMetric) HasUnits() bool { _, ok := o.GetUnitsOk() return ok } // SetUnits gets a reference to the given string and assigns it to the Units field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *HostMetric) SetUnits(v HostMetricGetUnitsRetType) { setHostMetricGetUnitsAttributeType(&o.Units, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o HostMetric) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getHostMetricGetDatapointsAttributeTypeOk(o.Datapoints); ok { @@ -186,37 +222,45 @@ func (o HostMetric) 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 NullableHostMetric struct { value *HostMetric isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableHostMetric) Get() *HostMetric { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableHostMetric) Set(val *HostMetric) { 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 NullableHostMetric) 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 *NullableHostMetric) 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 NewNullableHostMetric(val *HostMetric) *NullableHostMetric { return &NullableHostMetric{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 NullableHostMetric) 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 *NullableHostMetric) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_instance.go b/services/mongodbflex/model_instance.go index b6947f10d..524329dc9 100644 --- a/services/mongodbflex/model_instance.go +++ b/services/mongodbflex/model_instance.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -23,10 +24,16 @@ var _ MappedNullable = &Instance{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetAclAttributeType = *ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetAclArgType = ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetAclRetType = ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetAclAttributeTypeOk(arg InstanceGetAclAttributeType) (ret InstanceGetAclRetType, ok bool) { if arg == nil { return ret, false @@ -34,6 +41,7 @@ func getInstanceGetAclAttributeTypeOk(arg InstanceGetAclAttributeType) (ret Inst return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetAclAttributeType(arg *InstanceGetAclAttributeType, val InstanceGetAclRetType) { *arg = &val } @@ -43,8 +51,10 @@ func setInstanceGetAclAttributeType(arg *InstanceGetAclAttributeType, val Instan */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetBackupScheduleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetBackupScheduleAttributeTypeOk(arg InstanceGetBackupScheduleAttributeType) (ret InstanceGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +62,15 @@ func getInstanceGetBackupScheduleAttributeTypeOk(arg InstanceGetBackupScheduleAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetBackupScheduleAttributeType(arg *InstanceGetBackupScheduleAttributeType, val InstanceGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetBackupScheduleRetType = string /* @@ -64,10 +78,16 @@ type InstanceGetBackupScheduleRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetFlavorAttributeType = *Flavor + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetFlavorArgType = Flavor + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetFlavorRetType = Flavor +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetFlavorAttributeTypeOk(arg InstanceGetFlavorAttributeType) (ret InstanceGetFlavorRetType, ok bool) { if arg == nil { return ret, false @@ -75,6 +95,7 @@ func getInstanceGetFlavorAttributeTypeOk(arg InstanceGetFlavorAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetFlavorAttributeType(arg *InstanceGetFlavorAttributeType, val InstanceGetFlavorRetType) { *arg = &val } @@ -84,8 +105,10 @@ func setInstanceGetFlavorAttributeType(arg *InstanceGetFlavorAttributeType, val */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret InstanceGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +116,15 @@ func getInstanceGetIdAttributeTypeOk(arg InstanceGetIdAttributeType) (ret Instan return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetIdAttributeType(arg *InstanceGetIdAttributeType, val InstanceGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetIdRetType = string /* @@ -105,8 +132,10 @@ type InstanceGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret InstanceGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -114,11 +143,15 @@ func getInstanceGetNameAttributeTypeOk(arg InstanceGetNameAttributeType) (ret In return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetNameAttributeType(arg *InstanceGetNameAttributeType, val InstanceGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetNameRetType = string /* @@ -126,10 +159,16 @@ type InstanceGetNameRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetOptionsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetOptionsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetOptionsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetOptionsAttributeTypeOk(arg InstanceGetOptionsAttributeType) (ret InstanceGetOptionsRetType, ok bool) { if arg == nil { return ret, false @@ -137,6 +176,7 @@ func getInstanceGetOptionsAttributeTypeOk(arg InstanceGetOptionsAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetOptionsAttributeType(arg *InstanceGetOptionsAttributeType, val InstanceGetOptionsRetType) { *arg = &val } @@ -146,10 +186,16 @@ func setInstanceGetOptionsAttributeType(arg *InstanceGetOptionsAttributeType, va */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetReplicasAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetReplicasArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetReplicasRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetReplicasAttributeTypeOk(arg InstanceGetReplicasAttributeType) (ret InstanceGetReplicasRetType, ok bool) { if arg == nil { return ret, false @@ -157,6 +203,7 @@ func getInstanceGetReplicasAttributeTypeOk(arg InstanceGetReplicasAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetReplicasAttributeType(arg *InstanceGetReplicasAttributeType, val InstanceGetReplicasRetType) { *arg = &val } @@ -169,18 +216,25 @@ func setInstanceGetReplicasAttributeType(arg *InstanceGetReplicasAttributeType, // InstanceStatus The current status of the instance. // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceStatus string // List of Status const ( - INSTANCESTATUS_READY InstanceStatus = "READY" - INSTANCESTATUS_PENDING InstanceStatus = "PENDING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_READY InstanceStatus = "READY" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_PENDING InstanceStatus = "PENDING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead INSTANCESTATUS_PROCESSING InstanceStatus = "PROCESSING" - INSTANCESTATUS_FAILED InstanceStatus = "FAILED" - INSTANCESTATUS_UNKNOWN InstanceStatus = "UNKNOWN" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_FAILED InstanceStatus = "FAILED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCESTATUS_UNKNOWN InstanceStatus = "UNKNOWN" ) // All allowed values of Instance enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedInstanceStatusEnumValues = []InstanceStatus{ "READY", "PENDING", @@ -189,6 +243,7 @@ var AllowedInstanceStatusEnumValues = []InstanceStatus{ "UNKNOWN", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *InstanceStatus) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -216,6 +271,7 @@ func (v *InstanceStatus) UnmarshalJSON(src []byte) error { // NewInstanceStatusFromValue returns a pointer to a valid InstanceStatus // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewInstanceStatusFromValue(v InstanceStatus) (*InstanceStatus, error) { ev := InstanceStatus(v) if ev.IsValid() { @@ -226,6 +282,7 @@ func NewInstanceStatusFromValue(v InstanceStatus) (*InstanceStatus, error) { } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v InstanceStatus) IsValid() bool { for _, existing := range AllowedInstanceStatusEnumValues { if existing == v { @@ -236,50 +293,65 @@ func (v InstanceStatus) IsValid() bool { } // Ptr returns reference to StatusStatus value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v InstanceStatus) Ptr() *InstanceStatus { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInstanceStatus struct { value *InstanceStatus isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceStatus) Get() *InstanceStatus { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceStatus) Set(val *InstanceStatus) { 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 NullableInstanceStatus) 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 *NullableInstanceStatus) 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 NewNullableInstanceStatus(val *InstanceStatus) *NullableInstanceStatus { return &NullableInstanceStatus{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 NullableInstanceStatus) 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 *NullableInstanceStatus) 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 InstanceGetStatusAttributeType = *InstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStatusArgType = InstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStatusRetType = InstanceStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetStatusAttributeTypeOk(arg InstanceGetStatusAttributeType) (ret InstanceGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -287,6 +359,7 @@ func getInstanceGetStatusAttributeTypeOk(arg InstanceGetStatusAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetStatusAttributeType(arg *InstanceGetStatusAttributeType, val InstanceGetStatusRetType) { *arg = &val } @@ -296,10 +369,16 @@ func setInstanceGetStatusAttributeType(arg *InstanceGetStatusAttributeType, val */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStorageAttributeType = *Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStorageArgType = Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetStorageRetType = Storage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetStorageAttributeTypeOk(arg InstanceGetStorageAttributeType) (ret InstanceGetStorageRetType, ok bool) { if arg == nil { return ret, false @@ -307,6 +386,7 @@ func getInstanceGetStorageAttributeTypeOk(arg InstanceGetStorageAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetStorageAttributeType(arg *InstanceGetStorageAttributeType, val InstanceGetStorageRetType) { *arg = &val } @@ -316,8 +396,10 @@ func setInstanceGetStorageAttributeType(arg *InstanceGetStorageAttributeType, va */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceGetVersionAttributeTypeOk(arg InstanceGetVersionAttributeType) (ret InstanceGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -325,14 +407,19 @@ func getInstanceGetVersionAttributeTypeOk(arg InstanceGetVersionAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceGetVersionAttributeType(arg *InstanceGetVersionAttributeType, val InstanceGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceGetVersionRetType = string // Instance struct for Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Instance struct { Acl InstanceGetAclAttributeType `json:"acl,omitempty"` BackupSchedule InstanceGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` @@ -352,6 +439,7 @@ type Instance 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 NewInstance() *Instance { this := Instance{} return &this @@ -360,12 +448,14 @@ func NewInstance() *Instance { // NewInstanceWithDefaults instantiates a new Instance object // This 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 NewInstanceWithDefaults() *Instance { this := Instance{} return &this } // GetAcl returns the Acl 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 *Instance) GetAcl() (res InstanceGetAclRetType) { res, _ = o.GetAclOk() return @@ -373,22 +463,26 @@ func (o *Instance) GetAcl() (res InstanceGetAclRetType) { // GetAclOk returns a tuple with the Acl 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 *Instance) GetAclOk() (ret InstanceGetAclRetType, ok bool) { return getInstanceGetAclAttributeTypeOk(o.Acl) } // HasAcl 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 *Instance) HasAcl() bool { _, ok := o.GetAclOk() return ok } // SetAcl gets a reference to the given ACL and assigns it to the Acl field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetAcl(v InstanceGetAclRetType) { setInstanceGetAclAttributeType(&o.Acl, v) } // GetBackupSchedule returns the BackupSchedule 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 *Instance) GetBackupSchedule() (res InstanceGetBackupScheduleRetType) { res, _ = o.GetBackupScheduleOk() return @@ -396,22 +490,26 @@ func (o *Instance) GetBackupSchedule() (res InstanceGetBackupScheduleRetType) { // GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *Instance) GetBackupScheduleOk() (ret InstanceGetBackupScheduleRetType, ok bool) { return getInstanceGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // HasBackupSchedule 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 *Instance) HasBackupSchedule() bool { _, ok := o.GetBackupScheduleOk() return ok } // SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetBackupSchedule(v InstanceGetBackupScheduleRetType) { setInstanceGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetFlavor returns the Flavor 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 *Instance) GetFlavor() (res InstanceGetFlavorRetType) { res, _ = o.GetFlavorOk() return @@ -419,22 +517,26 @@ func (o *Instance) GetFlavor() (res InstanceGetFlavorRetType) { // GetFlavorOk returns a tuple with the Flavor 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 *Instance) GetFlavorOk() (ret InstanceGetFlavorRetType, ok bool) { return getInstanceGetFlavorAttributeTypeOk(o.Flavor) } // HasFlavor 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 *Instance) HasFlavor() bool { _, ok := o.GetFlavorOk() return ok } // SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetFlavor(v InstanceGetFlavorRetType) { setInstanceGetFlavorAttributeType(&o.Flavor, 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 *Instance) GetId() (res InstanceGetIdRetType) { res, _ = o.GetIdOk() return @@ -442,22 +544,26 @@ func (o *Instance) GetId() (res InstanceGetIdRetType) { // 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 *Instance) GetIdOk() (ret InstanceGetIdRetType, ok bool) { return getInstanceGetIdAttributeTypeOk(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 *Instance) 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 *Instance) SetId(v InstanceGetIdRetType) { setInstanceGetIdAttributeType(&o.Id, 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 *Instance) GetName() (res InstanceGetNameRetType) { res, _ = o.GetNameOk() return @@ -465,22 +571,26 @@ func (o *Instance) GetName() (res InstanceGetNameRetType) { // 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 *Instance) GetNameOk() (ret InstanceGetNameRetType, ok bool) { return getInstanceGetNameAttributeTypeOk(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 *Instance) 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 *Instance) SetName(v InstanceGetNameRetType) { setInstanceGetNameAttributeType(&o.Name, v) } // GetOptions returns the Options 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 *Instance) GetOptions() (res InstanceGetOptionsRetType) { res, _ = o.GetOptionsOk() return @@ -488,22 +598,26 @@ func (o *Instance) GetOptions() (res InstanceGetOptionsRetType) { // GetOptionsOk returns a tuple with the Options 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 *Instance) GetOptionsOk() (ret InstanceGetOptionsRetType, ok bool) { return getInstanceGetOptionsAttributeTypeOk(o.Options) } // HasOptions 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 *Instance) HasOptions() bool { _, ok := o.GetOptionsOk() return ok } // SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetOptions(v InstanceGetOptionsRetType) { setInstanceGetOptionsAttributeType(&o.Options, v) } // GetReplicas returns the Replicas 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 *Instance) GetReplicas() (res InstanceGetReplicasRetType) { res, _ = o.GetReplicasOk() return @@ -511,22 +625,26 @@ func (o *Instance) GetReplicas() (res InstanceGetReplicasRetType) { // GetReplicasOk returns a tuple with the Replicas 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 *Instance) GetReplicasOk() (ret InstanceGetReplicasRetType, ok bool) { return getInstanceGetReplicasAttributeTypeOk(o.Replicas) } // HasReplicas 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 *Instance) HasReplicas() bool { _, ok := o.GetReplicasOk() return ok } // SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetReplicas(v InstanceGetReplicasRetType) { setInstanceGetReplicasAttributeType(&o.Replicas, v) } // GetStatus returns the Status 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 *Instance) GetStatus() (res InstanceGetStatusRetType) { res, _ = o.GetStatusOk() return @@ -534,22 +652,26 @@ func (o *Instance) GetStatus() (res InstanceGetStatusRetType) { // GetStatusOk returns a tuple with the Status 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 *Instance) GetStatusOk() (ret InstanceGetStatusRetType, ok bool) { return getInstanceGetStatusAttributeTypeOk(o.Status) } // HasStatus 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 *Instance) HasStatus() bool { _, ok := o.GetStatusOk() return ok } // SetStatus gets a reference to the given string and assigns it to the Status field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetStatus(v InstanceGetStatusRetType) { setInstanceGetStatusAttributeType(&o.Status, v) } // GetStorage returns the Storage 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 *Instance) GetStorage() (res InstanceGetStorageRetType) { res, _ = o.GetStorageOk() return @@ -557,22 +679,26 @@ func (o *Instance) GetStorage() (res InstanceGetStorageRetType) { // GetStorageOk returns a tuple with the Storage 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 *Instance) GetStorageOk() (ret InstanceGetStorageRetType, ok bool) { return getInstanceGetStorageAttributeTypeOk(o.Storage) } // HasStorage 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 *Instance) HasStorage() bool { _, ok := o.GetStorageOk() return ok } // SetStorage gets a reference to the given Storage and assigns it to the Storage field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetStorage(v InstanceGetStorageRetType) { setInstanceGetStorageAttributeType(&o.Storage, v) } // GetVersion returns the Version 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 *Instance) GetVersion() (res InstanceGetVersionRetType) { res, _ = o.GetVersionOk() return @@ -580,21 +706,25 @@ func (o *Instance) GetVersion() (res InstanceGetVersionRetType) { // GetVersionOk returns a tuple with the Version 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 *Instance) GetVersionOk() (ret InstanceGetVersionRetType, ok bool) { return getInstanceGetVersionAttributeTypeOk(o.Version) } // HasVersion 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 *Instance) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Instance) SetVersion(v InstanceGetVersionRetType) { setInstanceGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Instance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceGetAclAttributeTypeOk(o.Acl); ok { @@ -630,37 +760,45 @@ func (o Instance) 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 NullableInstance struct { value *Instance isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstance) Get() *Instance { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstance) Set(val *Instance) { 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 NullableInstance) 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 *NullableInstance) 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 NewNullableInstance(val *Instance) *NullableInstance { return &NullableInstance{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 NullableInstance) 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 *NullableInstance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_instance_flavor.go b/services/mongodbflex/model_instance_flavor.go index c6d75156a..aa5ccb367 100644 --- a/services/mongodbflex/model_instance_flavor.go +++ b/services/mongodbflex/model_instance_flavor.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &InstanceFlavor{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetCategoriesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetCategoriesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetCategoriesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceFlavorGetCategoriesAttributeTypeOk(arg InstanceFlavorGetCategoriesAttributeType) (ret InstanceFlavorGetCategoriesRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getInstanceFlavorGetCategoriesAttributeTypeOk(arg InstanceFlavorGetCategori return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceFlavorGetCategoriesAttributeType(arg *InstanceFlavorGetCategoriesAttributeType, val InstanceFlavorGetCategoriesRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setInstanceFlavorGetCategoriesAttributeType(arg *InstanceFlavorGetCategorie */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetCpuAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetCpuArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetCpuRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceFlavorGetCpuAttributeTypeOk(arg InstanceFlavorGetCpuAttributeType) (ret InstanceFlavorGetCpuRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getInstanceFlavorGetCpuAttributeTypeOk(arg InstanceFlavorGetCpuAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceFlavorGetCpuAttributeType(arg *InstanceFlavorGetCpuAttributeType, val InstanceFlavorGetCpuRetType) { *arg = &val } @@ -62,8 +77,10 @@ func setInstanceFlavorGetCpuAttributeType(arg *InstanceFlavorGetCpuAttributeType */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetDescriptionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceFlavorGetDescriptionAttributeTypeOk(arg InstanceFlavorGetDescriptionAttributeType) (ret InstanceFlavorGetDescriptionRetType, ok bool) { if arg == nil { return ret, false @@ -71,11 +88,15 @@ func getInstanceFlavorGetDescriptionAttributeTypeOk(arg InstanceFlavorGetDescrip return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceFlavorGetDescriptionAttributeType(arg *InstanceFlavorGetDescriptionAttributeType, val InstanceFlavorGetDescriptionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetDescriptionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetDescriptionRetType = string /* @@ -83,8 +104,10 @@ type InstanceFlavorGetDescriptionRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceFlavorGetIdAttributeTypeOk(arg InstanceFlavorGetIdAttributeType) (ret InstanceFlavorGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -92,11 +115,15 @@ func getInstanceFlavorGetIdAttributeTypeOk(arg InstanceFlavorGetIdAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceFlavorGetIdAttributeType(arg *InstanceFlavorGetIdAttributeType, val InstanceFlavorGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetIdRetType = string /* @@ -104,10 +131,16 @@ type InstanceFlavorGetIdRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetMemoryAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetMemoryArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavorGetMemoryRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceFlavorGetMemoryAttributeTypeOk(arg InstanceFlavorGetMemoryAttributeType) (ret InstanceFlavorGetMemoryRetType, ok bool) { if arg == nil { return ret, false @@ -115,11 +148,13 @@ func getInstanceFlavorGetMemoryAttributeTypeOk(arg InstanceFlavorGetMemoryAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceFlavorGetMemoryAttributeType(arg *InstanceFlavorGetMemoryAttributeType, val InstanceFlavorGetMemoryRetType) { *arg = &val } // InstanceFlavor struct for InstanceFlavor +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceFlavor struct { Categories InstanceFlavorGetCategoriesAttributeType `json:"categories,omitempty"` // Can be cast to int32 without loss of precision. @@ -134,6 +169,7 @@ type InstanceFlavor 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 NewInstanceFlavor() *InstanceFlavor { this := InstanceFlavor{} return &this @@ -142,12 +178,14 @@ func NewInstanceFlavor() *InstanceFlavor { // NewInstanceFlavorWithDefaults instantiates a new InstanceFlavor object // This 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 NewInstanceFlavorWithDefaults() *InstanceFlavor { this := InstanceFlavor{} return &this } // GetCategories returns the Categories 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 *InstanceFlavor) GetCategories() (res InstanceFlavorGetCategoriesRetType) { res, _ = o.GetCategoriesOk() return @@ -155,22 +193,26 @@ func (o *InstanceFlavor) GetCategories() (res InstanceFlavorGetCategoriesRetType // GetCategoriesOk returns a tuple with the Categories 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 *InstanceFlavor) GetCategoriesOk() (ret InstanceFlavorGetCategoriesRetType, ok bool) { return getInstanceFlavorGetCategoriesAttributeTypeOk(o.Categories) } // HasCategories 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 *InstanceFlavor) HasCategories() bool { _, ok := o.GetCategoriesOk() return ok } // SetCategories gets a reference to the given []string and assigns it to the Categories field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceFlavor) SetCategories(v InstanceFlavorGetCategoriesRetType) { setInstanceFlavorGetCategoriesAttributeType(&o.Categories, v) } // GetCpu returns the Cpu 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 *InstanceFlavor) GetCpu() (res InstanceFlavorGetCpuRetType) { res, _ = o.GetCpuOk() return @@ -178,22 +220,26 @@ func (o *InstanceFlavor) GetCpu() (res InstanceFlavorGetCpuRetType) { // GetCpuOk returns a tuple with the Cpu 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 *InstanceFlavor) GetCpuOk() (ret InstanceFlavorGetCpuRetType, ok bool) { return getInstanceFlavorGetCpuAttributeTypeOk(o.Cpu) } // HasCpu 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 *InstanceFlavor) HasCpu() bool { _, ok := o.GetCpuOk() return ok } // SetCpu gets a reference to the given int64 and assigns it to the Cpu field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceFlavor) SetCpu(v InstanceFlavorGetCpuRetType) { setInstanceFlavorGetCpuAttributeType(&o.Cpu, v) } // GetDescription returns the Description 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 *InstanceFlavor) GetDescription() (res InstanceFlavorGetDescriptionRetType) { res, _ = o.GetDescriptionOk() return @@ -201,22 +247,26 @@ func (o *InstanceFlavor) GetDescription() (res InstanceFlavorGetDescriptionRetTy // GetDescriptionOk returns a tuple with the Description 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 *InstanceFlavor) GetDescriptionOk() (ret InstanceFlavorGetDescriptionRetType, ok bool) { return getInstanceFlavorGetDescriptionAttributeTypeOk(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 *InstanceFlavor) 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 *InstanceFlavor) SetDescription(v InstanceFlavorGetDescriptionRetType) { setInstanceFlavorGetDescriptionAttributeType(&o.Description, 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 *InstanceFlavor) GetId() (res InstanceFlavorGetIdRetType) { res, _ = o.GetIdOk() return @@ -224,22 +274,26 @@ func (o *InstanceFlavor) GetId() (res InstanceFlavorGetIdRetType) { // 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 *InstanceFlavor) GetIdOk() (ret InstanceFlavorGetIdRetType, ok bool) { return getInstanceFlavorGetIdAttributeTypeOk(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 *InstanceFlavor) 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 *InstanceFlavor) SetId(v InstanceFlavorGetIdRetType) { setInstanceFlavorGetIdAttributeType(&o.Id, v) } // GetMemory returns the Memory 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 *InstanceFlavor) GetMemory() (res InstanceFlavorGetMemoryRetType) { res, _ = o.GetMemoryOk() return @@ -247,21 +301,25 @@ func (o *InstanceFlavor) GetMemory() (res InstanceFlavorGetMemoryRetType) { // GetMemoryOk returns a tuple with the Memory 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 *InstanceFlavor) GetMemoryOk() (ret InstanceFlavorGetMemoryRetType, ok bool) { return getInstanceFlavorGetMemoryAttributeTypeOk(o.Memory) } // HasMemory 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 *InstanceFlavor) HasMemory() bool { _, ok := o.GetMemoryOk() return ok } // SetMemory gets a reference to the given int64 and assigns it to the Memory field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceFlavor) SetMemory(v InstanceFlavorGetMemoryRetType) { setInstanceFlavorGetMemoryAttributeType(&o.Memory, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o InstanceFlavor) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceFlavorGetCategoriesAttributeTypeOk(o.Categories); ok { @@ -282,37 +340,45 @@ func (o InstanceFlavor) 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 NullableInstanceFlavor struct { value *InstanceFlavor isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceFlavor) Get() *InstanceFlavor { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceFlavor) Set(val *InstanceFlavor) { 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 NullableInstanceFlavor) 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 *NullableInstanceFlavor) 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 NewNullableInstanceFlavor(val *InstanceFlavor) *NullableInstanceFlavor { return &NullableInstanceFlavor{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 NullableInstanceFlavor) 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 *NullableInstanceFlavor) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_instance_list_instance.go b/services/mongodbflex/model_instance_list_instance.go index 5e57079a3..e13454cfa 100644 --- a/services/mongodbflex/model_instance_list_instance.go +++ b/services/mongodbflex/model_instance_list_instance.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -23,8 +24,10 @@ var _ MappedNullable = &InstanceListInstance{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceListInstanceGetIdAttributeTypeOk(arg InstanceListInstanceGetIdAttributeType) (ret InstanceListInstanceGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -32,11 +35,15 @@ func getInstanceListInstanceGetIdAttributeTypeOk(arg InstanceListInstanceGetIdAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceListInstanceGetIdAttributeType(arg *InstanceListInstanceGetIdAttributeType, val InstanceListInstanceGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetIdRetType = string /* @@ -44,8 +51,10 @@ type InstanceListInstanceGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceListInstanceGetNameAttributeTypeOk(arg InstanceListInstanceGetNameAttributeType) (ret InstanceListInstanceGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +62,15 @@ func getInstanceListInstanceGetNameAttributeTypeOk(arg InstanceListInstanceGetNa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceListInstanceGetNameAttributeType(arg *InstanceListInstanceGetNameAttributeType, val InstanceListInstanceGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetNameRetType = string /* @@ -68,18 +81,25 @@ type InstanceListInstanceGetNameRetType = string // InstanceListInstanceStatus The current status of the instance. // value type for enums +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceStatus string // List of Status const ( - INSTANCELISTINSTANCESTATUS_READY InstanceListInstanceStatus = "READY" - INSTANCELISTINSTANCESTATUS_PENDING InstanceListInstanceStatus = "PENDING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCELISTINSTANCESTATUS_READY InstanceListInstanceStatus = "READY" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCELISTINSTANCESTATUS_PENDING InstanceListInstanceStatus = "PENDING" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead INSTANCELISTINSTANCESTATUS_PROCESSING InstanceListInstanceStatus = "PROCESSING" - INSTANCELISTINSTANCESTATUS_FAILED InstanceListInstanceStatus = "FAILED" - INSTANCELISTINSTANCESTATUS_UNKNOWN InstanceListInstanceStatus = "UNKNOWN" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCELISTINSTANCESTATUS_FAILED InstanceListInstanceStatus = "FAILED" + // Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead + INSTANCELISTINSTANCESTATUS_UNKNOWN InstanceListInstanceStatus = "UNKNOWN" ) // All allowed values of InstanceListInstance enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead var AllowedInstanceListInstanceStatusEnumValues = []InstanceListInstanceStatus{ "READY", "PENDING", @@ -88,6 +108,7 @@ var AllowedInstanceListInstanceStatusEnumValues = []InstanceListInstanceStatus{ "UNKNOWN", } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *InstanceListInstanceStatus) UnmarshalJSON(src []byte) error { // use a type alias to prevent infinite recursion during unmarshal, // see https://biscuit.ninja/posts/go-avoid-an-infitine-loop-with-custom-json-unmarshallers @@ -115,6 +136,7 @@ func (v *InstanceListInstanceStatus) UnmarshalJSON(src []byte) error { // NewInstanceListInstanceStatusFromValue returns a pointer to a valid InstanceListInstanceStatus // for the value passed as argument, or an error if the value passed is not allowed by the enum +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewInstanceListInstanceStatusFromValue(v InstanceListInstanceStatus) (*InstanceListInstanceStatus, error) { ev := InstanceListInstanceStatus(v) if ev.IsValid() { @@ -125,6 +147,7 @@ func NewInstanceListInstanceStatusFromValue(v InstanceListInstanceStatus) (*Inst } // IsValid return true if the value is valid for the enum, false otherwise +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v InstanceListInstanceStatus) IsValid() bool { for _, existing := range AllowedInstanceListInstanceStatusEnumValues { if existing == v { @@ -135,50 +158,65 @@ func (v InstanceListInstanceStatus) IsValid() bool { } // Ptr returns reference to StatusStatus value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v InstanceListInstanceStatus) Ptr() *InstanceListInstanceStatus { return &v } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type NullableInstanceListInstanceStatus struct { value *InstanceListInstanceStatus isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceListInstanceStatus) Get() *InstanceListInstanceStatus { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceListInstanceStatus) Set(val *InstanceListInstanceStatus) { 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 NullableInstanceListInstanceStatus) 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 *NullableInstanceListInstanceStatus) 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 NewNullableInstanceListInstanceStatus(val *InstanceListInstanceStatus) *NullableInstanceListInstanceStatus { return &NullableInstanceListInstanceStatus{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 NullableInstanceListInstanceStatus) 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 *NullableInstanceListInstanceStatus) 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 InstanceListInstanceGetStatusAttributeType = *InstanceListInstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetStatusArgType = InstanceListInstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstanceGetStatusRetType = InstanceListInstanceStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceListInstanceGetStatusAttributeTypeOk(arg InstanceListInstanceGetStatusAttributeType) (ret InstanceListInstanceGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -186,11 +224,13 @@ func getInstanceListInstanceGetStatusAttributeTypeOk(arg InstanceListInstanceGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceListInstanceGetStatusAttributeType(arg *InstanceListInstanceGetStatusAttributeType, val InstanceListInstanceGetStatusRetType) { *arg = &val } // InstanceListInstance struct for InstanceListInstance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceListInstance struct { Id InstanceListInstanceGetIdAttributeType `json:"id,omitempty"` Name InstanceListInstanceGetNameAttributeType `json:"name,omitempty"` @@ -202,6 +242,7 @@ type InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { this := InstanceListInstance{} return &this @@ -210,12 +251,14 @@ func NewInstanceListInstance() *InstanceListInstance { // NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance object // This 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { this := InstanceListInstance{} return &this } // 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 *InstanceListInstance) GetId() (res InstanceListInstanceGetIdRetType) { res, _ = o.GetIdOk() return @@ -223,22 +266,26 @@ func (o *InstanceListInstance) GetId() (res InstanceListInstanceGetIdRetType) { // 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 *InstanceListInstance) GetIdOk() (ret InstanceListInstanceGetIdRetType, ok bool) { return getInstanceListInstanceGetIdAttributeTypeOk(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 *InstanceListInstance) 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 *InstanceListInstance) SetId(v InstanceListInstanceGetIdRetType) { setInstanceListInstanceGetIdAttributeType(&o.Id, 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 *InstanceListInstance) GetName() (res InstanceListInstanceGetNameRetType) { res, _ = o.GetNameOk() return @@ -246,22 +293,26 @@ func (o *InstanceListInstance) GetName() (res InstanceListInstanceGetNameRetType // 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 *InstanceListInstance) GetNameOk() (ret InstanceListInstanceGetNameRetType, ok bool) { return getInstanceListInstanceGetNameAttributeTypeOk(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 *InstanceListInstance) 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 *InstanceListInstance) SetName(v InstanceListInstanceGetNameRetType) { setInstanceListInstanceGetNameAttributeType(&o.Name, v) } // GetStatus returns the Status 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 *InstanceListInstance) GetStatus() (res InstanceListInstanceGetStatusRetType) { res, _ = o.GetStatusOk() return @@ -269,21 +320,25 @@ func (o *InstanceListInstance) GetStatus() (res InstanceListInstanceGetStatusRet // GetStatusOk returns a tuple with the Status 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 *InstanceListInstance) GetStatusOk() (ret InstanceListInstanceGetStatusRetType, ok bool) { return getInstanceListInstanceGetStatusAttributeTypeOk(o.Status) } // HasStatus 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 *InstanceListInstance) HasStatus() bool { _, ok := o.GetStatusOk() return ok } // SetStatus gets a reference to the given string and assigns it to the Status field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceListInstance) SetStatus(v InstanceListInstanceGetStatusRetType) { setInstanceListInstanceGetStatusAttributeType(&o.Status, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceListInstanceGetIdAttributeTypeOk(o.Id); ok { @@ -298,37 +353,45 @@ func (o InstanceListInstance) 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 NullableInstanceListInstance struct { value *InstanceListInstance isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceListInstance) Get() *InstanceListInstance { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { 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 NullableInstanceListInstance) 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 *NullableInstanceListInstance) 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 NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { return &NullableInstanceListInstance{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 NullableInstanceListInstance) 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 *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_instance_response.go b/services/mongodbflex/model_instance_response.go index 56434ccdd..948b86b5e 100644 --- a/services/mongodbflex/model_instance_response.go +++ b/services/mongodbflex/model_instance_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &InstanceResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseGetItemAttributeType = *Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseGetItemArgType = Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseGetItemRetType = Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseGetItemAttributeTypeOk(arg InstanceResponseGetItemAttributeType) (ret InstanceResponseGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getInstanceResponseGetItemAttributeTypeOk(arg InstanceResponseGetItemAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseGetItemAttributeType(arg *InstanceResponseGetItemAttributeType, val InstanceResponseGetItemRetType) { *arg = &val } // InstanceResponse struct for InstanceResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponse struct { Item InstanceResponseGetItemAttributeType `json:"item,omitempty"` } @@ -46,6 +55,7 @@ type InstanceResponse 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 NewInstanceResponse() *InstanceResponse { this := InstanceResponse{} return &this @@ -54,12 +64,14 @@ func NewInstanceResponse() *InstanceResponse { // NewInstanceResponseWithDefaults instantiates a new InstanceResponse object // This 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 NewInstanceResponseWithDefaults() *InstanceResponse { this := InstanceResponse{} return &this } // GetItem returns the Item 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 *InstanceResponse) GetItem() (res InstanceResponseGetItemRetType) { res, _ = o.GetItemOk() return @@ -67,21 +79,25 @@ func (o *InstanceResponse) GetItem() (res InstanceResponseGetItemRetType) { // GetItemOk returns a tuple with the Item 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 *InstanceResponse) GetItemOk() (ret InstanceResponseGetItemRetType, ok bool) { return getInstanceResponseGetItemAttributeTypeOk(o.Item) } // HasItem 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 *InstanceResponse) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given Instance and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceResponse) SetItem(v InstanceResponseGetItemRetType) { setInstanceResponseGetItemAttributeType(&o.Item, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o InstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceResponseGetItemAttributeTypeOk(o.Item); ok { @@ -90,37 +106,45 @@ func (o InstanceResponse) 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 NullableInstanceResponse struct { value *InstanceResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceResponse) Get() *InstanceResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceResponse) Set(val *InstanceResponse) { 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 NullableInstanceResponse) 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 *NullableInstanceResponse) 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 NewNullableInstanceResponse(val *InstanceResponse) *NullableInstanceResponse { return &NullableInstanceResponse{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 NullableInstanceResponse) 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 *NullableInstanceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_instance_response_user.go b/services/mongodbflex/model_instance_response_user.go index 72755a289..11bdcb608 100644 --- a/services/mongodbflex/model_instance_response_user.go +++ b/services/mongodbflex/model_instance_response_user.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &InstanceResponseUser{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetDatabaseAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseUserGetDatabaseAttributeTypeOk(arg InstanceResponseUserGetDatabaseAttributeType) (ret InstanceResponseUserGetDatabaseRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getInstanceResponseUserGetDatabaseAttributeTypeOk(arg InstanceResponseUserG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseUserGetDatabaseAttributeType(arg *InstanceResponseUserGetDatabaseAttributeType, val InstanceResponseUserGetDatabaseRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetDatabaseRetType = string /* @@ -43,8 +50,10 @@ type InstanceResponseUserGetDatabaseRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetHostAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseUserGetHostAttributeTypeOk(arg InstanceResponseUserGetHostAttributeType) (ret InstanceResponseUserGetHostRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getInstanceResponseUserGetHostAttributeTypeOk(arg InstanceResponseUserGetHo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseUserGetHostAttributeType(arg *InstanceResponseUserGetHostAttributeType, val InstanceResponseUserGetHostRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetHostArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetHostRetType = string /* @@ -64,8 +77,10 @@ type InstanceResponseUserGetHostRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseUserGetIdAttributeTypeOk(arg InstanceResponseUserGetIdAttributeType) (ret InstanceResponseUserGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getInstanceResponseUserGetIdAttributeTypeOk(arg InstanceResponseUserGetIdAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseUserGetIdAttributeType(arg *InstanceResponseUserGetIdAttributeType, val InstanceResponseUserGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetIdRetType = string /* @@ -85,10 +104,16 @@ type InstanceResponseUserGetIdRetType = string */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetPortAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetPortArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetPortRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseUserGetPortAttributeTypeOk(arg InstanceResponseUserGetPortAttributeType) (ret InstanceResponseUserGetPortRetType, ok bool) { if arg == nil { return ret, false @@ -96,6 +121,7 @@ func getInstanceResponseUserGetPortAttributeTypeOk(arg InstanceResponseUserGetPo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseUserGetPortAttributeType(arg *InstanceResponseUserGetPortAttributeType, val InstanceResponseUserGetPortRetType) { *arg = &val } @@ -105,10 +131,16 @@ func setInstanceResponseUserGetPortAttributeType(arg *InstanceResponseUserGetPor */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetRolesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetRolesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseUserGetRolesAttributeTypeOk(arg InstanceResponseUserGetRolesAttributeType) (ret InstanceResponseUserGetRolesRetType, ok bool) { if arg == nil { return ret, false @@ -116,6 +148,7 @@ func getInstanceResponseUserGetRolesAttributeTypeOk(arg InstanceResponseUserGetR return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseUserGetRolesAttributeType(arg *InstanceResponseUserGetRolesAttributeType, val InstanceResponseUserGetRolesRetType) { *arg = &val } @@ -125,8 +158,10 @@ func setInstanceResponseUserGetRolesAttributeType(arg *InstanceResponseUserGetRo */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetUsernameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getInstanceResponseUserGetUsernameAttributeTypeOk(arg InstanceResponseUserGetUsernameAttributeType) (ret InstanceResponseUserGetUsernameRetType, ok bool) { if arg == nil { return ret, false @@ -134,14 +169,19 @@ func getInstanceResponseUserGetUsernameAttributeTypeOk(arg InstanceResponseUserG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setInstanceResponseUserGetUsernameAttributeType(arg *InstanceResponseUserGetUsernameAttributeType, val InstanceResponseUserGetUsernameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUserGetUsernameRetType = string // InstanceResponseUser struct for InstanceResponseUser +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type InstanceResponseUser struct { Database InstanceResponseUserGetDatabaseAttributeType `json:"database,omitempty"` Host InstanceResponseUserGetHostAttributeType `json:"host,omitempty"` @@ -156,6 +196,7 @@ type InstanceResponseUser 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 NewInstanceResponseUser() *InstanceResponseUser { this := InstanceResponseUser{} return &this @@ -164,12 +205,14 @@ func NewInstanceResponseUser() *InstanceResponseUser { // NewInstanceResponseUserWithDefaults instantiates a new InstanceResponseUser object // This 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 NewInstanceResponseUserWithDefaults() *InstanceResponseUser { this := InstanceResponseUser{} return &this } // GetDatabase returns the Database 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 *InstanceResponseUser) GetDatabase() (res InstanceResponseUserGetDatabaseRetType) { res, _ = o.GetDatabaseOk() return @@ -177,22 +220,26 @@ func (o *InstanceResponseUser) GetDatabase() (res InstanceResponseUserGetDatabas // GetDatabaseOk returns a tuple with the Database 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 *InstanceResponseUser) GetDatabaseOk() (ret InstanceResponseUserGetDatabaseRetType, ok bool) { return getInstanceResponseUserGetDatabaseAttributeTypeOk(o.Database) } // HasDatabase 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 *InstanceResponseUser) HasDatabase() bool { _, ok := o.GetDatabaseOk() return ok } // SetDatabase gets a reference to the given string and assigns it to the Database field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceResponseUser) SetDatabase(v InstanceResponseUserGetDatabaseRetType) { setInstanceResponseUserGetDatabaseAttributeType(&o.Database, v) } // GetHost returns the Host 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 *InstanceResponseUser) GetHost() (res InstanceResponseUserGetHostRetType) { res, _ = o.GetHostOk() return @@ -200,22 +247,26 @@ func (o *InstanceResponseUser) GetHost() (res InstanceResponseUserGetHostRetType // GetHostOk returns a tuple with the Host 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 *InstanceResponseUser) GetHostOk() (ret InstanceResponseUserGetHostRetType, ok bool) { return getInstanceResponseUserGetHostAttributeTypeOk(o.Host) } // HasHost 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 *InstanceResponseUser) HasHost() bool { _, ok := o.GetHostOk() return ok } // SetHost gets a reference to the given string and assigns it to the Host field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceResponseUser) SetHost(v InstanceResponseUserGetHostRetType) { setInstanceResponseUserGetHostAttributeType(&o.Host, 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 *InstanceResponseUser) GetId() (res InstanceResponseUserGetIdRetType) { res, _ = o.GetIdOk() return @@ -223,22 +274,26 @@ func (o *InstanceResponseUser) GetId() (res InstanceResponseUserGetIdRetType) { // 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 *InstanceResponseUser) GetIdOk() (ret InstanceResponseUserGetIdRetType, ok bool) { return getInstanceResponseUserGetIdAttributeTypeOk(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 *InstanceResponseUser) 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 *InstanceResponseUser) SetId(v InstanceResponseUserGetIdRetType) { setInstanceResponseUserGetIdAttributeType(&o.Id, v) } // GetPort returns the Port 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 *InstanceResponseUser) GetPort() (res InstanceResponseUserGetPortRetType) { res, _ = o.GetPortOk() return @@ -246,22 +301,26 @@ func (o *InstanceResponseUser) GetPort() (res InstanceResponseUserGetPortRetType // GetPortOk returns a tuple with the Port 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 *InstanceResponseUser) GetPortOk() (ret InstanceResponseUserGetPortRetType, ok bool) { return getInstanceResponseUserGetPortAttributeTypeOk(o.Port) } // HasPort 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 *InstanceResponseUser) HasPort() bool { _, ok := o.GetPortOk() return ok } // SetPort gets a reference to the given int64 and assigns it to the Port field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceResponseUser) SetPort(v InstanceResponseUserGetPortRetType) { setInstanceResponseUserGetPortAttributeType(&o.Port, v) } // GetRoles returns the Roles 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 *InstanceResponseUser) GetRoles() (res InstanceResponseUserGetRolesRetType) { res, _ = o.GetRolesOk() return @@ -269,22 +328,26 @@ func (o *InstanceResponseUser) GetRoles() (res InstanceResponseUserGetRolesRetTy // GetRolesOk returns a tuple with the Roles 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 *InstanceResponseUser) GetRolesOk() (ret InstanceResponseUserGetRolesRetType, ok bool) { return getInstanceResponseUserGetRolesAttributeTypeOk(o.Roles) } // HasRoles 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 *InstanceResponseUser) HasRoles() bool { _, ok := o.GetRolesOk() return ok } // SetRoles gets a reference to the given []string and assigns it to the Roles field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceResponseUser) SetRoles(v InstanceResponseUserGetRolesRetType) { setInstanceResponseUserGetRolesAttributeType(&o.Roles, v) } // GetUsername returns the Username 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 *InstanceResponseUser) GetUsername() (res InstanceResponseUserGetUsernameRetType) { res, _ = o.GetUsernameOk() return @@ -292,21 +355,25 @@ func (o *InstanceResponseUser) GetUsername() (res InstanceResponseUserGetUsernam // GetUsernameOk returns a tuple with the Username 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 *InstanceResponseUser) GetUsernameOk() (ret InstanceResponseUserGetUsernameRetType, ok bool) { return getInstanceResponseUserGetUsernameAttributeTypeOk(o.Username) } // HasUsername 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 *InstanceResponseUser) HasUsername() bool { _, ok := o.GetUsernameOk() return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *InstanceResponseUser) SetUsername(v InstanceResponseUserGetUsernameRetType) { setInstanceResponseUserGetUsernameAttributeType(&o.Username, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o InstanceResponseUser) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getInstanceResponseUserGetDatabaseAttributeTypeOk(o.Database); ok { @@ -330,37 +397,45 @@ func (o InstanceResponseUser) 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 NullableInstanceResponseUser struct { value *InstanceResponseUser isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableInstanceResponseUser) Get() *InstanceResponseUser { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableInstanceResponseUser) Set(val *InstanceResponseUser) { 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 NullableInstanceResponseUser) 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 *NullableInstanceResponseUser) 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 NewNullableInstanceResponseUser(val *InstanceResponseUser) *NullableInstanceResponseUser { return &NullableInstanceResponseUser{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 NullableInstanceResponseUser) 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 *NullableInstanceResponseUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_backups_response.go b/services/mongodbflex/model_list_backups_response.go index b41b3e009..fde979a3b 100644 --- a/services/mongodbflex/model_list_backups_response.go +++ b/services/mongodbflex/model_list_backups_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListBackupsResponse{} */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponseGetCountAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponseGetCountArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponseGetCountRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListBackupsResponseGetCountAttributeTypeOk(arg ListBackupsResponseGetCountAttributeType) (ret ListBackupsResponseGetCountRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getListBackupsResponseGetCountAttributeTypeOk(arg ListBackupsResponseGetCou return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListBackupsResponseGetCountAttributeType(arg *ListBackupsResponseGetCountAttributeType, val ListBackupsResponseGetCountRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setListBackupsResponseGetCountAttributeType(arg *ListBackupsResponseGetCoun */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponseGetItemsAttributeType = *[]Backup + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponseGetItemsArgType = []Backup + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponseGetItemsRetType = []Backup +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListBackupsResponseGetItemsAttributeTypeOk(arg ListBackupsResponseGetItemsAttributeType) (ret ListBackupsResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getListBackupsResponseGetItemsAttributeTypeOk(arg ListBackupsResponseGetIte return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListBackupsResponseGetItemsAttributeType(arg *ListBackupsResponseGetItemsAttributeType, val ListBackupsResponseGetItemsRetType) { *arg = &val } // ListBackupsResponse struct for ListBackupsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListBackupsResponse struct { Count ListBackupsResponseGetCountAttributeType `json:"count,omitempty"` Items ListBackupsResponseGetItemsAttributeType `json:"items,omitempty"` @@ -67,6 +83,7 @@ type ListBackupsResponse 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 NewListBackupsResponse() *ListBackupsResponse { this := ListBackupsResponse{} return &this @@ -75,12 +92,14 @@ func NewListBackupsResponse() *ListBackupsResponse { // NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListBackupsResponseWithDefaults() *ListBackupsResponse { this := ListBackupsResponse{} return &this } // GetCount returns the Count 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 *ListBackupsResponse) GetCount() (res ListBackupsResponseGetCountRetType) { res, _ = o.GetCountOk() return @@ -88,22 +107,26 @@ func (o *ListBackupsResponse) GetCount() (res ListBackupsResponseGetCountRetType // GetCountOk returns a tuple with the Count 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 *ListBackupsResponse) GetCountOk() (ret ListBackupsResponseGetCountRetType, ok bool) { return getListBackupsResponseGetCountAttributeTypeOk(o.Count) } // HasCount 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 *ListBackupsResponse) HasCount() bool { _, ok := o.GetCountOk() return ok } // SetCount gets a reference to the given int64 and assigns it to the Count field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListBackupsResponse) SetCount(v ListBackupsResponseGetCountRetType) { setListBackupsResponseGetCountAttributeType(&o.Count, v) } // GetItems returns the Items 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 *ListBackupsResponse) GetItems() (res ListBackupsResponseGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -111,21 +134,25 @@ func (o *ListBackupsResponse) GetItems() (res ListBackupsResponseGetItemsRetType // GetItemsOk returns a tuple with the Items 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 *ListBackupsResponse) GetItemsOk() (ret ListBackupsResponseGetItemsRetType, ok bool) { return getListBackupsResponseGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *ListBackupsResponse) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []Backup and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListBackupsResponse) SetItems(v ListBackupsResponseGetItemsRetType) { setListBackupsResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListBackupsResponseGetCountAttributeTypeOk(o.Count); ok { @@ -137,37 +164,45 @@ func (o ListBackupsResponse) 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 NullableListBackupsResponse struct { value *ListBackupsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListBackupsResponse) Get() *ListBackupsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { 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 NullableListBackupsResponse) 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 *NullableListBackupsResponse) 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 NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { return &NullableListBackupsResponse{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 NullableListBackupsResponse) 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 *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_flavors_response.go b/services/mongodbflex/model_list_flavors_response.go index 3bf5da661..e8c65f518 100644 --- a/services/mongodbflex/model_list_flavors_response.go +++ b/services/mongodbflex/model_list_flavors_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListFlavorsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFlavorsResponseGetFlavorsAttributeType = *[]InstanceFlavor + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFlavorsResponseGetFlavorsArgType = []InstanceFlavor + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFlavorsResponseGetFlavorsRetType = []InstanceFlavor +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListFlavorsResponseGetFlavorsAttributeTypeOk(arg ListFlavorsResponseGetFlavorsAttributeType) (ret ListFlavorsResponseGetFlavorsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListFlavorsResponseGetFlavorsAttributeTypeOk(arg ListFlavorsResponseGetF return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListFlavorsResponseGetFlavorsAttributeType(arg *ListFlavorsResponseGetFlavorsAttributeType, val ListFlavorsResponseGetFlavorsRetType) { *arg = &val } // ListFlavorsResponse struct for ListFlavorsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListFlavorsResponse struct { Flavors ListFlavorsResponseGetFlavorsAttributeType `json:"flavors,omitempty"` } @@ -46,6 +55,7 @@ type ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { this := ListFlavorsResponse{} return &this @@ -54,12 +64,14 @@ func NewListFlavorsResponse() *ListFlavorsResponse { // NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse object // This 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { this := ListFlavorsResponse{} return &this } // GetFlavors returns the Flavors 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 *ListFlavorsResponse) GetFlavors() (res ListFlavorsResponseGetFlavorsRetType) { res, _ = o.GetFlavorsOk() return @@ -67,21 +79,25 @@ func (o *ListFlavorsResponse) GetFlavors() (res ListFlavorsResponseGetFlavorsRet // GetFlavorsOk returns a tuple with the Flavors 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 *ListFlavorsResponse) GetFlavorsOk() (ret ListFlavorsResponseGetFlavorsRetType, ok bool) { return getListFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors) } // HasFlavors 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 *ListFlavorsResponse) HasFlavors() bool { _, ok := o.GetFlavorsOk() return ok } // SetFlavors gets a reference to the given []InstanceFlavor and assigns it to the Flavors field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListFlavorsResponse) SetFlavors(v ListFlavorsResponseGetFlavorsRetType) { setListFlavorsResponseGetFlavorsAttributeType(&o.Flavors, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors); ok { @@ -90,37 +106,45 @@ func (o ListFlavorsResponse) 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 NullableListFlavorsResponse struct { value *ListFlavorsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { 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 NullableListFlavorsResponse) 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 *NullableListFlavorsResponse) 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 NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { return &NullableListFlavorsResponse{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 NullableListFlavorsResponse) 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 *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_instances_response.go b/services/mongodbflex/model_list_instances_response.go index fb4e184dc..5e6a765f8 100644 --- a/services/mongodbflex/model_list_instances_response.go +++ b/services/mongodbflex/model_list_instances_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListInstancesResponse{} */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetCountAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetCountArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetCountRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListInstancesResponseGetCountAttributeTypeOk(arg ListInstancesResponseGetCountAttributeType) (ret ListInstancesResponseGetCountRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getListInstancesResponseGetCountAttributeTypeOk(arg ListInstancesResponseGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListInstancesResponseGetCountAttributeType(arg *ListInstancesResponseGetCountAttributeType, val ListInstancesResponseGetCountRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setListInstancesResponseGetCountAttributeType(arg *ListInstancesResponseGet */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetItemsAttributeType = *[]InstanceListInstance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetItemsArgType = []InstanceListInstance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponseGetItemsRetType = []InstanceListInstance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListInstancesResponseGetItemsAttributeTypeOk(arg ListInstancesResponseGetItemsAttributeType) (ret ListInstancesResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getListInstancesResponseGetItemsAttributeTypeOk(arg ListInstancesResponseGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListInstancesResponseGetItemsAttributeType(arg *ListInstancesResponseGetItemsAttributeType, val ListInstancesResponseGetItemsRetType) { *arg = &val } // ListInstancesResponse struct for ListInstancesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListInstancesResponse struct { Count ListInstancesResponseGetCountAttributeType `json:"count,omitempty"` Items ListInstancesResponseGetItemsAttributeType `json:"items,omitempty"` @@ -67,6 +83,7 @@ type ListInstancesResponse 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 NewListInstancesResponse() *ListInstancesResponse { this := ListInstancesResponse{} return &this @@ -75,12 +92,14 @@ func NewListInstancesResponse() *ListInstancesResponse { // NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListInstancesResponseWithDefaults() *ListInstancesResponse { this := ListInstancesResponse{} return &this } // GetCount returns the Count 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 *ListInstancesResponse) GetCount() (res ListInstancesResponseGetCountRetType) { res, _ = o.GetCountOk() return @@ -88,22 +107,26 @@ func (o *ListInstancesResponse) GetCount() (res ListInstancesResponseGetCountRet // GetCountOk returns a tuple with the Count 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 *ListInstancesResponse) GetCountOk() (ret ListInstancesResponseGetCountRetType, ok bool) { return getListInstancesResponseGetCountAttributeTypeOk(o.Count) } // HasCount 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 *ListInstancesResponse) HasCount() bool { _, ok := o.GetCountOk() return ok } // SetCount gets a reference to the given int64 and assigns it to the Count field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListInstancesResponse) SetCount(v ListInstancesResponseGetCountRetType) { setListInstancesResponseGetCountAttributeType(&o.Count, v) } // GetItems returns the Items 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 *ListInstancesResponse) GetItems() (res ListInstancesResponseGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -111,21 +134,25 @@ func (o *ListInstancesResponse) GetItems() (res ListInstancesResponseGetItemsRet // GetItemsOk returns a tuple with the Items 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 *ListInstancesResponse) GetItemsOk() (ret ListInstancesResponseGetItemsRetType, ok bool) { return getListInstancesResponseGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *ListInstancesResponse) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListInstancesResponse) SetItems(v ListInstancesResponseGetItemsRetType) { setListInstancesResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListInstancesResponseGetCountAttributeTypeOk(o.Count); ok { @@ -137,37 +164,45 @@ func (o ListInstancesResponse) 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 NullableListInstancesResponse struct { value *ListInstancesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListInstancesResponse) Get() *ListInstancesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { 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 NullableListInstancesResponse) 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 *NullableListInstancesResponse) 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 NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { return &NullableListInstancesResponse{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 NullableListInstancesResponse) 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 *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_metrics_response.go b/services/mongodbflex/model_list_metrics_response.go index 9a9e4bfdd..bc0113940 100644 --- a/services/mongodbflex/model_list_metrics_response.go +++ b/services/mongodbflex/model_list_metrics_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListMetricsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListMetricsResponseGetHostsAttributeType = *[]Host + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListMetricsResponseGetHostsArgType = []Host + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListMetricsResponseGetHostsRetType = []Host +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListMetricsResponseGetHostsAttributeTypeOk(arg ListMetricsResponseGetHostsAttributeType) (ret ListMetricsResponseGetHostsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListMetricsResponseGetHostsAttributeTypeOk(arg ListMetricsResponseGetHos return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListMetricsResponseGetHostsAttributeType(arg *ListMetricsResponseGetHostsAttributeType, val ListMetricsResponseGetHostsRetType) { *arg = &val } // ListMetricsResponse struct for ListMetricsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListMetricsResponse struct { Hosts ListMetricsResponseGetHostsAttributeType `json:"hosts,omitempty"` } @@ -46,6 +55,7 @@ type ListMetricsResponse 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 NewListMetricsResponse() *ListMetricsResponse { this := ListMetricsResponse{} return &this @@ -54,12 +64,14 @@ func NewListMetricsResponse() *ListMetricsResponse { // NewListMetricsResponseWithDefaults instantiates a new ListMetricsResponse object // This 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 NewListMetricsResponseWithDefaults() *ListMetricsResponse { this := ListMetricsResponse{} return &this } // GetHosts returns the Hosts 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 *ListMetricsResponse) GetHosts() (res ListMetricsResponseGetHostsRetType) { res, _ = o.GetHostsOk() return @@ -67,21 +79,25 @@ func (o *ListMetricsResponse) GetHosts() (res ListMetricsResponseGetHostsRetType // GetHostsOk returns a tuple with the Hosts 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 *ListMetricsResponse) GetHostsOk() (ret ListMetricsResponseGetHostsRetType, ok bool) { return getListMetricsResponseGetHostsAttributeTypeOk(o.Hosts) } // HasHosts 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 *ListMetricsResponse) HasHosts() bool { _, ok := o.GetHostsOk() return ok } // SetHosts gets a reference to the given []Host and assigns it to the Hosts field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListMetricsResponse) SetHosts(v ListMetricsResponseGetHostsRetType) { setListMetricsResponseGetHostsAttributeType(&o.Hosts, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListMetricsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListMetricsResponseGetHostsAttributeTypeOk(o.Hosts); ok { @@ -90,37 +106,45 @@ func (o ListMetricsResponse) 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 NullableListMetricsResponse struct { value *ListMetricsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListMetricsResponse) Get() *ListMetricsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListMetricsResponse) Set(val *ListMetricsResponse) { 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 NullableListMetricsResponse) 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 *NullableListMetricsResponse) 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 NewNullableListMetricsResponse(val *ListMetricsResponse) *NullableListMetricsResponse { return &NullableListMetricsResponse{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 NullableListMetricsResponse) 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 *NullableListMetricsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_restore_jobs_response.go b/services/mongodbflex/model_list_restore_jobs_response.go index 9ef6f6723..5e284974d 100644 --- a/services/mongodbflex/model_list_restore_jobs_response.go +++ b/services/mongodbflex/model_list_restore_jobs_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListRestoreJobsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListRestoreJobsResponseGetItemsAttributeType = *[]RestoreInstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListRestoreJobsResponseGetItemsArgType = []RestoreInstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListRestoreJobsResponseGetItemsRetType = []RestoreInstanceStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListRestoreJobsResponseGetItemsAttributeTypeOk(arg ListRestoreJobsResponseGetItemsAttributeType) (ret ListRestoreJobsResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListRestoreJobsResponseGetItemsAttributeTypeOk(arg ListRestoreJobsRespon return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListRestoreJobsResponseGetItemsAttributeType(arg *ListRestoreJobsResponseGetItemsAttributeType, val ListRestoreJobsResponseGetItemsRetType) { *arg = &val } // ListRestoreJobsResponse struct for ListRestoreJobsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListRestoreJobsResponse struct { Items ListRestoreJobsResponseGetItemsAttributeType `json:"items,omitempty"` } @@ -46,6 +55,7 @@ type ListRestoreJobsResponse 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 NewListRestoreJobsResponse() *ListRestoreJobsResponse { this := ListRestoreJobsResponse{} return &this @@ -54,12 +64,14 @@ func NewListRestoreJobsResponse() *ListRestoreJobsResponse { // NewListRestoreJobsResponseWithDefaults instantiates a new ListRestoreJobsResponse object // This 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 NewListRestoreJobsResponseWithDefaults() *ListRestoreJobsResponse { this := ListRestoreJobsResponse{} return &this } // GetItems returns the Items 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 *ListRestoreJobsResponse) GetItems() (res ListRestoreJobsResponseGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -67,21 +79,25 @@ func (o *ListRestoreJobsResponse) GetItems() (res ListRestoreJobsResponseGetItem // GetItemsOk returns a tuple with the Items 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 *ListRestoreJobsResponse) GetItemsOk() (ret ListRestoreJobsResponseGetItemsRetType, ok bool) { return getListRestoreJobsResponseGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *ListRestoreJobsResponse) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []RestoreInstanceStatus and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListRestoreJobsResponse) SetItems(v ListRestoreJobsResponseGetItemsRetType) { setListRestoreJobsResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListRestoreJobsResponseGetItemsAttributeTypeOk(o.Items); ok { @@ -90,37 +106,45 @@ func (o ListRestoreJobsResponse) 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 NullableListRestoreJobsResponse struct { value *ListRestoreJobsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListRestoreJobsResponse) Get() *ListRestoreJobsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListRestoreJobsResponse) Set(val *ListRestoreJobsResponse) { 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 NullableListRestoreJobsResponse) 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 *NullableListRestoreJobsResponse) 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 NewNullableListRestoreJobsResponse(val *ListRestoreJobsResponse) *NullableListRestoreJobsResponse { return &NullableListRestoreJobsResponse{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 NullableListRestoreJobsResponse) 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 *NullableListRestoreJobsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_storages_response.go b/services/mongodbflex/model_list_storages_response.go index f240d7772..8dfb01bc5 100644 --- a/services/mongodbflex/model_list_storages_response.go +++ b/services/mongodbflex/model_list_storages_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListStoragesResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponseGetStorageClassesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponseGetStorageClassesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponseGetStorageClassesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListStoragesResponseGetStorageClassesAttributeTypeOk(arg ListStoragesResponseGetStorageClassesAttributeType) (ret ListStoragesResponseGetStorageClassesRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getListStoragesResponseGetStorageClassesAttributeTypeOk(arg ListStoragesRes return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListStoragesResponseGetStorageClassesAttributeType(arg *ListStoragesResponseGetStorageClassesAttributeType, val ListStoragesResponseGetStorageClassesRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setListStoragesResponseGetStorageClassesAttributeType(arg *ListStoragesResp */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponseGetStorageRangeAttributeType = *StorageRange + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponseGetStorageRangeArgType = StorageRange + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponseGetStorageRangeRetType = StorageRange +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListStoragesResponseGetStorageRangeAttributeTypeOk(arg ListStoragesResponseGetStorageRangeAttributeType) (ret ListStoragesResponseGetStorageRangeRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getListStoragesResponseGetStorageRangeAttributeTypeOk(arg ListStoragesRespo return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListStoragesResponseGetStorageRangeAttributeType(arg *ListStoragesResponseGetStorageRangeAttributeType, val ListStoragesResponseGetStorageRangeRetType) { *arg = &val } // ListStoragesResponse struct for ListStoragesResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListStoragesResponse struct { StorageClasses ListStoragesResponseGetStorageClassesAttributeType `json:"storageClasses,omitempty"` StorageRange ListStoragesResponseGetStorageRangeAttributeType `json:"storageRange,omitempty"` @@ -67,6 +83,7 @@ type ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { this := ListStoragesResponse{} return &this @@ -75,12 +92,14 @@ func NewListStoragesResponse() *ListStoragesResponse { // NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse object // This 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { this := ListStoragesResponse{} return &this } // GetStorageClasses returns the StorageClasses 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 *ListStoragesResponse) GetStorageClasses() (res ListStoragesResponseGetStorageClassesRetType) { res, _ = o.GetStorageClassesOk() return @@ -88,22 +107,26 @@ func (o *ListStoragesResponse) GetStorageClasses() (res ListStoragesResponseGetS // GetStorageClassesOk returns a tuple with the StorageClasses 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 *ListStoragesResponse) GetStorageClassesOk() (ret ListStoragesResponseGetStorageClassesRetType, ok bool) { return getListStoragesResponseGetStorageClassesAttributeTypeOk(o.StorageClasses) } // HasStorageClasses 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 *ListStoragesResponse) HasStorageClasses() bool { _, ok := o.GetStorageClassesOk() return ok } // SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListStoragesResponse) SetStorageClasses(v ListStoragesResponseGetStorageClassesRetType) { setListStoragesResponseGetStorageClassesAttributeType(&o.StorageClasses, v) } // GetStorageRange returns the StorageRange 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 *ListStoragesResponse) GetStorageRange() (res ListStoragesResponseGetStorageRangeRetType) { res, _ = o.GetStorageRangeOk() return @@ -111,21 +134,25 @@ func (o *ListStoragesResponse) GetStorageRange() (res ListStoragesResponseGetSto // GetStorageRangeOk returns a tuple with the StorageRange 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 *ListStoragesResponse) GetStorageRangeOk() (ret ListStoragesResponseGetStorageRangeRetType, ok bool) { return getListStoragesResponseGetStorageRangeAttributeTypeOk(o.StorageRange) } // HasStorageRange 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 *ListStoragesResponse) HasStorageRange() bool { _, ok := o.GetStorageRangeOk() return ok } // SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListStoragesResponse) SetStorageRange(v ListStoragesResponseGetStorageRangeRetType) { setListStoragesResponseGetStorageRangeAttributeType(&o.StorageRange, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListStoragesResponseGetStorageClassesAttributeTypeOk(o.StorageClasses); ok { @@ -137,37 +164,45 @@ func (o ListStoragesResponse) 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 NullableListStoragesResponse struct { value *ListStoragesResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListStoragesResponse) Get() *ListStoragesResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { 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 NullableListStoragesResponse) 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 *NullableListStoragesResponse) 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 NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { return &NullableListStoragesResponse{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 NullableListStoragesResponse) 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 *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_user.go b/services/mongodbflex/model_list_user.go index 0cf476395..a4d595c2f 100644 --- a/services/mongodbflex/model_list_user.go +++ b/services/mongodbflex/model_list_user.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &ListUser{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUserGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListUserGetIdAttributeTypeOk(arg ListUserGetIdAttributeType) (ret ListUserGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getListUserGetIdAttributeTypeOk(arg ListUserGetIdAttributeType) (ret ListUs return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListUserGetIdAttributeType(arg *ListUserGetIdAttributeType, val ListUserGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUserGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUserGetIdRetType = string /* @@ -43,8 +50,10 @@ type ListUserGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUserGetUsernameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListUserGetUsernameAttributeTypeOk(arg ListUserGetUsernameAttributeType) (ret ListUserGetUsernameRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getListUserGetUsernameAttributeTypeOk(arg ListUserGetUsernameAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListUserGetUsernameAttributeType(arg *ListUserGetUsernameAttributeType, val ListUserGetUsernameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUserGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUserGetUsernameRetType = string // ListUser struct for ListUser +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUser struct { Id ListUserGetIdAttributeType `json:"id,omitempty"` Username ListUserGetUsernameAttributeType `json:"username,omitempty"` @@ -69,6 +83,7 @@ type ListUser 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 NewListUser() *ListUser { this := ListUser{} return &this @@ -77,12 +92,14 @@ func NewListUser() *ListUser { // NewListUserWithDefaults instantiates a new ListUser object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewListUserWithDefaults() *ListUser { this := ListUser{} return &this } // 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 *ListUser) GetId() (res ListUserGetIdRetType) { res, _ = o.GetIdOk() return @@ -90,22 +107,26 @@ func (o *ListUser) GetId() (res ListUserGetIdRetType) { // 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 *ListUser) GetIdOk() (ret ListUserGetIdRetType, ok bool) { return getListUserGetIdAttributeTypeOk(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 *ListUser) 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 *ListUser) SetId(v ListUserGetIdRetType) { setListUserGetIdAttributeType(&o.Id, v) } // GetUsername returns the Username 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 *ListUser) GetUsername() (res ListUserGetUsernameRetType) { res, _ = o.GetUsernameOk() return @@ -113,21 +134,25 @@ func (o *ListUser) GetUsername() (res ListUserGetUsernameRetType) { // GetUsernameOk returns a tuple with the Username 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 *ListUser) GetUsernameOk() (ret ListUserGetUsernameRetType, ok bool) { return getListUserGetUsernameAttributeTypeOk(o.Username) } // HasUsername 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 *ListUser) HasUsername() bool { _, ok := o.GetUsernameOk() return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListUser) SetUsername(v ListUserGetUsernameRetType) { setListUserGetUsernameAttributeType(&o.Username, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListUser) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListUserGetIdAttributeTypeOk(o.Id); ok { @@ -139,37 +164,45 @@ func (o ListUser) 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 NullableListUser struct { value *ListUser isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListUser) Get() *ListUser { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListUser) Set(val *ListUser) { 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 NullableListUser) 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 *NullableListUser) 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 NewNullableListUser(val *ListUser) *NullableListUser { return &NullableListUser{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 NullableListUser) 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 *NullableListUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_users_response.go b/services/mongodbflex/model_list_users_response.go index a7308fb48..cafa24765 100644 --- a/services/mongodbflex/model_list_users_response.go +++ b/services/mongodbflex/model_list_users_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListUsersResponse{} */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetCountAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetCountArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetCountRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListUsersResponseGetCountAttributeTypeOk(arg ListUsersResponseGetCountAttributeType) (ret ListUsersResponseGetCountRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getListUsersResponseGetCountAttributeTypeOk(arg ListUsersResponseGetCountAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListUsersResponseGetCountAttributeType(arg *ListUsersResponseGetCountAttributeType, val ListUsersResponseGetCountRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setListUsersResponseGetCountAttributeType(arg *ListUsersResponseGetCountAtt */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetItemsAttributeType = *[]ListUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetItemsArgType = []ListUser + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponseGetItemsRetType = []ListUser +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListUsersResponseGetItemsAttributeTypeOk(arg ListUsersResponseGetItemsAttributeType) (ret ListUsersResponseGetItemsRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getListUsersResponseGetItemsAttributeTypeOk(arg ListUsersResponseGetItemsAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListUsersResponseGetItemsAttributeType(arg *ListUsersResponseGetItemsAttributeType, val ListUsersResponseGetItemsRetType) { *arg = &val } // ListUsersResponse struct for ListUsersResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListUsersResponse struct { Count ListUsersResponseGetCountAttributeType `json:"count,omitempty"` Items ListUsersResponseGetItemsAttributeType `json:"items,omitempty"` @@ -67,6 +83,7 @@ type ListUsersResponse 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 NewListUsersResponse() *ListUsersResponse { this := ListUsersResponse{} return &this @@ -75,12 +92,14 @@ func NewListUsersResponse() *ListUsersResponse { // NewListUsersResponseWithDefaults instantiates a new ListUsersResponse object // This 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 NewListUsersResponseWithDefaults() *ListUsersResponse { this := ListUsersResponse{} return &this } // GetCount returns the Count 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 *ListUsersResponse) GetCount() (res ListUsersResponseGetCountRetType) { res, _ = o.GetCountOk() return @@ -88,22 +107,26 @@ func (o *ListUsersResponse) GetCount() (res ListUsersResponseGetCountRetType) { // GetCountOk returns a tuple with the Count 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 *ListUsersResponse) GetCountOk() (ret ListUsersResponseGetCountRetType, ok bool) { return getListUsersResponseGetCountAttributeTypeOk(o.Count) } // HasCount 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 *ListUsersResponse) HasCount() bool { _, ok := o.GetCountOk() return ok } // SetCount gets a reference to the given int64 and assigns it to the Count field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListUsersResponse) SetCount(v ListUsersResponseGetCountRetType) { setListUsersResponseGetCountAttributeType(&o.Count, v) } // GetItems returns the Items 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 *ListUsersResponse) GetItems() (res ListUsersResponseGetItemsRetType) { res, _ = o.GetItemsOk() return @@ -111,21 +134,25 @@ func (o *ListUsersResponse) GetItems() (res ListUsersResponseGetItemsRetType) { // GetItemsOk returns a tuple with the Items 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 *ListUsersResponse) GetItemsOk() (ret ListUsersResponseGetItemsRetType, ok bool) { return getListUsersResponseGetItemsAttributeTypeOk(o.Items) } // HasItems 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 *ListUsersResponse) HasItems() bool { _, ok := o.GetItemsOk() return ok } // SetItems gets a reference to the given []ListUser and assigns it to the Items field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListUsersResponse) SetItems(v ListUsersResponseGetItemsRetType) { setListUsersResponseGetItemsAttributeType(&o.Items, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListUsersResponseGetCountAttributeTypeOk(o.Count); ok { @@ -137,37 +164,45 @@ func (o ListUsersResponse) 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 NullableListUsersResponse struct { value *ListUsersResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListUsersResponse) Get() *ListUsersResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { 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 NullableListUsersResponse) 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 *NullableListUsersResponse) 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 NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { return &NullableListUsersResponse{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 NullableListUsersResponse) 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 *NullableListUsersResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_list_versions_response.go b/services/mongodbflex/model_list_versions_response.go index c75f44db3..d98a14b73 100644 --- a/services/mongodbflex/model_list_versions_response.go +++ b/services/mongodbflex/model_list_versions_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &ListVersionsResponse{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListVersionsResponseGetVersionsAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListVersionsResponseGetVersionsArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListVersionsResponseGetVersionsRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getListVersionsResponseGetVersionsAttributeTypeOk(arg ListVersionsResponseGetVersionsAttributeType) (ret ListVersionsResponseGetVersionsRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getListVersionsResponseGetVersionsAttributeTypeOk(arg ListVersionsResponseG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setListVersionsResponseGetVersionsAttributeType(arg *ListVersionsResponseGetVersionsAttributeType, val ListVersionsResponseGetVersionsRetType) { *arg = &val } // ListVersionsResponse struct for ListVersionsResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ListVersionsResponse struct { Versions ListVersionsResponseGetVersionsAttributeType `json:"versions,omitempty"` } @@ -46,6 +55,7 @@ type ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { this := ListVersionsResponse{} return &this @@ -54,12 +64,14 @@ func NewListVersionsResponse() *ListVersionsResponse { // NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse object // This 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { this := ListVersionsResponse{} return &this } // GetVersions returns the Versions 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 *ListVersionsResponse) GetVersions() (res ListVersionsResponseGetVersionsRetType) { res, _ = o.GetVersionsOk() return @@ -67,21 +79,25 @@ func (o *ListVersionsResponse) GetVersions() (res ListVersionsResponseGetVersion // GetVersionsOk returns a tuple with the Versions 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 *ListVersionsResponse) GetVersionsOk() (ret ListVersionsResponseGetVersionsRetType, ok bool) { return getListVersionsResponseGetVersionsAttributeTypeOk(o.Versions) } // HasVersions 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 *ListVersionsResponse) HasVersions() bool { _, ok := o.GetVersionsOk() return ok } // SetVersions gets a reference to the given []string and assigns it to the Versions field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *ListVersionsResponse) SetVersions(v ListVersionsResponseGetVersionsRetType) { setListVersionsResponseGetVersionsAttributeType(&o.Versions, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getListVersionsResponseGetVersionsAttributeTypeOk(o.Versions); ok { @@ -90,37 +106,45 @@ func (o ListVersionsResponse) 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 NullableListVersionsResponse struct { value *ListVersionsResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableListVersionsResponse) Get() *ListVersionsResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { 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 NullableListVersionsResponse) 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 *NullableListVersionsResponse) 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 NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { return &NullableListVersionsResponse{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 NullableListVersionsResponse) 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 *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_mongodbatlas_operation.go b/services/mongodbflex/model_mongodbatlas_operation.go index 2a378bd9b..800e9249a 100644 --- a/services/mongodbflex/model_mongodbatlas_operation.go +++ b/services/mongodbflex/model_mongodbatlas_operation.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &MongodbatlasOperation{} */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetPredicatesAttributeType = *[]map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetPredicatesArgType = []map[string]interface{} + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetPredicatesRetType = []map[string]interface{} +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationGetPredicatesAttributeTypeOk(arg MongodbatlasOperationGetPredicatesAttributeType) (ret MongodbatlasOperationGetPredicatesRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getMongodbatlasOperationGetPredicatesAttributeTypeOk(arg MongodbatlasOperat return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationGetPredicatesAttributeType(arg *MongodbatlasOperationGetPredicatesAttributeType, val MongodbatlasOperationGetPredicatesRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setMongodbatlasOperationGetPredicatesAttributeType(arg *MongodbatlasOperati */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetRawAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationGetRawAttributeTypeOk(arg MongodbatlasOperationGetRawAttributeType) (ret MongodbatlasOperationGetRawRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getMongodbatlasOperationGetRawAttributeTypeOk(arg MongodbatlasOperationGetR return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationGetRawAttributeType(arg *MongodbatlasOperationGetRawAttributeType, val MongodbatlasOperationGetRawRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetRawArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetRawRetType = string /* @@ -63,10 +77,16 @@ type MongodbatlasOperationGetRawRetType = string */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetStatsAttributeType = *MongodbatlasOperationStats + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetStatsArgType = MongodbatlasOperationStats + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationGetStatsRetType = MongodbatlasOperationStats +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationGetStatsAttributeTypeOk(arg MongodbatlasOperationGetStatsAttributeType) (ret MongodbatlasOperationGetStatsRetType, ok bool) { if arg == nil { return ret, false @@ -74,11 +94,13 @@ func getMongodbatlasOperationGetStatsAttributeTypeOk(arg MongodbatlasOperationGe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationGetStatsAttributeType(arg *MongodbatlasOperationGetStatsAttributeType, val MongodbatlasOperationGetStatsRetType) { *arg = &val } // MongodbatlasOperation struct for MongodbatlasOperation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperation struct { // Documents containing the search criteria used by the query. Predicates MongodbatlasOperationGetPredicatesAttributeType `json:"predicates,omitempty"` @@ -91,6 +113,7 @@ type MongodbatlasOperation 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 NewMongodbatlasOperation() *MongodbatlasOperation { this := MongodbatlasOperation{} return &this @@ -99,12 +122,14 @@ func NewMongodbatlasOperation() *MongodbatlasOperation { // NewMongodbatlasOperationWithDefaults instantiates a new MongodbatlasOperation object // This 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 NewMongodbatlasOperationWithDefaults() *MongodbatlasOperation { this := MongodbatlasOperation{} return &this } // GetPredicates returns the Predicates 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 *MongodbatlasOperation) GetPredicates() (res MongodbatlasOperationGetPredicatesRetType) { res, _ = o.GetPredicatesOk() return @@ -112,22 +137,26 @@ func (o *MongodbatlasOperation) GetPredicates() (res MongodbatlasOperationGetPre // GetPredicatesOk returns a tuple with the Predicates 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 *MongodbatlasOperation) GetPredicatesOk() (ret MongodbatlasOperationGetPredicatesRetType, ok bool) { return getMongodbatlasOperationGetPredicatesAttributeTypeOk(o.Predicates) } // HasPredicates 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 *MongodbatlasOperation) HasPredicates() bool { _, ok := o.GetPredicatesOk() return ok } // SetPredicates gets a reference to the given []map[string]interface{} and assigns it to the Predicates field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperation) SetPredicates(v MongodbatlasOperationGetPredicatesRetType) { setMongodbatlasOperationGetPredicatesAttributeType(&o.Predicates, v) } // GetRaw returns the Raw 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 *MongodbatlasOperation) GetRaw() (res MongodbatlasOperationGetRawRetType) { res, _ = o.GetRawOk() return @@ -135,22 +164,26 @@ func (o *MongodbatlasOperation) GetRaw() (res MongodbatlasOperationGetRawRetType // GetRawOk returns a tuple with the Raw 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 *MongodbatlasOperation) GetRawOk() (ret MongodbatlasOperationGetRawRetType, ok bool) { return getMongodbatlasOperationGetRawAttributeTypeOk(o.Raw) } // HasRaw 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 *MongodbatlasOperation) HasRaw() bool { _, ok := o.GetRawOk() return ok } // SetRaw gets a reference to the given string and assigns it to the Raw field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperation) SetRaw(v MongodbatlasOperationGetRawRetType) { setMongodbatlasOperationGetRawAttributeType(&o.Raw, v) } // GetStats returns the Stats 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 *MongodbatlasOperation) GetStats() (res MongodbatlasOperationGetStatsRetType) { res, _ = o.GetStatsOk() return @@ -158,21 +191,25 @@ func (o *MongodbatlasOperation) GetStats() (res MongodbatlasOperationGetStatsRet // GetStatsOk returns a tuple with the Stats 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 *MongodbatlasOperation) GetStatsOk() (ret MongodbatlasOperationGetStatsRetType, ok bool) { return getMongodbatlasOperationGetStatsAttributeTypeOk(o.Stats) } // HasStats 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 *MongodbatlasOperation) HasStats() bool { _, ok := o.GetStatsOk() return ok } // SetStats gets a reference to the given MongodbatlasOperationStats and assigns it to the Stats field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperation) SetStats(v MongodbatlasOperationGetStatsRetType) { setMongodbatlasOperationGetStatsAttributeType(&o.Stats, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MongodbatlasOperation) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMongodbatlasOperationGetPredicatesAttributeTypeOk(o.Predicates); ok { @@ -187,37 +224,45 @@ func (o MongodbatlasOperation) 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 NullableMongodbatlasOperation struct { value *MongodbatlasOperation isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMongodbatlasOperation) Get() *MongodbatlasOperation { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMongodbatlasOperation) Set(val *MongodbatlasOperation) { 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 NullableMongodbatlasOperation) 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 *NullableMongodbatlasOperation) 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 NewNullableMongodbatlasOperation(val *MongodbatlasOperation) *NullableMongodbatlasOperation { return &NullableMongodbatlasOperation{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 NullableMongodbatlasOperation) 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 *NullableMongodbatlasOperation) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_mongodbatlas_operation_stats.go b/services/mongodbflex/model_mongodbatlas_operation_stats.go index 756da2dfd..386376001 100644 --- a/services/mongodbflex/model_mongodbatlas_operation_stats.go +++ b/services/mongodbflex/model_mongodbatlas_operation_stats.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &MongodbatlasOperationStats{} */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetMsAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetMsArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetMsRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationStatsGetMsAttributeTypeOk(arg MongodbatlasOperationStatsGetMsAttributeType) (ret MongodbatlasOperationStatsGetMsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getMongodbatlasOperationStatsGetMsAttributeTypeOk(arg MongodbatlasOperation return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationStatsGetMsAttributeType(arg *MongodbatlasOperationStatsGetMsAttributeType, val MongodbatlasOperationStatsGetMsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setMongodbatlasOperationStatsGetMsAttributeType(arg *MongodbatlasOperationS */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetNReturnedAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetNReturnedArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetNReturnedRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationStatsGetNReturnedAttributeTypeOk(arg MongodbatlasOperationStatsGetNReturnedAttributeType) (ret MongodbatlasOperationStatsGetNReturnedRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getMongodbatlasOperationStatsGetNReturnedAttributeTypeOk(arg MongodbatlasOp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationStatsGetNReturnedAttributeType(arg *MongodbatlasOperationStatsGetNReturnedAttributeType, val MongodbatlasOperationStatsGetNReturnedRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setMongodbatlasOperationStatsGetNReturnedAttributeType(arg *MongodbatlasOpe */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetNScannedAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetNScannedArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetNScannedRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationStatsGetNScannedAttributeTypeOk(arg MongodbatlasOperationStatsGetNScannedAttributeType) (ret MongodbatlasOperationStatsGetNScannedRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getMongodbatlasOperationStatsGetNScannedAttributeTypeOk(arg MongodbatlasOpe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationStatsGetNScannedAttributeType(arg *MongodbatlasOperationStatsGetNScannedAttributeType, val MongodbatlasOperationStatsGetNScannedRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setMongodbatlasOperationStatsGetNScannedAttributeType(arg *MongodbatlasOper */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetTsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetTsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStatsGetTsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasOperationStatsGetTsAttributeTypeOk(arg MongodbatlasOperationStatsGetTsAttributeType) (ret MongodbatlasOperationStatsGetTsRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +121,13 @@ func getMongodbatlasOperationStatsGetTsAttributeTypeOk(arg MongodbatlasOperation return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasOperationStatsGetTsAttributeType(arg *MongodbatlasOperationStatsGetTsAttributeType, val MongodbatlasOperationStatsGetTsRetType) { *arg = &val } // MongodbatlasOperationStats Query statistics. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasOperationStats struct { // Duration in milliseconds of the query. Ms MongodbatlasOperationStatsGetMsAttributeType `json:"ms,omitempty"` @@ -113,6 +143,7 @@ type MongodbatlasOperationStats 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 NewMongodbatlasOperationStats() *MongodbatlasOperationStats { this := MongodbatlasOperationStats{} return &this @@ -121,12 +152,14 @@ func NewMongodbatlasOperationStats() *MongodbatlasOperationStats { // NewMongodbatlasOperationStatsWithDefaults instantiates a new MongodbatlasOperationStats object // This 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 NewMongodbatlasOperationStatsWithDefaults() *MongodbatlasOperationStats { this := MongodbatlasOperationStats{} return &this } // GetMs returns the Ms 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 *MongodbatlasOperationStats) GetMs() (res MongodbatlasOperationStatsGetMsRetType) { res, _ = o.GetMsOk() return @@ -134,22 +167,26 @@ func (o *MongodbatlasOperationStats) GetMs() (res MongodbatlasOperationStatsGetM // GetMsOk returns a tuple with the Ms 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 *MongodbatlasOperationStats) GetMsOk() (ret MongodbatlasOperationStatsGetMsRetType, ok bool) { return getMongodbatlasOperationStatsGetMsAttributeTypeOk(o.Ms) } // HasMs 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 *MongodbatlasOperationStats) HasMs() bool { _, ok := o.GetMsOk() return ok } // SetMs gets a reference to the given float64 and assigns it to the Ms field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperationStats) SetMs(v MongodbatlasOperationStatsGetMsRetType) { setMongodbatlasOperationStatsGetMsAttributeType(&o.Ms, v) } // GetNReturned returns the NReturned 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 *MongodbatlasOperationStats) GetNReturned() (res MongodbatlasOperationStatsGetNReturnedRetType) { res, _ = o.GetNReturnedOk() return @@ -157,22 +194,26 @@ func (o *MongodbatlasOperationStats) GetNReturned() (res MongodbatlasOperationSt // GetNReturnedOk returns a tuple with the NReturned 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 *MongodbatlasOperationStats) GetNReturnedOk() (ret MongodbatlasOperationStatsGetNReturnedRetType, ok bool) { return getMongodbatlasOperationStatsGetNReturnedAttributeTypeOk(o.NReturned) } // HasNReturned 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 *MongodbatlasOperationStats) HasNReturned() bool { _, ok := o.GetNReturnedOk() return ok } // SetNReturned gets a reference to the given int64 and assigns it to the NReturned field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperationStats) SetNReturned(v MongodbatlasOperationStatsGetNReturnedRetType) { setMongodbatlasOperationStatsGetNReturnedAttributeType(&o.NReturned, v) } // GetNScanned returns the NScanned 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 *MongodbatlasOperationStats) GetNScanned() (res MongodbatlasOperationStatsGetNScannedRetType) { res, _ = o.GetNScannedOk() return @@ -180,22 +221,26 @@ func (o *MongodbatlasOperationStats) GetNScanned() (res MongodbatlasOperationSta // GetNScannedOk returns a tuple with the NScanned 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 *MongodbatlasOperationStats) GetNScannedOk() (ret MongodbatlasOperationStatsGetNScannedRetType, ok bool) { return getMongodbatlasOperationStatsGetNScannedAttributeTypeOk(o.NScanned) } // HasNScanned 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 *MongodbatlasOperationStats) HasNScanned() bool { _, ok := o.GetNScannedOk() return ok } // SetNScanned gets a reference to the given int64 and assigns it to the NScanned field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperationStats) SetNScanned(v MongodbatlasOperationStatsGetNScannedRetType) { setMongodbatlasOperationStatsGetNScannedAttributeType(&o.NScanned, v) } // GetTs returns the Ts 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 *MongodbatlasOperationStats) GetTs() (res MongodbatlasOperationStatsGetTsRetType) { res, _ = o.GetTsOk() return @@ -203,21 +248,25 @@ func (o *MongodbatlasOperationStats) GetTs() (res MongodbatlasOperationStatsGetT // GetTsOk returns a tuple with the Ts 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 *MongodbatlasOperationStats) GetTsOk() (ret MongodbatlasOperationStatsGetTsRetType, ok bool) { return getMongodbatlasOperationStatsGetTsAttributeTypeOk(o.Ts) } // HasTs 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 *MongodbatlasOperationStats) HasTs() bool { _, ok := o.GetTsOk() return ok } // SetTs gets a reference to the given int64 and assigns it to the Ts field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasOperationStats) SetTs(v MongodbatlasOperationStatsGetTsRetType) { setMongodbatlasOperationStatsGetTsAttributeType(&o.Ts, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MongodbatlasOperationStats) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMongodbatlasOperationStatsGetMsAttributeTypeOk(o.Ms); ok { @@ -235,37 +284,45 @@ func (o MongodbatlasOperationStats) 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 NullableMongodbatlasOperationStats struct { value *MongodbatlasOperationStats isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMongodbatlasOperationStats) Get() *MongodbatlasOperationStats { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMongodbatlasOperationStats) Set(val *MongodbatlasOperationStats) { 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 NullableMongodbatlasOperationStats) 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 *NullableMongodbatlasOperationStats) 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 NewNullableMongodbatlasOperationStats(val *MongodbatlasOperationStats) *NullableMongodbatlasOperationStats { return &NullableMongodbatlasOperationStats{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 NullableMongodbatlasOperationStats) 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 *NullableMongodbatlasOperationStats) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_mongodbatlas_stats.go b/services/mongodbflex/model_mongodbatlas_stats.go index e038c111b..ce6319022 100644 --- a/services/mongodbflex/model_mongodbatlas_stats.go +++ b/services/mongodbflex/model_mongodbatlas_stats.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &MongodbatlasStats{} */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetMsAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetMsArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetMsRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasStatsGetMsAttributeTypeOk(arg MongodbatlasStatsGetMsAttributeType) (ret MongodbatlasStatsGetMsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getMongodbatlasStatsGetMsAttributeTypeOk(arg MongodbatlasStatsGetMsAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasStatsGetMsAttributeType(arg *MongodbatlasStatsGetMsAttributeType, val MongodbatlasStatsGetMsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setMongodbatlasStatsGetMsAttributeType(arg *MongodbatlasStatsGetMsAttribute */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetNReturnedAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetNReturnedArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetNReturnedRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasStatsGetNReturnedAttributeTypeOk(arg MongodbatlasStatsGetNReturnedAttributeType) (ret MongodbatlasStatsGetNReturnedRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getMongodbatlasStatsGetNReturnedAttributeTypeOk(arg MongodbatlasStatsGetNRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasStatsGetNReturnedAttributeType(arg *MongodbatlasStatsGetNReturnedAttributeType, val MongodbatlasStatsGetNReturnedRetType) { *arg = &val } @@ -62,10 +77,16 @@ func setMongodbatlasStatsGetNReturnedAttributeType(arg *MongodbatlasStatsGetNRet */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetNScannedAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetNScannedArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetNScannedRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasStatsGetNScannedAttributeTypeOk(arg MongodbatlasStatsGetNScannedAttributeType) (ret MongodbatlasStatsGetNScannedRetType, ok bool) { if arg == nil { return ret, false @@ -73,6 +94,7 @@ func getMongodbatlasStatsGetNScannedAttributeTypeOk(arg MongodbatlasStatsGetNSca return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasStatsGetNScannedAttributeType(arg *MongodbatlasStatsGetNScannedAttributeType, val MongodbatlasStatsGetNScannedRetType) { *arg = &val } @@ -82,10 +104,16 @@ func setMongodbatlasStatsGetNScannedAttributeType(arg *MongodbatlasStatsGetNScan */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetTsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetTsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStatsGetTsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getMongodbatlasStatsGetTsAttributeTypeOk(arg MongodbatlasStatsGetTsAttributeType) (ret MongodbatlasStatsGetTsRetType, ok bool) { if arg == nil { return ret, false @@ -93,11 +121,13 @@ func getMongodbatlasStatsGetTsAttributeTypeOk(arg MongodbatlasStatsGetTsAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setMongodbatlasStatsGetTsAttributeType(arg *MongodbatlasStatsGetTsAttributeType, val MongodbatlasStatsGetTsRetType) { *arg = &val } // MongodbatlasStats struct for MongodbatlasStats +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type MongodbatlasStats struct { // Duration in milliseconds of the query. Ms MongodbatlasStatsGetMsAttributeType `json:"ms,omitempty"` @@ -113,6 +143,7 @@ type MongodbatlasStats 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 NewMongodbatlasStats() *MongodbatlasStats { this := MongodbatlasStats{} return &this @@ -121,12 +152,14 @@ func NewMongodbatlasStats() *MongodbatlasStats { // NewMongodbatlasStatsWithDefaults instantiates a new MongodbatlasStats object // This 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 NewMongodbatlasStatsWithDefaults() *MongodbatlasStats { this := MongodbatlasStats{} return &this } // GetMs returns the Ms 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 *MongodbatlasStats) GetMs() (res MongodbatlasStatsGetMsRetType) { res, _ = o.GetMsOk() return @@ -134,22 +167,26 @@ func (o *MongodbatlasStats) GetMs() (res MongodbatlasStatsGetMsRetType) { // GetMsOk returns a tuple with the Ms 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 *MongodbatlasStats) GetMsOk() (ret MongodbatlasStatsGetMsRetType, ok bool) { return getMongodbatlasStatsGetMsAttributeTypeOk(o.Ms) } // HasMs 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 *MongodbatlasStats) HasMs() bool { _, ok := o.GetMsOk() return ok } // SetMs gets a reference to the given float64 and assigns it to the Ms field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasStats) SetMs(v MongodbatlasStatsGetMsRetType) { setMongodbatlasStatsGetMsAttributeType(&o.Ms, v) } // GetNReturned returns the NReturned 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 *MongodbatlasStats) GetNReturned() (res MongodbatlasStatsGetNReturnedRetType) { res, _ = o.GetNReturnedOk() return @@ -157,22 +194,26 @@ func (o *MongodbatlasStats) GetNReturned() (res MongodbatlasStatsGetNReturnedRet // GetNReturnedOk returns a tuple with the NReturned 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 *MongodbatlasStats) GetNReturnedOk() (ret MongodbatlasStatsGetNReturnedRetType, ok bool) { return getMongodbatlasStatsGetNReturnedAttributeTypeOk(o.NReturned) } // HasNReturned 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 *MongodbatlasStats) HasNReturned() bool { _, ok := o.GetNReturnedOk() return ok } // SetNReturned gets a reference to the given int64 and assigns it to the NReturned field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasStats) SetNReturned(v MongodbatlasStatsGetNReturnedRetType) { setMongodbatlasStatsGetNReturnedAttributeType(&o.NReturned, v) } // GetNScanned returns the NScanned 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 *MongodbatlasStats) GetNScanned() (res MongodbatlasStatsGetNScannedRetType) { res, _ = o.GetNScannedOk() return @@ -180,22 +221,26 @@ func (o *MongodbatlasStats) GetNScanned() (res MongodbatlasStatsGetNScannedRetTy // GetNScannedOk returns a tuple with the NScanned 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 *MongodbatlasStats) GetNScannedOk() (ret MongodbatlasStatsGetNScannedRetType, ok bool) { return getMongodbatlasStatsGetNScannedAttributeTypeOk(o.NScanned) } // HasNScanned 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 *MongodbatlasStats) HasNScanned() bool { _, ok := o.GetNScannedOk() return ok } // SetNScanned gets a reference to the given int64 and assigns it to the NScanned field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasStats) SetNScanned(v MongodbatlasStatsGetNScannedRetType) { setMongodbatlasStatsGetNScannedAttributeType(&o.NScanned, v) } // GetTs returns the Ts 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 *MongodbatlasStats) GetTs() (res MongodbatlasStatsGetTsRetType) { res, _ = o.GetTsOk() return @@ -203,21 +248,25 @@ func (o *MongodbatlasStats) GetTs() (res MongodbatlasStatsGetTsRetType) { // GetTsOk returns a tuple with the Ts 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 *MongodbatlasStats) GetTsOk() (ret MongodbatlasStatsGetTsRetType, ok bool) { return getMongodbatlasStatsGetTsAttributeTypeOk(o.Ts) } // HasTs 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 *MongodbatlasStats) HasTs() bool { _, ok := o.GetTsOk() return ok } // SetTs gets a reference to the given int64 and assigns it to the Ts field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *MongodbatlasStats) SetTs(v MongodbatlasStatsGetTsRetType) { setMongodbatlasStatsGetTsAttributeType(&o.Ts, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o MongodbatlasStats) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getMongodbatlasStatsGetMsAttributeTypeOk(o.Ms); ok { @@ -235,37 +284,45 @@ func (o MongodbatlasStats) 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 NullableMongodbatlasStats struct { value *MongodbatlasStats isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableMongodbatlasStats) Get() *MongodbatlasStats { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableMongodbatlasStats) Set(val *MongodbatlasStats) { 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 NullableMongodbatlasStats) 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 *NullableMongodbatlasStats) 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 NewNullableMongodbatlasStats(val *MongodbatlasStats) *NullableMongodbatlasStats { return &NullableMongodbatlasStats{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 NullableMongodbatlasStats) 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 *NullableMongodbatlasStats) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_partial_update_instance_payload.go b/services/mongodbflex/model_partial_update_instance_payload.go index 70219e857..8d58f6e85 100644 --- a/services/mongodbflex/model_partial_update_instance_payload.go +++ b/services/mongodbflex/model_partial_update_instance_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &PartialUpdateInstancePayload{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetAclAttributeType = *ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetAclArgType = ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetAclRetType = ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetAclAttributeTypeOk(arg PartialUpdateInstancePayloadGetAclAttributeType) (ret PartialUpdateInstancePayloadGetAclRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getPartialUpdateInstancePayloadGetAclAttributeTypeOk(arg PartialUpdateInsta return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetAclAttributeType(arg *PartialUpdateInstancePayloadGetAclAttributeType, val PartialUpdateInstancePayloadGetAclRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setPartialUpdateInstancePayloadGetAclAttributeType(arg *PartialUpdateInstan */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetBackupScheduleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(arg PartialUpdateInstancePayloadGetBackupScheduleAttributeType) (ret PartialUpdateInstancePayloadGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getPartialUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(arg Partial return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetBackupScheduleAttributeType(arg *PartialUpdateInstancePayloadGetBackupScheduleAttributeType, val PartialUpdateInstancePayloadGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetBackupScheduleRetType = string /* @@ -63,8 +77,10 @@ type PartialUpdateInstancePayloadGetBackupScheduleRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetFlavorIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetFlavorIdAttributeTypeOk(arg PartialUpdateInstancePayloadGetFlavorIdAttributeType) (ret PartialUpdateInstancePayloadGetFlavorIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +88,15 @@ func getPartialUpdateInstancePayloadGetFlavorIdAttributeTypeOk(arg PartialUpdate return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetFlavorIdAttributeType(arg *PartialUpdateInstancePayloadGetFlavorIdAttributeType, val PartialUpdateInstancePayloadGetFlavorIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetFlavorIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetFlavorIdRetType = string /* @@ -84,10 +104,16 @@ type PartialUpdateInstancePayloadGetFlavorIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetLabelsAttributeTypeOk(arg PartialUpdateInstancePayloadGetLabelsAttributeType) (ret PartialUpdateInstancePayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +121,7 @@ func getPartialUpdateInstancePayloadGetLabelsAttributeTypeOk(arg PartialUpdateIn return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetLabelsAttributeType(arg *PartialUpdateInstancePayloadGetLabelsAttributeType, val PartialUpdateInstancePayloadGetLabelsRetType) { *arg = &val } @@ -104,8 +131,10 @@ func setPartialUpdateInstancePayloadGetLabelsAttributeType(arg *PartialUpdateIns */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetNameAttributeTypeOk(arg PartialUpdateInstancePayloadGetNameAttributeType) (ret PartialUpdateInstancePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +142,15 @@ func getPartialUpdateInstancePayloadGetNameAttributeTypeOk(arg PartialUpdateInst return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetNameAttributeType(arg *PartialUpdateInstancePayloadGetNameAttributeType, val PartialUpdateInstancePayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetNameRetType = string /* @@ -125,10 +158,16 @@ type PartialUpdateInstancePayloadGetNameRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetOptionsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetOptionsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetOptionsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetOptionsAttributeTypeOk(arg PartialUpdateInstancePayloadGetOptionsAttributeType) (ret PartialUpdateInstancePayloadGetOptionsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +175,7 @@ func getPartialUpdateInstancePayloadGetOptionsAttributeTypeOk(arg PartialUpdateI return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetOptionsAttributeType(arg *PartialUpdateInstancePayloadGetOptionsAttributeType, val PartialUpdateInstancePayloadGetOptionsRetType) { *arg = &val } @@ -145,10 +185,16 @@ func setPartialUpdateInstancePayloadGetOptionsAttributeType(arg *PartialUpdateIn */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetReplicasAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetReplicasArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetReplicasRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetReplicasAttributeTypeOk(arg PartialUpdateInstancePayloadGetReplicasAttributeType) (ret PartialUpdateInstancePayloadGetReplicasRetType, ok bool) { if arg == nil { return ret, false @@ -156,6 +202,7 @@ func getPartialUpdateInstancePayloadGetReplicasAttributeTypeOk(arg PartialUpdate return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetReplicasAttributeType(arg *PartialUpdateInstancePayloadGetReplicasAttributeType, val PartialUpdateInstancePayloadGetReplicasRetType) { *arg = &val } @@ -165,10 +212,16 @@ func setPartialUpdateInstancePayloadGetReplicasAttributeType(arg *PartialUpdateI */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetStorageAttributeType = *Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetStorageArgType = Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetStorageRetType = Storage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(arg PartialUpdateInstancePayloadGetStorageAttributeType) (ret PartialUpdateInstancePayloadGetStorageRetType, ok bool) { if arg == nil { return ret, false @@ -176,6 +229,7 @@ func getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(arg PartialUpdateI return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetStorageAttributeType(arg *PartialUpdateInstancePayloadGetStorageAttributeType, val PartialUpdateInstancePayloadGetStorageRetType) { *arg = &val } @@ -185,8 +239,10 @@ func setPartialUpdateInstancePayloadGetStorageAttributeType(arg *PartialUpdateIn */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(arg PartialUpdateInstancePayloadGetVersionAttributeType) (ret PartialUpdateInstancePayloadGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -194,14 +250,19 @@ func getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(arg PartialUpdateI return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateInstancePayloadGetVersionAttributeType(arg *PartialUpdateInstancePayloadGetVersionAttributeType, val PartialUpdateInstancePayloadGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayloadGetVersionRetType = string // PartialUpdateInstancePayload struct for PartialUpdateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateInstancePayload struct { Acl PartialUpdateInstancePayloadGetAclAttributeType `json:"acl,omitempty"` BackupSchedule PartialUpdateInstancePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` @@ -220,6 +281,7 @@ type PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { this := PartialUpdateInstancePayload{} return &this @@ -228,12 +290,14 @@ func NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { // NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload object // This 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { this := PartialUpdateInstancePayload{} return &this } // GetAcl returns the Acl 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 *PartialUpdateInstancePayload) GetAcl() (res PartialUpdateInstancePayloadGetAclRetType) { res, _ = o.GetAclOk() return @@ -241,22 +305,26 @@ func (o *PartialUpdateInstancePayload) GetAcl() (res PartialUpdateInstancePayloa // GetAclOk returns a tuple with the Acl 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 *PartialUpdateInstancePayload) GetAclOk() (ret PartialUpdateInstancePayloadGetAclRetType, ok bool) { return getPartialUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl) } // HasAcl 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 *PartialUpdateInstancePayload) HasAcl() bool { _, ok := o.GetAclOk() return ok } // SetAcl gets a reference to the given ACL and assigns it to the Acl field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetAcl(v PartialUpdateInstancePayloadGetAclRetType) { setPartialUpdateInstancePayloadGetAclAttributeType(&o.Acl, v) } // GetBackupSchedule returns the BackupSchedule 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 *PartialUpdateInstancePayload) GetBackupSchedule() (res PartialUpdateInstancePayloadGetBackupScheduleRetType) { res, _ = o.GetBackupScheduleOk() return @@ -264,22 +332,26 @@ func (o *PartialUpdateInstancePayload) GetBackupSchedule() (res PartialUpdateIns // GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *PartialUpdateInstancePayload) GetBackupScheduleOk() (ret PartialUpdateInstancePayloadGetBackupScheduleRetType, ok bool) { return getPartialUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // HasBackupSchedule 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 *PartialUpdateInstancePayload) HasBackupSchedule() bool { _, ok := o.GetBackupScheduleOk() return ok } // SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetBackupSchedule(v PartialUpdateInstancePayloadGetBackupScheduleRetType) { setPartialUpdateInstancePayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetFlavorId returns the FlavorId 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 *PartialUpdateInstancePayload) GetFlavorId() (res PartialUpdateInstancePayloadGetFlavorIdRetType) { res, _ = o.GetFlavorIdOk() return @@ -287,22 +359,26 @@ func (o *PartialUpdateInstancePayload) GetFlavorId() (res PartialUpdateInstanceP // GetFlavorIdOk returns a tuple with the FlavorId 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 *PartialUpdateInstancePayload) GetFlavorIdOk() (ret PartialUpdateInstancePayloadGetFlavorIdRetType, ok bool) { return getPartialUpdateInstancePayloadGetFlavorIdAttributeTypeOk(o.FlavorId) } // HasFlavorId 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 *PartialUpdateInstancePayload) HasFlavorId() bool { _, ok := o.GetFlavorIdOk() return ok } // SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetFlavorId(v PartialUpdateInstancePayloadGetFlavorIdRetType) { setPartialUpdateInstancePayloadGetFlavorIdAttributeType(&o.FlavorId, 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 *PartialUpdateInstancePayload) GetLabels() (res PartialUpdateInstancePayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -310,22 +386,26 @@ func (o *PartialUpdateInstancePayload) GetLabels() (res PartialUpdateInstancePay // 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 *PartialUpdateInstancePayload) GetLabelsOk() (ret PartialUpdateInstancePayloadGetLabelsRetType, ok bool) { return getPartialUpdateInstancePayloadGetLabelsAttributeTypeOk(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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetLabels(v PartialUpdateInstancePayloadGetLabelsRetType) { setPartialUpdateInstancePayloadGetLabelsAttributeType(&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 *PartialUpdateInstancePayload) GetName() (res PartialUpdateInstancePayloadGetNameRetType) { res, _ = o.GetNameOk() return @@ -333,22 +413,26 @@ func (o *PartialUpdateInstancePayload) GetName() (res PartialUpdateInstancePaylo // 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 *PartialUpdateInstancePayload) GetNameOk() (ret PartialUpdateInstancePayloadGetNameRetType, ok bool) { return getPartialUpdateInstancePayloadGetNameAttributeTypeOk(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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetName(v PartialUpdateInstancePayloadGetNameRetType) { setPartialUpdateInstancePayloadGetNameAttributeType(&o.Name, v) } // GetOptions returns the Options 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 *PartialUpdateInstancePayload) GetOptions() (res PartialUpdateInstancePayloadGetOptionsRetType) { res, _ = o.GetOptionsOk() return @@ -356,22 +440,26 @@ func (o *PartialUpdateInstancePayload) GetOptions() (res PartialUpdateInstancePa // GetOptionsOk returns a tuple with the Options 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 *PartialUpdateInstancePayload) GetOptionsOk() (ret PartialUpdateInstancePayloadGetOptionsRetType, ok bool) { return getPartialUpdateInstancePayloadGetOptionsAttributeTypeOk(o.Options) } // HasOptions 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 *PartialUpdateInstancePayload) HasOptions() bool { _, ok := o.GetOptionsOk() return ok } // SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetOptions(v PartialUpdateInstancePayloadGetOptionsRetType) { setPartialUpdateInstancePayloadGetOptionsAttributeType(&o.Options, v) } // GetReplicas returns the Replicas 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 *PartialUpdateInstancePayload) GetReplicas() (res PartialUpdateInstancePayloadGetReplicasRetType) { res, _ = o.GetReplicasOk() return @@ -379,22 +467,26 @@ func (o *PartialUpdateInstancePayload) GetReplicas() (res PartialUpdateInstanceP // GetReplicasOk returns a tuple with the Replicas 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 *PartialUpdateInstancePayload) GetReplicasOk() (ret PartialUpdateInstancePayloadGetReplicasRetType, ok bool) { return getPartialUpdateInstancePayloadGetReplicasAttributeTypeOk(o.Replicas) } // HasReplicas 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 *PartialUpdateInstancePayload) HasReplicas() bool { _, ok := o.GetReplicasOk() return ok } // SetReplicas gets a reference to the given int64 and assigns it to the Replicas field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetReplicas(v PartialUpdateInstancePayloadGetReplicasRetType) { setPartialUpdateInstancePayloadGetReplicasAttributeType(&o.Replicas, v) } // GetStorage returns the Storage 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 *PartialUpdateInstancePayload) GetStorage() (res PartialUpdateInstancePayloadGetStorageRetType) { res, _ = o.GetStorageOk() return @@ -402,22 +494,26 @@ func (o *PartialUpdateInstancePayload) GetStorage() (res PartialUpdateInstancePa // GetStorageOk returns a tuple with the Storage 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 *PartialUpdateInstancePayload) GetStorageOk() (ret PartialUpdateInstancePayloadGetStorageRetType, ok bool) { return getPartialUpdateInstancePayloadGetStorageAttributeTypeOk(o.Storage) } // HasStorage 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 *PartialUpdateInstancePayload) HasStorage() bool { _, ok := o.GetStorageOk() return ok } // SetStorage gets a reference to the given Storage and assigns it to the Storage field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetStorage(v PartialUpdateInstancePayloadGetStorageRetType) { setPartialUpdateInstancePayloadGetStorageAttributeType(&o.Storage, v) } // GetVersion returns the Version 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 *PartialUpdateInstancePayload) GetVersion() (res PartialUpdateInstancePayloadGetVersionRetType) { res, _ = o.GetVersionOk() return @@ -425,21 +521,25 @@ func (o *PartialUpdateInstancePayload) GetVersion() (res PartialUpdateInstancePa // GetVersionOk returns a tuple with the Version 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 *PartialUpdateInstancePayload) GetVersionOk() (ret PartialUpdateInstancePayloadGetVersionRetType, ok bool) { return getPartialUpdateInstancePayloadGetVersionAttributeTypeOk(o.Version) } // HasVersion 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 *PartialUpdateInstancePayload) HasVersion() bool { _, ok := o.GetVersionOk() return ok } // SetVersion gets a reference to the given string and assigns it to the Version field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateInstancePayload) SetVersion(v PartialUpdateInstancePayloadGetVersionRetType) { setPartialUpdateInstancePayloadGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPartialUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { @@ -472,37 +572,45 @@ func (o PartialUpdateInstancePayload) 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 NullablePartialUpdateInstancePayload struct { value *PartialUpdateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { 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 NullablePartialUpdateInstancePayload) 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 *NullablePartialUpdateInstancePayload) 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 NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { return &NullablePartialUpdateInstancePayload{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 NullablePartialUpdateInstancePayload) 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 *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_partial_update_user_payload.go b/services/mongodbflex/model_partial_update_user_payload.go index 99eaa9765..1fcb86c6d 100644 --- a/services/mongodbflex/model_partial_update_user_payload.go +++ b/services/mongodbflex/model_partial_update_user_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &PartialUpdateUserPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayloadGetDatabaseAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateUserPayloadGetDatabaseAttributeTypeOk(arg PartialUpdateUserPayloadGetDatabaseAttributeType) (ret PartialUpdateUserPayloadGetDatabaseRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getPartialUpdateUserPayloadGetDatabaseAttributeTypeOk(arg PartialUpdateUser return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateUserPayloadGetDatabaseAttributeType(arg *PartialUpdateUserPayloadGetDatabaseAttributeType, val PartialUpdateUserPayloadGetDatabaseRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayloadGetDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayloadGetDatabaseRetType = string /* @@ -43,10 +50,16 @@ type PartialUpdateUserPayloadGetDatabaseRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayloadGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayloadGetRolesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayloadGetRolesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getPartialUpdateUserPayloadGetRolesAttributeTypeOk(arg PartialUpdateUserPayloadGetRolesAttributeType) (ret PartialUpdateUserPayloadGetRolesRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getPartialUpdateUserPayloadGetRolesAttributeTypeOk(arg PartialUpdateUserPay return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setPartialUpdateUserPayloadGetRolesAttributeType(arg *PartialUpdateUserPayloadGetRolesAttributeType, val PartialUpdateUserPayloadGetRolesRetType) { *arg = &val } // PartialUpdateUserPayload struct for PartialUpdateUserPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type PartialUpdateUserPayload struct { Database PartialUpdateUserPayloadGetDatabaseAttributeType `json:"database,omitempty"` // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** @@ -69,6 +84,7 @@ type PartialUpdateUserPayload 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 NewPartialUpdateUserPayload() *PartialUpdateUserPayload { this := PartialUpdateUserPayload{} return &this @@ -77,12 +93,14 @@ func NewPartialUpdateUserPayload() *PartialUpdateUserPayload { // NewPartialUpdateUserPayloadWithDefaults instantiates a new PartialUpdateUserPayload object // This 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 NewPartialUpdateUserPayloadWithDefaults() *PartialUpdateUserPayload { this := PartialUpdateUserPayload{} return &this } // GetDatabase returns the Database 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 *PartialUpdateUserPayload) GetDatabase() (res PartialUpdateUserPayloadGetDatabaseRetType) { res, _ = o.GetDatabaseOk() return @@ -90,22 +108,26 @@ func (o *PartialUpdateUserPayload) GetDatabase() (res PartialUpdateUserPayloadGe // GetDatabaseOk returns a tuple with the Database 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 *PartialUpdateUserPayload) GetDatabaseOk() (ret PartialUpdateUserPayloadGetDatabaseRetType, ok bool) { return getPartialUpdateUserPayloadGetDatabaseAttributeTypeOk(o.Database) } // HasDatabase 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 *PartialUpdateUserPayload) HasDatabase() bool { _, ok := o.GetDatabaseOk() return ok } // SetDatabase gets a reference to the given string and assigns it to the Database field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateUserPayload) SetDatabase(v PartialUpdateUserPayloadGetDatabaseRetType) { setPartialUpdateUserPayloadGetDatabaseAttributeType(&o.Database, v) } // GetRoles returns the Roles 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 *PartialUpdateUserPayload) GetRoles() (res PartialUpdateUserPayloadGetRolesRetType) { res, _ = o.GetRolesOk() return @@ -113,21 +135,25 @@ func (o *PartialUpdateUserPayload) GetRoles() (res PartialUpdateUserPayloadGetRo // GetRolesOk returns a tuple with the Roles 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 *PartialUpdateUserPayload) GetRolesOk() (ret PartialUpdateUserPayloadGetRolesRetType, ok bool) { return getPartialUpdateUserPayloadGetRolesAttributeTypeOk(o.Roles) } // HasRoles 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 *PartialUpdateUserPayload) HasRoles() bool { _, ok := o.GetRolesOk() return ok } // SetRoles gets a reference to the given []string and assigns it to the Roles field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *PartialUpdateUserPayload) SetRoles(v PartialUpdateUserPayloadGetRolesRetType) { setPartialUpdateUserPayloadGetRolesAttributeType(&o.Roles, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o PartialUpdateUserPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getPartialUpdateUserPayloadGetDatabaseAttributeTypeOk(o.Database); ok { @@ -139,37 +165,45 @@ func (o PartialUpdateUserPayload) 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 NullablePartialUpdateUserPayload struct { value *PartialUpdateUserPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullablePartialUpdateUserPayload) Get() *PartialUpdateUserPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullablePartialUpdateUserPayload) Set(val *PartialUpdateUserPayload) { 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 NullablePartialUpdateUserPayload) 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 *NullablePartialUpdateUserPayload) 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 NewNullablePartialUpdateUserPayload(val *PartialUpdateUserPayload) *NullablePartialUpdateUserPayload { return &NullablePartialUpdateUserPayload{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 NullablePartialUpdateUserPayload) 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 *NullablePartialUpdateUserPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_restore_instance_payload.go b/services/mongodbflex/model_restore_instance_payload.go index 49533f134..858e08c9d 100644 --- a/services/mongodbflex/model_restore_instance_payload.go +++ b/services/mongodbflex/model_restore_instance_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &RestoreInstancePayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayloadGetBackupIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstancePayloadGetBackupIdAttributeTypeOk(arg RestoreInstancePayloadGetBackupIdAttributeType) (ret RestoreInstancePayloadGetBackupIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getRestoreInstancePayloadGetBackupIdAttributeTypeOk(arg RestoreInstancePayl return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstancePayloadGetBackupIdAttributeType(arg *RestoreInstancePayloadGetBackupIdAttributeType, val RestoreInstancePayloadGetBackupIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayloadGetBackupIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayloadGetBackupIdRetType = string /* @@ -43,8 +50,10 @@ type RestoreInstancePayloadGetBackupIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayloadGetInstanceIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstancePayloadGetInstanceIdAttributeTypeOk(arg RestoreInstancePayloadGetInstanceIdAttributeType) (ret RestoreInstancePayloadGetInstanceIdRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getRestoreInstancePayloadGetInstanceIdAttributeTypeOk(arg RestoreInstancePa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstancePayloadGetInstanceIdAttributeType(arg *RestoreInstancePayloadGetInstanceIdAttributeType, val RestoreInstancePayloadGetInstanceIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayloadGetInstanceIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayloadGetInstanceIdRetType = string // RestoreInstancePayload struct for RestoreInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstancePayload struct { // REQUIRED BackupId RestoreInstancePayloadGetBackupIdAttributeType `json:"backupId" required:"true"` @@ -67,12 +81,14 @@ type RestoreInstancePayload struct { InstanceId RestoreInstancePayloadGetInstanceIdAttributeType `json:"instanceId" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _RestoreInstancePayload RestoreInstancePayload // NewRestoreInstancePayload instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayload(backupId RestoreInstancePayloadGetBackupIdArgType, instanceId RestoreInstancePayloadGetInstanceIdArgType) *RestoreInstancePayload { this := RestoreInstancePayload{} setRestoreInstancePayloadGetBackupIdAttributeType(&this.BackupId, backupId) @@ -83,12 +99,14 @@ func NewRestoreInstancePayload(backupId RestoreInstancePayloadGetBackupIdArgType // NewRestoreInstancePayloadWithDefaults instantiates a new RestoreInstancePayload object // This 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 NewRestoreInstancePayloadWithDefaults() *RestoreInstancePayload { this := RestoreInstancePayload{} return &this } // GetBackupId returns the BackupId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstancePayload) GetBackupId() (ret RestoreInstancePayloadGetBackupIdRetType) { ret, _ = o.GetBackupIdOk() return ret @@ -96,16 +114,19 @@ func (o *RestoreInstancePayload) GetBackupId() (ret RestoreInstancePayloadGetBac // GetBackupIdOk returns a tuple with the BackupId 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 *RestoreInstancePayload) GetBackupIdOk() (ret RestoreInstancePayloadGetBackupIdRetType, ok bool) { return getRestoreInstancePayloadGetBackupIdAttributeTypeOk(o.BackupId) } // SetBackupId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstancePayload) SetBackupId(v RestoreInstancePayloadGetBackupIdRetType) { setRestoreInstancePayloadGetBackupIdAttributeType(&o.BackupId, v) } // GetInstanceId returns the InstanceId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstancePayload) GetInstanceId() (ret RestoreInstancePayloadGetInstanceIdRetType) { ret, _ = o.GetInstanceIdOk() return ret @@ -113,15 +134,18 @@ func (o *RestoreInstancePayload) GetInstanceId() (ret RestoreInstancePayloadGetI // GetInstanceIdOk returns a tuple with the InstanceId 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 *RestoreInstancePayload) GetInstanceIdOk() (ret RestoreInstancePayloadGetInstanceIdRetType, ok bool) { return getRestoreInstancePayloadGetInstanceIdAttributeTypeOk(o.InstanceId) } // SetInstanceId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstancePayload) SetInstanceId(v RestoreInstancePayloadGetInstanceIdRetType) { setRestoreInstancePayloadGetInstanceIdAttributeType(&o.InstanceId, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o RestoreInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getRestoreInstancePayloadGetBackupIdAttributeTypeOk(o.BackupId); ok { @@ -133,37 +157,45 @@ func (o RestoreInstancePayload) 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 NullableRestoreInstancePayload struct { value *RestoreInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableRestoreInstancePayload) Get() *RestoreInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableRestoreInstancePayload) Set(val *RestoreInstancePayload) { 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 NullableRestoreInstancePayload) 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 *NullableRestoreInstancePayload) 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 NewNullableRestoreInstancePayload(val *RestoreInstancePayload) *NullableRestoreInstancePayload { return &NullableRestoreInstancePayload{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 NullableRestoreInstancePayload) 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 *NullableRestoreInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_restore_instance_response.go b/services/mongodbflex/model_restore_instance_response.go index 76e35e2de..3dbc8c066 100644 --- a/services/mongodbflex/model_restore_instance_response.go +++ b/services/mongodbflex/model_restore_instance_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &RestoreInstanceResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceResponseGetItemAttributeType = *RestoreInstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceResponseGetItemArgType = RestoreInstanceStatus + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceResponseGetItemRetType = RestoreInstanceStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstanceResponseGetItemAttributeTypeOk(arg RestoreInstanceResponseGetItemAttributeType) (ret RestoreInstanceResponseGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getRestoreInstanceResponseGetItemAttributeTypeOk(arg RestoreInstanceRespons return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstanceResponseGetItemAttributeType(arg *RestoreInstanceResponseGetItemAttributeType, val RestoreInstanceResponseGetItemRetType) { *arg = &val } // RestoreInstanceResponse struct for RestoreInstanceResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceResponse struct { Item RestoreInstanceResponseGetItemAttributeType `json:"item,omitempty"` } @@ -46,6 +55,7 @@ type RestoreInstanceResponse 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 NewRestoreInstanceResponse() *RestoreInstanceResponse { this := RestoreInstanceResponse{} return &this @@ -54,12 +64,14 @@ func NewRestoreInstanceResponse() *RestoreInstanceResponse { // NewRestoreInstanceResponseWithDefaults instantiates a new RestoreInstanceResponse object // This 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 NewRestoreInstanceResponseWithDefaults() *RestoreInstanceResponse { this := RestoreInstanceResponse{} return &this } // GetItem returns the Item 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 *RestoreInstanceResponse) GetItem() (res RestoreInstanceResponseGetItemRetType) { res, _ = o.GetItemOk() return @@ -67,21 +79,25 @@ func (o *RestoreInstanceResponse) GetItem() (res RestoreInstanceResponseGetItemR // GetItemOk returns a tuple with the Item 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 *RestoreInstanceResponse) GetItemOk() (ret RestoreInstanceResponseGetItemRetType, ok bool) { return getRestoreInstanceResponseGetItemAttributeTypeOk(o.Item) } // HasItem 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 *RestoreInstanceResponse) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given RestoreInstanceStatus and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstanceResponse) SetItem(v RestoreInstanceResponseGetItemRetType) { setRestoreInstanceResponseGetItemAttributeType(&o.Item, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o RestoreInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getRestoreInstanceResponseGetItemAttributeTypeOk(o.Item); ok { @@ -90,37 +106,45 @@ func (o RestoreInstanceResponse) 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 NullableRestoreInstanceResponse struct { value *RestoreInstanceResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableRestoreInstanceResponse) Get() *RestoreInstanceResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableRestoreInstanceResponse) Set(val *RestoreInstanceResponse) { 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 NullableRestoreInstanceResponse) 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 *NullableRestoreInstanceResponse) 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 NewNullableRestoreInstanceResponse(val *RestoreInstanceResponse) *NullableRestoreInstanceResponse { return &NullableRestoreInstanceResponse{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 NullableRestoreInstanceResponse) 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 *NullableRestoreInstanceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_restore_instance_status.go b/services/mongodbflex/model_restore_instance_status.go index e3cd237eb..0a5ca2097 100644 --- a/services/mongodbflex/model_restore_instance_status.go +++ b/services/mongodbflex/model_restore_instance_status.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &RestoreInstanceStatus{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetBackupIDAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstanceStatusGetBackupIDAttributeTypeOk(arg RestoreInstanceStatusGetBackupIDAttributeType) (ret RestoreInstanceStatusGetBackupIDRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getRestoreInstanceStatusGetBackupIDAttributeTypeOk(arg RestoreInstanceStatu return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstanceStatusGetBackupIDAttributeType(arg *RestoreInstanceStatusGetBackupIDAttributeType, val RestoreInstanceStatusGetBackupIDRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetBackupIDArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetBackupIDRetType = string /* @@ -43,8 +50,10 @@ type RestoreInstanceStatusGetBackupIDRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetDateAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstanceStatusGetDateAttributeTypeOk(arg RestoreInstanceStatusGetDateAttributeType) (ret RestoreInstanceStatusGetDateRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getRestoreInstanceStatusGetDateAttributeTypeOk(arg RestoreInstanceStatusGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstanceStatusGetDateAttributeType(arg *RestoreInstanceStatusGetDateAttributeType, val RestoreInstanceStatusGetDateRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetDateArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetDateRetType = string /* @@ -64,8 +77,10 @@ type RestoreInstanceStatusGetDateRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstanceStatusGetIdAttributeTypeOk(arg RestoreInstanceStatusGetIdAttributeType) (ret RestoreInstanceStatusGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getRestoreInstanceStatusGetIdAttributeTypeOk(arg RestoreInstanceStatusGetId return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstanceStatusGetIdAttributeType(arg *RestoreInstanceStatusGetIdAttributeType, val RestoreInstanceStatusGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetIdRetType = string /* @@ -85,8 +104,10 @@ type RestoreInstanceStatusGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetInstanceIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstanceStatusGetInstanceIdAttributeTypeOk(arg RestoreInstanceStatusGetInstanceIdAttributeType) (ret RestoreInstanceStatusGetInstanceIdRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +115,15 @@ func getRestoreInstanceStatusGetInstanceIdAttributeTypeOk(arg RestoreInstanceSta return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstanceStatusGetInstanceIdAttributeType(arg *RestoreInstanceStatusGetInstanceIdAttributeType, val RestoreInstanceStatusGetInstanceIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetInstanceIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetInstanceIdRetType = string /* @@ -106,8 +131,10 @@ type RestoreInstanceStatusGetInstanceIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetStatusAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getRestoreInstanceStatusGetStatusAttributeTypeOk(arg RestoreInstanceStatusGetStatusAttributeType) (ret RestoreInstanceStatusGetStatusRetType, ok bool) { if arg == nil { return ret, false @@ -115,14 +142,19 @@ func getRestoreInstanceStatusGetStatusAttributeTypeOk(arg RestoreInstanceStatusG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setRestoreInstanceStatusGetStatusAttributeType(arg *RestoreInstanceStatusGetStatusAttributeType, val RestoreInstanceStatusGetStatusRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetStatusArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatusGetStatusRetType = string // RestoreInstanceStatus struct for RestoreInstanceStatus +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type RestoreInstanceStatus struct { BackupID RestoreInstanceStatusGetBackupIDAttributeType `json:"backupID,omitempty"` Date RestoreInstanceStatusGetDateAttributeType `json:"date,omitempty"` @@ -135,6 +167,7 @@ type RestoreInstanceStatus 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 NewRestoreInstanceStatus() *RestoreInstanceStatus { this := RestoreInstanceStatus{} return &this @@ -143,12 +176,14 @@ func NewRestoreInstanceStatus() *RestoreInstanceStatus { // NewRestoreInstanceStatusWithDefaults instantiates a new RestoreInstanceStatus object // This 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 NewRestoreInstanceStatusWithDefaults() *RestoreInstanceStatus { this := RestoreInstanceStatus{} return &this } // GetBackupID returns the BackupID 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 *RestoreInstanceStatus) GetBackupID() (res RestoreInstanceStatusGetBackupIDRetType) { res, _ = o.GetBackupIDOk() return @@ -156,22 +191,26 @@ func (o *RestoreInstanceStatus) GetBackupID() (res RestoreInstanceStatusGetBacku // GetBackupIDOk returns a tuple with the BackupID 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 *RestoreInstanceStatus) GetBackupIDOk() (ret RestoreInstanceStatusGetBackupIDRetType, ok bool) { return getRestoreInstanceStatusGetBackupIDAttributeTypeOk(o.BackupID) } // HasBackupID 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 *RestoreInstanceStatus) HasBackupID() bool { _, ok := o.GetBackupIDOk() return ok } // SetBackupID gets a reference to the given string and assigns it to the BackupID field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstanceStatus) SetBackupID(v RestoreInstanceStatusGetBackupIDRetType) { setRestoreInstanceStatusGetBackupIDAttributeType(&o.BackupID, v) } // GetDate returns the Date 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 *RestoreInstanceStatus) GetDate() (res RestoreInstanceStatusGetDateRetType) { res, _ = o.GetDateOk() return @@ -179,22 +218,26 @@ func (o *RestoreInstanceStatus) GetDate() (res RestoreInstanceStatusGetDateRetTy // GetDateOk returns a tuple with the Date 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 *RestoreInstanceStatus) GetDateOk() (ret RestoreInstanceStatusGetDateRetType, ok bool) { return getRestoreInstanceStatusGetDateAttributeTypeOk(o.Date) } // HasDate 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 *RestoreInstanceStatus) HasDate() bool { _, ok := o.GetDateOk() return ok } // SetDate gets a reference to the given string and assigns it to the Date field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstanceStatus) SetDate(v RestoreInstanceStatusGetDateRetType) { setRestoreInstanceStatusGetDateAttributeType(&o.Date, 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 *RestoreInstanceStatus) GetId() (res RestoreInstanceStatusGetIdRetType) { res, _ = o.GetIdOk() return @@ -202,22 +245,26 @@ func (o *RestoreInstanceStatus) GetId() (res RestoreInstanceStatusGetIdRetType) // 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 *RestoreInstanceStatus) GetIdOk() (ret RestoreInstanceStatusGetIdRetType, ok bool) { return getRestoreInstanceStatusGetIdAttributeTypeOk(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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) SetId(v RestoreInstanceStatusGetIdRetType) { setRestoreInstanceStatusGetIdAttributeType(&o.Id, v) } // GetInstanceId returns the InstanceId 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 *RestoreInstanceStatus) GetInstanceId() (res RestoreInstanceStatusGetInstanceIdRetType) { res, _ = o.GetInstanceIdOk() return @@ -225,22 +272,26 @@ func (o *RestoreInstanceStatus) GetInstanceId() (res RestoreInstanceStatusGetIns // GetInstanceIdOk returns a tuple with the InstanceId 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 *RestoreInstanceStatus) GetInstanceIdOk() (ret RestoreInstanceStatusGetInstanceIdRetType, ok bool) { return getRestoreInstanceStatusGetInstanceIdAttributeTypeOk(o.InstanceId) } // HasInstanceId 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 *RestoreInstanceStatus) HasInstanceId() bool { _, ok := o.GetInstanceIdOk() return ok } // SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstanceStatus) SetInstanceId(v RestoreInstanceStatusGetInstanceIdRetType) { setRestoreInstanceStatusGetInstanceIdAttributeType(&o.InstanceId, v) } // GetStatus returns the Status 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 *RestoreInstanceStatus) GetStatus() (res RestoreInstanceStatusGetStatusRetType) { res, _ = o.GetStatusOk() return @@ -248,21 +299,25 @@ func (o *RestoreInstanceStatus) GetStatus() (res RestoreInstanceStatusGetStatusR // GetStatusOk returns a tuple with the Status 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 *RestoreInstanceStatus) GetStatusOk() (ret RestoreInstanceStatusGetStatusRetType, ok bool) { return getRestoreInstanceStatusGetStatusAttributeTypeOk(o.Status) } // HasStatus 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 *RestoreInstanceStatus) HasStatus() bool { _, ok := o.GetStatusOk() return ok } // SetStatus gets a reference to the given string and assigns it to the Status field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *RestoreInstanceStatus) SetStatus(v RestoreInstanceStatusGetStatusRetType) { setRestoreInstanceStatusGetStatusAttributeType(&o.Status, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o RestoreInstanceStatus) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getRestoreInstanceStatusGetBackupIDAttributeTypeOk(o.BackupID); ok { @@ -283,37 +338,45 @@ func (o RestoreInstanceStatus) 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 NullableRestoreInstanceStatus struct { value *RestoreInstanceStatus isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableRestoreInstanceStatus) Get() *RestoreInstanceStatus { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableRestoreInstanceStatus) Set(val *RestoreInstanceStatus) { 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 NullableRestoreInstanceStatus) 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 *NullableRestoreInstanceStatus) 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 NewNullableRestoreInstanceStatus(val *RestoreInstanceStatus) *NullableRestoreInstanceStatus { return &NullableRestoreInstanceStatus{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 NullableRestoreInstanceStatus) 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 *NullableRestoreInstanceStatus) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_shape.go b/services/mongodbflex/model_shape.go index 1e74025ba..cd25d7d5e 100644 --- a/services/mongodbflex/model_shape.go +++ b/services/mongodbflex/model_shape.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &Shape{} */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetAvgMsAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetAvgMsArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetAvgMsRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShapeGetAvgMsAttributeTypeOk(arg ShapeGetAvgMsAttributeType) (ret ShapeGetAvgMsRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getShapeGetAvgMsAttributeTypeOk(arg ShapeGetAvgMsAttributeType) (ret ShapeG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShapeGetAvgMsAttributeType(arg *ShapeGetAvgMsAttributeType, val ShapeGetAvgMsRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setShapeGetAvgMsAttributeType(arg *ShapeGetAvgMsAttributeType, val ShapeGet */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetCountAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetCountArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetCountRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShapeGetCountAttributeTypeOk(arg ShapeGetCountAttributeType) (ret ShapeGetCountRetType, ok bool) { if arg == nil { return ret, false @@ -53,6 +67,7 @@ func getShapeGetCountAttributeTypeOk(arg ShapeGetCountAttributeType) (ret ShapeG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShapeGetCountAttributeType(arg *ShapeGetCountAttributeType, val ShapeGetCountRetType) { *arg = &val } @@ -62,8 +77,10 @@ func setShapeGetCountAttributeType(arg *ShapeGetCountAttributeType, val ShapeGet */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShapeGetIdAttributeTypeOk(arg ShapeGetIdAttributeType) (ret ShapeGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -71,11 +88,15 @@ func getShapeGetIdAttributeTypeOk(arg ShapeGetIdAttributeType) (ret ShapeGetIdRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShapeGetIdAttributeType(arg *ShapeGetIdAttributeType, val ShapeGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetIdRetType = string /* @@ -83,10 +104,16 @@ type ShapeGetIdRetType = string */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetInefficiencyScoreAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetInefficiencyScoreArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetInefficiencyScoreRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShapeGetInefficiencyScoreAttributeTypeOk(arg ShapeGetInefficiencyScoreAttributeType) (ret ShapeGetInefficiencyScoreRetType, ok bool) { if arg == nil { return ret, false @@ -94,6 +121,7 @@ func getShapeGetInefficiencyScoreAttributeTypeOk(arg ShapeGetInefficiencyScoreAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShapeGetInefficiencyScoreAttributeType(arg *ShapeGetInefficiencyScoreAttributeType, val ShapeGetInefficiencyScoreRetType) { *arg = &val } @@ -103,8 +131,10 @@ func setShapeGetInefficiencyScoreAttributeType(arg *ShapeGetInefficiencyScoreAtt */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetNamespaceAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShapeGetNamespaceAttributeTypeOk(arg ShapeGetNamespaceAttributeType) (ret ShapeGetNamespaceRetType, ok bool) { if arg == nil { return ret, false @@ -112,11 +142,15 @@ func getShapeGetNamespaceAttributeTypeOk(arg ShapeGetNamespaceAttributeType) (re return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShapeGetNamespaceAttributeType(arg *ShapeGetNamespaceAttributeType, val ShapeGetNamespaceRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetNamespaceArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetNamespaceRetType = string /* @@ -124,10 +158,16 @@ type ShapeGetNamespaceRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetOperationsAttributeType = *[]MongodbatlasOperation + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetOperationsArgType = []MongodbatlasOperation + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type ShapeGetOperationsRetType = []MongodbatlasOperation +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getShapeGetOperationsAttributeTypeOk(arg ShapeGetOperationsAttributeType) (ret ShapeGetOperationsRetType, ok bool) { if arg == nil { return ret, false @@ -135,11 +175,13 @@ func getShapeGetOperationsAttributeTypeOk(arg ShapeGetOperationsAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setShapeGetOperationsAttributeType(arg *ShapeGetOperationsAttributeType, val ShapeGetOperationsRetType) { *arg = &val } // Shape struct for Shape +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Shape struct { // Average duration in milliseconds for the queries examined that match this shape. AvgMs ShapeGetAvgMsAttributeType `json:"avgMs,omitempty"` @@ -159,6 +201,7 @@ type Shape 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 NewShape() *Shape { this := Shape{} return &this @@ -167,12 +210,14 @@ func NewShape() *Shape { // NewShapeWithDefaults instantiates a new Shape object // This 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 NewShapeWithDefaults() *Shape { this := Shape{} return &this } // GetAvgMs returns the AvgMs 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 *Shape) GetAvgMs() (res ShapeGetAvgMsRetType) { res, _ = o.GetAvgMsOk() return @@ -180,22 +225,26 @@ func (o *Shape) GetAvgMs() (res ShapeGetAvgMsRetType) { // GetAvgMsOk returns a tuple with the AvgMs 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 *Shape) GetAvgMsOk() (ret ShapeGetAvgMsRetType, ok bool) { return getShapeGetAvgMsAttributeTypeOk(o.AvgMs) } // HasAvgMs 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 *Shape) HasAvgMs() bool { _, ok := o.GetAvgMsOk() return ok } // SetAvgMs gets a reference to the given float64 and assigns it to the AvgMs field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Shape) SetAvgMs(v ShapeGetAvgMsRetType) { setShapeGetAvgMsAttributeType(&o.AvgMs, v) } // GetCount returns the Count 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 *Shape) GetCount() (res ShapeGetCountRetType) { res, _ = o.GetCountOk() return @@ -203,22 +252,26 @@ func (o *Shape) GetCount() (res ShapeGetCountRetType) { // GetCountOk returns a tuple with the Count 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 *Shape) GetCountOk() (ret ShapeGetCountRetType, ok bool) { return getShapeGetCountAttributeTypeOk(o.Count) } // HasCount 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 *Shape) HasCount() bool { _, ok := o.GetCountOk() return ok } // SetCount gets a reference to the given int64 and assigns it to the Count field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Shape) SetCount(v ShapeGetCountRetType) { setShapeGetCountAttributeType(&o.Count, 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 *Shape) GetId() (res ShapeGetIdRetType) { res, _ = o.GetIdOk() return @@ -226,22 +279,26 @@ func (o *Shape) GetId() (res ShapeGetIdRetType) { // 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 *Shape) GetIdOk() (ret ShapeGetIdRetType, ok bool) { return getShapeGetIdAttributeTypeOk(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 *Shape) 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 *Shape) SetId(v ShapeGetIdRetType) { setShapeGetIdAttributeType(&o.Id, v) } // GetInefficiencyScore returns the InefficiencyScore 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 *Shape) GetInefficiencyScore() (res ShapeGetInefficiencyScoreRetType) { res, _ = o.GetInefficiencyScoreOk() return @@ -249,22 +306,26 @@ func (o *Shape) GetInefficiencyScore() (res ShapeGetInefficiencyScoreRetType) { // GetInefficiencyScoreOk returns a tuple with the InefficiencyScore 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 *Shape) GetInefficiencyScoreOk() (ret ShapeGetInefficiencyScoreRetType, ok bool) { return getShapeGetInefficiencyScoreAttributeTypeOk(o.InefficiencyScore) } // HasInefficiencyScore 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 *Shape) HasInefficiencyScore() bool { _, ok := o.GetInefficiencyScoreOk() return ok } // SetInefficiencyScore gets a reference to the given int64 and assigns it to the InefficiencyScore field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Shape) SetInefficiencyScore(v ShapeGetInefficiencyScoreRetType) { setShapeGetInefficiencyScoreAttributeType(&o.InefficiencyScore, v) } // GetNamespace returns the Namespace 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 *Shape) GetNamespace() (res ShapeGetNamespaceRetType) { res, _ = o.GetNamespaceOk() return @@ -272,22 +333,26 @@ func (o *Shape) GetNamespace() (res ShapeGetNamespaceRetType) { // GetNamespaceOk returns a tuple with the Namespace 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 *Shape) GetNamespaceOk() (ret ShapeGetNamespaceRetType, ok bool) { return getShapeGetNamespaceAttributeTypeOk(o.Namespace) } // HasNamespace 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 *Shape) HasNamespace() bool { _, ok := o.GetNamespaceOk() return ok } // SetNamespace gets a reference to the given string and assigns it to the Namespace field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Shape) SetNamespace(v ShapeGetNamespaceRetType) { setShapeGetNamespaceAttributeType(&o.Namespace, v) } // GetOperations returns the Operations 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 *Shape) GetOperations() (res ShapeGetOperationsRetType) { res, _ = o.GetOperationsOk() return @@ -295,21 +360,25 @@ func (o *Shape) GetOperations() (res ShapeGetOperationsRetType) { // GetOperationsOk returns a tuple with the Operations 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 *Shape) GetOperationsOk() (ret ShapeGetOperationsRetType, ok bool) { return getShapeGetOperationsAttributeTypeOk(o.Operations) } // HasOperations 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 *Shape) HasOperations() bool { _, ok := o.GetOperationsOk() return ok } // SetOperations gets a reference to the given []MongodbatlasOperation and assigns it to the Operations field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Shape) SetOperations(v ShapeGetOperationsRetType) { setShapeGetOperationsAttributeType(&o.Operations, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Shape) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getShapeGetAvgMsAttributeTypeOk(o.AvgMs); ok { @@ -333,37 +402,45 @@ func (o Shape) 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 NullableShape struct { value *Shape isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableShape) Get() *Shape { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableShape) Set(val *Shape) { 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 NullableShape) 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 *NullableShape) 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 NewNullableShape(val *Shape) *NullableShape { return &NullableShape{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 NullableShape) 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 *NullableShape) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_slow_query.go b/services/mongodbflex/model_slow_query.go index 029594e01..27a727d9c 100644 --- a/services/mongodbflex/model_slow_query.go +++ b/services/mongodbflex/model_slow_query.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &SlowQuery{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQueryGetLineAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSlowQueryGetLineAttributeTypeOk(arg SlowQueryGetLineAttributeType) (ret SlowQueryGetLineRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getSlowQueryGetLineAttributeTypeOk(arg SlowQueryGetLineAttributeType) (ret return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSlowQueryGetLineAttributeType(arg *SlowQueryGetLineAttributeType, val SlowQueryGetLineRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQueryGetLineArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQueryGetLineRetType = string /* @@ -43,8 +50,10 @@ type SlowQueryGetLineRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQueryGetNamespaceAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSlowQueryGetNamespaceAttributeTypeOk(arg SlowQueryGetNamespaceAttributeType) (ret SlowQueryGetNamespaceRetType, ok bool) { if arg == nil { return ret, false @@ -52,14 +61,19 @@ func getSlowQueryGetNamespaceAttributeTypeOk(arg SlowQueryGetNamespaceAttributeT return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSlowQueryGetNamespaceAttributeType(arg *SlowQueryGetNamespaceAttributeType, val SlowQueryGetNamespaceRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQueryGetNamespaceArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQueryGetNamespaceRetType = string // SlowQuery struct for SlowQuery +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SlowQuery struct { // The raw log line pertaining to the slow query. Line SlowQueryGetLineAttributeType `json:"line,omitempty"` @@ -71,6 +85,7 @@ type SlowQuery 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 NewSlowQuery() *SlowQuery { this := SlowQuery{} return &this @@ -79,12 +94,14 @@ func NewSlowQuery() *SlowQuery { // NewSlowQueryWithDefaults instantiates a new SlowQuery object // This 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 NewSlowQueryWithDefaults() *SlowQuery { this := SlowQuery{} return &this } // GetLine returns the Line 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 *SlowQuery) GetLine() (res SlowQueryGetLineRetType) { res, _ = o.GetLineOk() return @@ -92,22 +109,26 @@ func (o *SlowQuery) GetLine() (res SlowQueryGetLineRetType) { // GetLineOk returns a tuple with the Line 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 *SlowQuery) GetLineOk() (ret SlowQueryGetLineRetType, ok bool) { return getSlowQueryGetLineAttributeTypeOk(o.Line) } // HasLine 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 *SlowQuery) HasLine() bool { _, ok := o.GetLineOk() return ok } // SetLine gets a reference to the given string and assigns it to the Line field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *SlowQuery) SetLine(v SlowQueryGetLineRetType) { setSlowQueryGetLineAttributeType(&o.Line, v) } // GetNamespace returns the Namespace 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 *SlowQuery) GetNamespace() (res SlowQueryGetNamespaceRetType) { res, _ = o.GetNamespaceOk() return @@ -115,21 +136,25 @@ func (o *SlowQuery) GetNamespace() (res SlowQueryGetNamespaceRetType) { // GetNamespaceOk returns a tuple with the Namespace 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 *SlowQuery) GetNamespaceOk() (ret SlowQueryGetNamespaceRetType, ok bool) { return getSlowQueryGetNamespaceAttributeTypeOk(o.Namespace) } // HasNamespace 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 *SlowQuery) HasNamespace() bool { _, ok := o.GetNamespaceOk() return ok } // SetNamespace gets a reference to the given string and assigns it to the Namespace field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *SlowQuery) SetNamespace(v SlowQueryGetNamespaceRetType) { setSlowQueryGetNamespaceAttributeType(&o.Namespace, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o SlowQuery) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getSlowQueryGetLineAttributeTypeOk(o.Line); ok { @@ -141,37 +166,45 @@ func (o SlowQuery) 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 NullableSlowQuery struct { value *SlowQuery isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableSlowQuery) Get() *SlowQuery { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableSlowQuery) Set(val *SlowQuery) { 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 NullableSlowQuery) 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 *NullableSlowQuery) 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 NewNullableSlowQuery(val *SlowQuery) *NullableSlowQuery { return &NullableSlowQuery{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 NullableSlowQuery) 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 *NullableSlowQuery) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_storage.go b/services/mongodbflex/model_storage.go index d62bb0497..4c54d71b4 100644 --- a/services/mongodbflex/model_storage.go +++ b/services/mongodbflex/model_storage.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &Storage{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageGetClassAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStorageGetClassAttributeTypeOk(arg StorageGetClassAttributeType) (ret StorageGetClassRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getStorageGetClassAttributeTypeOk(arg StorageGetClassAttributeType) (ret St return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStorageGetClassAttributeType(arg *StorageGetClassAttributeType, val StorageGetClassRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageGetClassArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageGetClassRetType = string /* @@ -43,10 +50,16 @@ type StorageGetClassRetType = string */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageGetSizeAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageGetSizeArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageGetSizeRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStorageGetSizeAttributeTypeOk(arg StorageGetSizeAttributeType) (ret StorageGetSizeRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getStorageGetSizeAttributeTypeOk(arg StorageGetSizeAttributeType) (ret Stor return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStorageGetSizeAttributeType(arg *StorageGetSizeAttributeType, val StorageGetSizeRetType) { *arg = &val } // Storage struct for Storage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type Storage struct { Class StorageGetClassAttributeType `json:"class,omitempty"` Size StorageGetSizeAttributeType `json:"size,omitempty"` @@ -68,6 +83,7 @@ type Storage 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 NewStorage() *Storage { this := Storage{} return &this @@ -76,12 +92,14 @@ func NewStorage() *Storage { // NewStorageWithDefaults instantiates a new Storage object // This constructor will only assign default values to properties that have it defined, // but it doesn't guarantee that properties required by API are set +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func NewStorageWithDefaults() *Storage { this := Storage{} return &this } // GetClass returns the Class 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 *Storage) GetClass() (res StorageGetClassRetType) { res, _ = o.GetClassOk() return @@ -89,22 +107,26 @@ func (o *Storage) GetClass() (res StorageGetClassRetType) { // GetClassOk returns a tuple with the Class 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 *Storage) GetClassOk() (ret StorageGetClassRetType, ok bool) { return getStorageGetClassAttributeTypeOk(o.Class) } // HasClass 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 *Storage) HasClass() bool { _, ok := o.GetClassOk() return ok } // SetClass gets a reference to the given string and assigns it to the Class field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Storage) SetClass(v StorageGetClassRetType) { setStorageGetClassAttributeType(&o.Class, v) } // GetSize returns the Size 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 *Storage) GetSize() (res StorageGetSizeRetType) { res, _ = o.GetSizeOk() return @@ -112,21 +134,25 @@ func (o *Storage) GetSize() (res StorageGetSizeRetType) { // GetSizeOk returns a tuple with the Size 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 *Storage) GetSizeOk() (ret StorageGetSizeRetType, ok bool) { return getStorageGetSizeAttributeTypeOk(o.Size) } // HasSize 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 *Storage) HasSize() bool { _, ok := o.GetSizeOk() return ok } // SetSize gets a reference to the given int64 and assigns it to the Size field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *Storage) SetSize(v StorageGetSizeRetType) { setStorageGetSizeAttributeType(&o.Size, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o Storage) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getStorageGetClassAttributeTypeOk(o.Class); ok { @@ -138,37 +164,45 @@ func (o Storage) 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 NullableStorage struct { value *Storage isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableStorage) Get() *Storage { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableStorage) Set(val *Storage) { 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 NullableStorage) 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 *NullableStorage) 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 NewNullableStorage(val *Storage) *NullableStorage { return &NullableStorage{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 NullableStorage) 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 *NullableStorage) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_storage_range.go b/services/mongodbflex/model_storage_range.go index 598973ccb..d9b8db712 100644 --- a/services/mongodbflex/model_storage_range.go +++ b/services/mongodbflex/model_storage_range.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &StorageRange{} */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRangeGetMaxAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRangeGetMaxArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRangeGetMaxRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStorageRangeGetMaxAttributeTypeOk(arg StorageRangeGetMaxAttributeType) (ret StorageRangeGetMaxRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getStorageRangeGetMaxAttributeTypeOk(arg StorageRangeGetMaxAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStorageRangeGetMaxAttributeType(arg *StorageRangeGetMaxAttributeType, val StorageRangeGetMaxRetType) { *arg = &val } @@ -42,10 +50,16 @@ func setStorageRangeGetMaxAttributeType(arg *StorageRangeGetMaxAttributeType, va */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRangeGetMinAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRangeGetMinArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRangeGetMinRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getStorageRangeGetMinAttributeTypeOk(arg StorageRangeGetMinAttributeType) (ret StorageRangeGetMinRetType, ok bool) { if arg == nil { return ret, false @@ -53,11 +67,13 @@ func getStorageRangeGetMinAttributeTypeOk(arg StorageRangeGetMinAttributeType) ( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setStorageRangeGetMinAttributeType(arg *StorageRangeGetMinAttributeType, val StorageRangeGetMinRetType) { *arg = &val } // StorageRange struct for StorageRange +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type StorageRange struct { Max StorageRangeGetMaxAttributeType `json:"max,omitempty"` Min StorageRangeGetMinAttributeType `json:"min,omitempty"` @@ -67,6 +83,7 @@ type StorageRange 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 NewStorageRange() *StorageRange { this := StorageRange{} return &this @@ -75,12 +92,14 @@ func NewStorageRange() *StorageRange { // NewStorageRangeWithDefaults instantiates a new StorageRange object // This 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 NewStorageRangeWithDefaults() *StorageRange { this := StorageRange{} return &this } // GetMax returns the Max 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 *StorageRange) GetMax() (res StorageRangeGetMaxRetType) { res, _ = o.GetMaxOk() return @@ -88,22 +107,26 @@ func (o *StorageRange) GetMax() (res StorageRangeGetMaxRetType) { // GetMaxOk returns a tuple with the Max 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 *StorageRange) GetMaxOk() (ret StorageRangeGetMaxRetType, ok bool) { return getStorageRangeGetMaxAttributeTypeOk(o.Max) } // HasMax 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 *StorageRange) HasMax() bool { _, ok := o.GetMaxOk() return ok } // SetMax gets a reference to the given int64 and assigns it to the Max field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *StorageRange) SetMax(v StorageRangeGetMaxRetType) { setStorageRangeGetMaxAttributeType(&o.Max, v) } // GetMin returns the Min 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 *StorageRange) GetMin() (res StorageRangeGetMinRetType) { res, _ = o.GetMinOk() return @@ -111,21 +134,25 @@ func (o *StorageRange) GetMin() (res StorageRangeGetMinRetType) { // GetMinOk returns a tuple with the Min 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 *StorageRange) GetMinOk() (ret StorageRangeGetMinRetType, ok bool) { return getStorageRangeGetMinAttributeTypeOk(o.Min) } // HasMin 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 *StorageRange) HasMin() bool { _, ok := o.GetMinOk() return ok } // SetMin gets a reference to the given int64 and assigns it to the Min field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *StorageRange) SetMin(v StorageRangeGetMinRetType) { setStorageRangeGetMinAttributeType(&o.Min, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o StorageRange) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getStorageRangeGetMaxAttributeTypeOk(o.Max); ok { @@ -137,37 +164,45 @@ func (o StorageRange) 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 NullableStorageRange struct { value *StorageRange isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableStorageRange) Get() *StorageRange { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableStorageRange) Set(val *StorageRange) { 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 NullableStorageRange) 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 *NullableStorageRange) 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 NewNullableStorageRange(val *StorageRange) *NullableStorageRange { return &NullableStorageRange{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 NullableStorageRange) 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 *NullableStorageRange) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_suggested_index.go b/services/mongodbflex/model_suggested_index.go index 819b2adcb..7d97483b1 100644 --- a/services/mongodbflex/model_suggested_index.go +++ b/services/mongodbflex/model_suggested_index.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &SuggestedIndex{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSuggestedIndexGetIdAttributeTypeOk(arg SuggestedIndexGetIdAttributeType) (ret SuggestedIndexGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getSuggestedIndexGetIdAttributeTypeOk(arg SuggestedIndexGetIdAttributeType) return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSuggestedIndexGetIdAttributeType(arg *SuggestedIndexGetIdAttributeType, val SuggestedIndexGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetIdRetType = string /* @@ -43,10 +50,16 @@ type SuggestedIndexGetIdRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetImpactAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetImpactArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetImpactRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSuggestedIndexGetImpactAttributeTypeOk(arg SuggestedIndexGetImpactAttributeType) (ret SuggestedIndexGetImpactRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getSuggestedIndexGetImpactAttributeTypeOk(arg SuggestedIndexGetImpactAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSuggestedIndexGetImpactAttributeType(arg *SuggestedIndexGetImpactAttributeType, val SuggestedIndexGetImpactRetType) { *arg = &val } @@ -63,10 +77,16 @@ func setSuggestedIndexGetImpactAttributeType(arg *SuggestedIndexGetImpactAttribu */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetIndexAttributeType = *[]map[string]int32 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetIndexArgType = []map[string]int32 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetIndexRetType = []map[string]int32 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSuggestedIndexGetIndexAttributeTypeOk(arg SuggestedIndexGetIndexAttributeType) (ret SuggestedIndexGetIndexRetType, ok bool) { if arg == nil { return ret, false @@ -74,6 +94,7 @@ func getSuggestedIndexGetIndexAttributeTypeOk(arg SuggestedIndexGetIndexAttribut return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSuggestedIndexGetIndexAttributeType(arg *SuggestedIndexGetIndexAttributeType, val SuggestedIndexGetIndexRetType) { *arg = &val } @@ -83,8 +104,10 @@ func setSuggestedIndexGetIndexAttributeType(arg *SuggestedIndexGetIndexAttribute */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetNamespaceAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSuggestedIndexGetNamespaceAttributeTypeOk(arg SuggestedIndexGetNamespaceAttributeType) (ret SuggestedIndexGetNamespaceRetType, ok bool) { if arg == nil { return ret, false @@ -92,11 +115,15 @@ func getSuggestedIndexGetNamespaceAttributeTypeOk(arg SuggestedIndexGetNamespace return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSuggestedIndexGetNamespaceAttributeType(arg *SuggestedIndexGetNamespaceAttributeType, val SuggestedIndexGetNamespaceRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetNamespaceArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetNamespaceRetType = string /* @@ -104,10 +131,16 @@ type SuggestedIndexGetNamespaceRetType = string */ // isNumber +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetWeightAttributeType = *float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetWeightArgType = float64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndexGetWeightRetType = float64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getSuggestedIndexGetWeightAttributeTypeOk(arg SuggestedIndexGetWeightAttributeType) (ret SuggestedIndexGetWeightRetType, ok bool) { if arg == nil { return ret, false @@ -115,11 +148,13 @@ func getSuggestedIndexGetWeightAttributeTypeOk(arg SuggestedIndexGetWeightAttrib return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setSuggestedIndexGetWeightAttributeType(arg *SuggestedIndexGetWeightAttributeType, val SuggestedIndexGetWeightRetType) { *arg = &val } // SuggestedIndex struct for SuggestedIndex +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type SuggestedIndex struct { // Unique id for this suggested index. Id SuggestedIndexGetIdAttributeType `json:"id,omitempty"` @@ -137,6 +172,7 @@ type SuggestedIndex 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 NewSuggestedIndex() *SuggestedIndex { this := SuggestedIndex{} return &this @@ -145,12 +181,14 @@ func NewSuggestedIndex() *SuggestedIndex { // NewSuggestedIndexWithDefaults instantiates a new SuggestedIndex object // This 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 NewSuggestedIndexWithDefaults() *SuggestedIndex { this := SuggestedIndex{} return &this } // 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 *SuggestedIndex) GetId() (res SuggestedIndexGetIdRetType) { res, _ = o.GetIdOk() return @@ -158,22 +196,26 @@ func (o *SuggestedIndex) GetId() (res SuggestedIndexGetIdRetType) { // 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 *SuggestedIndex) GetIdOk() (ret SuggestedIndexGetIdRetType, ok bool) { return getSuggestedIndexGetIdAttributeTypeOk(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 *SuggestedIndex) 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 *SuggestedIndex) SetId(v SuggestedIndexGetIdRetType) { setSuggestedIndexGetIdAttributeType(&o.Id, v) } // GetImpact returns the Impact 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 *SuggestedIndex) GetImpact() (res SuggestedIndexGetImpactRetType) { res, _ = o.GetImpactOk() return @@ -181,22 +223,26 @@ func (o *SuggestedIndex) GetImpact() (res SuggestedIndexGetImpactRetType) { // GetImpactOk returns a tuple with the Impact 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 *SuggestedIndex) GetImpactOk() (ret SuggestedIndexGetImpactRetType, ok bool) { return getSuggestedIndexGetImpactAttributeTypeOk(o.Impact) } // HasImpact 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 *SuggestedIndex) HasImpact() bool { _, ok := o.GetImpactOk() return ok } // SetImpact gets a reference to the given []string and assigns it to the Impact field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *SuggestedIndex) SetImpact(v SuggestedIndexGetImpactRetType) { setSuggestedIndexGetImpactAttributeType(&o.Impact, v) } // GetIndex returns the Index 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 *SuggestedIndex) GetIndex() (res SuggestedIndexGetIndexRetType) { res, _ = o.GetIndexOk() return @@ -204,22 +250,26 @@ func (o *SuggestedIndex) GetIndex() (res SuggestedIndexGetIndexRetType) { // GetIndexOk returns a tuple with the Index 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 *SuggestedIndex) GetIndexOk() (ret SuggestedIndexGetIndexRetType, ok bool) { return getSuggestedIndexGetIndexAttributeTypeOk(o.Index) } // HasIndex 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 *SuggestedIndex) HasIndex() bool { _, ok := o.GetIndexOk() return ok } // SetIndex gets a reference to the given []map[string]int32 and assigns it to the Index field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *SuggestedIndex) SetIndex(v SuggestedIndexGetIndexRetType) { setSuggestedIndexGetIndexAttributeType(&o.Index, v) } // GetNamespace returns the Namespace 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 *SuggestedIndex) GetNamespace() (res SuggestedIndexGetNamespaceRetType) { res, _ = o.GetNamespaceOk() return @@ -227,22 +277,26 @@ func (o *SuggestedIndex) GetNamespace() (res SuggestedIndexGetNamespaceRetType) // GetNamespaceOk returns a tuple with the Namespace 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 *SuggestedIndex) GetNamespaceOk() (ret SuggestedIndexGetNamespaceRetType, ok bool) { return getSuggestedIndexGetNamespaceAttributeTypeOk(o.Namespace) } // HasNamespace 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 *SuggestedIndex) HasNamespace() bool { _, ok := o.GetNamespaceOk() return ok } // SetNamespace gets a reference to the given string and assigns it to the Namespace field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *SuggestedIndex) SetNamespace(v SuggestedIndexGetNamespaceRetType) { setSuggestedIndexGetNamespaceAttributeType(&o.Namespace, v) } // GetWeight returns the Weight 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 *SuggestedIndex) GetWeight() (res SuggestedIndexGetWeightRetType) { res, _ = o.GetWeightOk() return @@ -250,21 +304,25 @@ func (o *SuggestedIndex) GetWeight() (res SuggestedIndexGetWeightRetType) { // GetWeightOk returns a tuple with the Weight 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 *SuggestedIndex) GetWeightOk() (ret SuggestedIndexGetWeightRetType, ok bool) { return getSuggestedIndexGetWeightAttributeTypeOk(o.Weight) } // HasWeight 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 *SuggestedIndex) HasWeight() bool { _, ok := o.GetWeightOk() return ok } // SetWeight gets a reference to the given float64 and assigns it to the Weight field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *SuggestedIndex) SetWeight(v SuggestedIndexGetWeightRetType) { setSuggestedIndexGetWeightAttributeType(&o.Weight, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o SuggestedIndex) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getSuggestedIndexGetIdAttributeTypeOk(o.Id); ok { @@ -285,37 +343,45 @@ func (o SuggestedIndex) 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 NullableSuggestedIndex struct { value *SuggestedIndex isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableSuggestedIndex) Get() *SuggestedIndex { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableSuggestedIndex) Set(val *SuggestedIndex) { 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 NullableSuggestedIndex) 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 *NullableSuggestedIndex) 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 NewNullableSuggestedIndex(val *SuggestedIndex) *NullableSuggestedIndex { return &NullableSuggestedIndex{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 NullableSuggestedIndex) 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 *NullableSuggestedIndex) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_update_backup_schedule_payload.go b/services/mongodbflex/model_update_backup_schedule_payload.go index 52e28c01c..ad775996f 100644 --- a/services/mongodbflex/model_update_backup_schedule_payload.go +++ b/services/mongodbflex/model_update_backup_schedule_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateBackupSchedulePayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetBackupScheduleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateBackupSchedulePayloadGetBackupScheduleAttributeTypeOk(arg UpdateBackupSchedulePayloadGetBackupScheduleAttributeType) (ret UpdateBackupSchedulePayloadGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUpdateBackupSchedulePayloadGetBackupScheduleAttributeTypeOk(arg UpdateBa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateBackupSchedulePayloadGetBackupScheduleAttributeType(arg *UpdateBackupSchedulePayloadGetBackupScheduleAttributeType, val UpdateBackupSchedulePayloadGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetBackupScheduleRetType = string /* @@ -43,10 +50,16 @@ type UpdateBackupSchedulePayloadGetBackupScheduleRetType = string */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeTypeOk(arg UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType) (ret UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysRetType, ok bool) { if arg == nil { return ret, false @@ -54,6 +67,7 @@ func getUpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeTypeOk( return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType(arg *UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType, val UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysRetType) { *arg = &val } @@ -63,10 +77,16 @@ func setUpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType(ar */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeTypeOk(arg UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeType) (ret UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsRetType, ok bool) { if arg == nil { return ret, false @@ -74,6 +94,7 @@ func getUpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeTyp return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeType(arg *UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeType, val UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsRetType) { *arg = &val } @@ -83,10 +104,16 @@ func setUpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeTyp */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetPointInTimeWindowHoursArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetPointInTimeWindowHoursRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeTypeOk(arg UpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType) (ret UpdateBackupSchedulePayloadGetPointInTimeWindowHoursRetType, ok bool) { if arg == nil { return ret, false @@ -94,6 +121,7 @@ func getUpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeTypeOk(arg return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType(arg *UpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType, val UpdateBackupSchedulePayloadGetPointInTimeWindowHoursRetType) { *arg = &val } @@ -103,10 +131,16 @@ func setUpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType(arg *U */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetSnapshotRetentionDaysArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetSnapshotRetentionDaysRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeTypeOk(arg UpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType) (ret UpdateBackupSchedulePayloadGetSnapshotRetentionDaysRetType, ok bool) { if arg == nil { return ret, false @@ -114,6 +148,7 @@ func getUpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeTypeOk(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 setUpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType(arg *UpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType, val UpdateBackupSchedulePayloadGetSnapshotRetentionDaysRetType) { *arg = &val } @@ -123,10 +158,16 @@ func setUpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType(arg *Up */ // isInteger +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeTypeOk(arg UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType) (ret UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksRetType, ok bool) { if arg == nil { return ret, false @@ -134,11 +175,13 @@ func getUpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeTypeO return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType(arg *UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType, val UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksRetType) { *arg = &val } // UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateBackupSchedulePayload struct { BackupSchedule UpdateBackupSchedulePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` // Can be cast to int32 without loss of precision. @@ -157,6 +200,7 @@ type UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayload() *UpdateBackupSchedulePayload { this := UpdateBackupSchedulePayload{} return &this @@ -165,12 +209,14 @@ func NewUpdateBackupSchedulePayload() *UpdateBackupSchedulePayload { // NewUpdateBackupSchedulePayloadWithDefaults instantiates a new UpdateBackupSchedulePayload object // This 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 NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { this := UpdateBackupSchedulePayload{} return &this } // GetBackupSchedule returns the BackupSchedule 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 *UpdateBackupSchedulePayload) GetBackupSchedule() (res UpdateBackupSchedulePayloadGetBackupScheduleRetType) { res, _ = o.GetBackupScheduleOk() return @@ -178,22 +224,26 @@ func (o *UpdateBackupSchedulePayload) GetBackupSchedule() (res UpdateBackupSched // GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *UpdateBackupSchedulePayload) GetBackupScheduleOk() (ret UpdateBackupSchedulePayloadGetBackupScheduleRetType, ok bool) { return getUpdateBackupSchedulePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // HasBackupSchedule 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 *UpdateBackupSchedulePayload) HasBackupSchedule() bool { _, ok := o.GetBackupScheduleOk() return ok } // SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateBackupSchedulePayload) SetBackupSchedule(v UpdateBackupSchedulePayloadGetBackupScheduleRetType) { setUpdateBackupSchedulePayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays 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 *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDays() (res UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysRetType) { res, _ = o.GetDailySnapshotRetentionDaysOk() return @@ -201,22 +251,26 @@ func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDays() (res Updat // GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays 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 *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDaysOk() (ret UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysRetType, ok bool) { return getUpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeTypeOk(o.DailySnapshotRetentionDays) } // HasDailySnapshotRetentionDays 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 *UpdateBackupSchedulePayload) HasDailySnapshotRetentionDays() bool { _, ok := o.GetDailySnapshotRetentionDaysOk() return ok } // SetDailySnapshotRetentionDays gets a reference to the given int64 and assigns it to the DailySnapshotRetentionDays field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateBackupSchedulePayload) SetDailySnapshotRetentionDays(v UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysRetType) { setUpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType(&o.DailySnapshotRetentionDays, v) } // GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths 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 *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonths() (res UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsRetType) { res, _ = o.GetMonthlySnapshotRetentionMonthsOk() return @@ -224,22 +278,26 @@ func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonths() (res U // GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths 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 *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonthsOk() (ret UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsRetType, ok bool) { return getUpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeTypeOk(o.MonthlySnapshotRetentionMonths) } // HasMonthlySnapshotRetentionMonths 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 *UpdateBackupSchedulePayload) HasMonthlySnapshotRetentionMonths() bool { _, ok := o.GetMonthlySnapshotRetentionMonthsOk() return ok } // SetMonthlySnapshotRetentionMonths gets a reference to the given int64 and assigns it to the MonthlySnapshotRetentionMonths field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateBackupSchedulePayload) SetMonthlySnapshotRetentionMonths(v UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsRetType) { setUpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeType(&o.MonthlySnapshotRetentionMonths, v) } // GetPointInTimeWindowHours returns the PointInTimeWindowHours 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 *UpdateBackupSchedulePayload) GetPointInTimeWindowHours() (res UpdateBackupSchedulePayloadGetPointInTimeWindowHoursRetType) { res, _ = o.GetPointInTimeWindowHoursOk() return @@ -247,22 +305,26 @@ func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHours() (res UpdateBac // GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours 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 *UpdateBackupSchedulePayload) GetPointInTimeWindowHoursOk() (ret UpdateBackupSchedulePayloadGetPointInTimeWindowHoursRetType, ok bool) { return getUpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeTypeOk(o.PointInTimeWindowHours) } // HasPointInTimeWindowHours 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 *UpdateBackupSchedulePayload) HasPointInTimeWindowHours() bool { _, ok := o.GetPointInTimeWindowHoursOk() return ok } // SetPointInTimeWindowHours gets a reference to the given int64 and assigns it to the PointInTimeWindowHours field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateBackupSchedulePayload) SetPointInTimeWindowHours(v UpdateBackupSchedulePayloadGetPointInTimeWindowHoursRetType) { setUpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType(&o.PointInTimeWindowHours, v) } // GetSnapshotRetentionDays returns the SnapshotRetentionDays 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 *UpdateBackupSchedulePayload) GetSnapshotRetentionDays() (res UpdateBackupSchedulePayloadGetSnapshotRetentionDaysRetType) { res, _ = o.GetSnapshotRetentionDaysOk() return @@ -270,22 +332,26 @@ func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDays() (res UpdateBack // GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays 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 *UpdateBackupSchedulePayload) GetSnapshotRetentionDaysOk() (ret UpdateBackupSchedulePayloadGetSnapshotRetentionDaysRetType, ok bool) { return getUpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeTypeOk(o.SnapshotRetentionDays) } // HasSnapshotRetentionDays 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 *UpdateBackupSchedulePayload) HasSnapshotRetentionDays() bool { _, ok := o.GetSnapshotRetentionDaysOk() return ok } // SetSnapshotRetentionDays gets a reference to the given int64 and assigns it to the SnapshotRetentionDays field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateBackupSchedulePayload) SetSnapshotRetentionDays(v UpdateBackupSchedulePayloadGetSnapshotRetentionDaysRetType) { setUpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType(&o.SnapshotRetentionDays, v) } // GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks 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 *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeks() (res UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksRetType) { res, _ = o.GetWeeklySnapshotRetentionWeeksOk() return @@ -293,21 +359,25 @@ func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeks() (res Upd // GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks 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 *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeksOk() (ret UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksRetType, ok bool) { return getUpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeTypeOk(o.WeeklySnapshotRetentionWeeks) } // HasWeeklySnapshotRetentionWeeks 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 *UpdateBackupSchedulePayload) HasWeeklySnapshotRetentionWeeks() bool { _, ok := o.GetWeeklySnapshotRetentionWeeksOk() return ok } // SetWeeklySnapshotRetentionWeeks gets a reference to the given int64 and assigns it to the WeeklySnapshotRetentionWeeks field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateBackupSchedulePayload) SetWeeklySnapshotRetentionWeeks(v UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksRetType) { setUpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType(&o.WeeklySnapshotRetentionWeeks, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateBackupSchedulePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateBackupSchedulePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule); ok { @@ -331,37 +401,45 @@ func (o UpdateBackupSchedulePayload) 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 NullableUpdateBackupSchedulePayload struct { value *UpdateBackupSchedulePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateBackupSchedulePayload) Get() *UpdateBackupSchedulePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateBackupSchedulePayload) Set(val *UpdateBackupSchedulePayload) { 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 NullableUpdateBackupSchedulePayload) 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 *NullableUpdateBackupSchedulePayload) 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 NewNullableUpdateBackupSchedulePayload(val *UpdateBackupSchedulePayload) *NullableUpdateBackupSchedulePayload { return &NullableUpdateBackupSchedulePayload{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 NullableUpdateBackupSchedulePayload) 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 *NullableUpdateBackupSchedulePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_update_instance_payload.go b/services/mongodbflex/model_update_instance_payload.go index 3a91c55dd..ec0b5be9c 100644 --- a/services/mongodbflex/model_update_instance_payload.go +++ b/services/mongodbflex/model_update_instance_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateInstancePayload{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetAclAttributeType = *ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetAclArgType = ACL + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetAclRetType = ACL +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetAclAttributeTypeOk(arg UpdateInstancePayloadGetAclAttributeType) (ret UpdateInstancePayloadGetAclRetType, ok bool) { if arg == nil { return ret, false @@ -33,6 +40,7 @@ func getUpdateInstancePayloadGetAclAttributeTypeOk(arg UpdateInstancePayloadGetA return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetAclAttributeType(arg *UpdateInstancePayloadGetAclAttributeType, val UpdateInstancePayloadGetAclRetType) { *arg = &val } @@ -42,8 +50,10 @@ func setUpdateInstancePayloadGetAclAttributeType(arg *UpdateInstancePayloadGetAc */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetBackupScheduleAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(arg UpdateInstancePayloadGetBackupScheduleAttributeType) (ret UpdateInstancePayloadGetBackupScheduleRetType, ok bool) { if arg == nil { return ret, false @@ -51,11 +61,15 @@ func getUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(arg UpdateInstance return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetBackupScheduleAttributeType(arg *UpdateInstancePayloadGetBackupScheduleAttributeType, val UpdateInstancePayloadGetBackupScheduleRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetBackupScheduleArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetBackupScheduleRetType = string /* @@ -63,8 +77,10 @@ type UpdateInstancePayloadGetBackupScheduleRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetFlavorIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetFlavorIdAttributeTypeOk(arg UpdateInstancePayloadGetFlavorIdAttributeType) (ret UpdateInstancePayloadGetFlavorIdRetType, ok bool) { if arg == nil { return ret, false @@ -72,11 +88,15 @@ func getUpdateInstancePayloadGetFlavorIdAttributeTypeOk(arg UpdateInstancePayloa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetFlavorIdAttributeType(arg *UpdateInstancePayloadGetFlavorIdAttributeType, val UpdateInstancePayloadGetFlavorIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetFlavorIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetFlavorIdRetType = string /* @@ -84,10 +104,16 @@ type UpdateInstancePayloadGetFlavorIdRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetLabelsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetLabelsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetLabelsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetLabelsAttributeTypeOk(arg UpdateInstancePayloadGetLabelsAttributeType) (ret UpdateInstancePayloadGetLabelsRetType, ok bool) { if arg == nil { return ret, false @@ -95,6 +121,7 @@ func getUpdateInstancePayloadGetLabelsAttributeTypeOk(arg UpdateInstancePayloadG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetLabelsAttributeType(arg *UpdateInstancePayloadGetLabelsAttributeType, val UpdateInstancePayloadGetLabelsRetType) { *arg = &val } @@ -104,8 +131,10 @@ func setUpdateInstancePayloadGetLabelsAttributeType(arg *UpdateInstancePayloadGe */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetNameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetNameAttributeTypeOk(arg UpdateInstancePayloadGetNameAttributeType) (ret UpdateInstancePayloadGetNameRetType, ok bool) { if arg == nil { return ret, false @@ -113,11 +142,15 @@ func getUpdateInstancePayloadGetNameAttributeTypeOk(arg UpdateInstancePayloadGet return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetNameAttributeType(arg *UpdateInstancePayloadGetNameAttributeType, val UpdateInstancePayloadGetNameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetNameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetNameRetType = string /* @@ -125,10 +158,16 @@ type UpdateInstancePayloadGetNameRetType = string */ // isContainer +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetOptionsAttributeType = *map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetOptionsArgType = map[string]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetOptionsRetType = map[string]string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetOptionsAttributeTypeOk(arg UpdateInstancePayloadGetOptionsAttributeType) (ret UpdateInstancePayloadGetOptionsRetType, ok bool) { if arg == nil { return ret, false @@ -136,6 +175,7 @@ func getUpdateInstancePayloadGetOptionsAttributeTypeOk(arg UpdateInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetOptionsAttributeType(arg *UpdateInstancePayloadGetOptionsAttributeType, val UpdateInstancePayloadGetOptionsRetType) { *arg = &val } @@ -145,10 +185,16 @@ func setUpdateInstancePayloadGetOptionsAttributeType(arg *UpdateInstancePayloadG */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetReplicasAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetReplicasArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetReplicasRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetReplicasAttributeTypeOk(arg UpdateInstancePayloadGetReplicasAttributeType) (ret UpdateInstancePayloadGetReplicasRetType, ok bool) { if arg == nil { return ret, false @@ -156,6 +202,7 @@ func getUpdateInstancePayloadGetReplicasAttributeTypeOk(arg UpdateInstancePayloa return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetReplicasAttributeType(arg *UpdateInstancePayloadGetReplicasAttributeType, val UpdateInstancePayloadGetReplicasRetType) { *arg = &val } @@ -165,10 +212,16 @@ func setUpdateInstancePayloadGetReplicasAttributeType(arg *UpdateInstancePayload */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetStorageAttributeType = *Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetStorageArgType = Storage + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetStorageRetType = Storage +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetStorageAttributeTypeOk(arg UpdateInstancePayloadGetStorageAttributeType) (ret UpdateInstancePayloadGetStorageRetType, ok bool) { if arg == nil { return ret, false @@ -176,6 +229,7 @@ func getUpdateInstancePayloadGetStorageAttributeTypeOk(arg UpdateInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetStorageAttributeType(arg *UpdateInstancePayloadGetStorageAttributeType, val UpdateInstancePayloadGetStorageRetType) { *arg = &val } @@ -185,8 +239,10 @@ func setUpdateInstancePayloadGetStorageAttributeType(arg *UpdateInstancePayloadG */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetVersionAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstancePayloadGetVersionAttributeTypeOk(arg UpdateInstancePayloadGetVersionAttributeType) (ret UpdateInstancePayloadGetVersionRetType, ok bool) { if arg == nil { return ret, false @@ -194,14 +250,19 @@ func getUpdateInstancePayloadGetVersionAttributeTypeOk(arg UpdateInstancePayload return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstancePayloadGetVersionAttributeType(arg *UpdateInstancePayloadGetVersionAttributeType, val UpdateInstancePayloadGetVersionRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetVersionArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayloadGetVersionRetType = string // UpdateInstancePayload struct for UpdateInstancePayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstancePayload struct { // REQUIRED Acl UpdateInstancePayloadGetAclAttributeType `json:"acl" required:"true"` @@ -223,12 +284,14 @@ type UpdateInstancePayload struct { Version UpdateInstancePayloadGetVersionAttributeType `json:"version" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _UpdateInstancePayload UpdateInstancePayload // NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(acl UpdateInstancePayloadGetAclArgType, backupSchedule UpdateInstancePayloadGetBackupScheduleArgType, flavorId UpdateInstancePayloadGetFlavorIdArgType, name UpdateInstancePayloadGetNameArgType, options UpdateInstancePayloadGetOptionsArgType, replicas UpdateInstancePayloadGetReplicasArgType, storage UpdateInstancePayloadGetStorageArgType, version UpdateInstancePayloadGetVersionArgType) *UpdateInstancePayload { this := UpdateInstancePayload{} setUpdateInstancePayloadGetAclAttributeType(&this.Acl, acl) @@ -245,12 +308,14 @@ func NewUpdateInstancePayload(acl UpdateInstancePayloadGetAclArgType, backupSche // NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload object // This 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { this := UpdateInstancePayload{} return &this } // GetAcl returns the Acl field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetAcl() (ret UpdateInstancePayloadGetAclRetType) { ret, _ = o.GetAclOk() return ret @@ -258,16 +323,19 @@ func (o *UpdateInstancePayload) GetAcl() (ret UpdateInstancePayloadGetAclRetType // GetAclOk returns a tuple with the Acl 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 *UpdateInstancePayload) GetAclOk() (ret UpdateInstancePayloadGetAclRetType, ok bool) { return getUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl) } // SetAcl sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetAcl(v UpdateInstancePayloadGetAclRetType) { setUpdateInstancePayloadGetAclAttributeType(&o.Acl, v) } // GetBackupSchedule returns the BackupSchedule field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetBackupSchedule() (ret UpdateInstancePayloadGetBackupScheduleRetType) { ret, _ = o.GetBackupScheduleOk() return ret @@ -275,16 +343,19 @@ func (o *UpdateInstancePayload) GetBackupSchedule() (ret UpdateInstancePayloadGe // GetBackupScheduleOk returns a tuple with the BackupSchedule 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 *UpdateInstancePayload) GetBackupScheduleOk() (ret UpdateInstancePayloadGetBackupScheduleRetType, ok bool) { return getUpdateInstancePayloadGetBackupScheduleAttributeTypeOk(o.BackupSchedule) } // SetBackupSchedule sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetBackupSchedule(v UpdateInstancePayloadGetBackupScheduleRetType) { setUpdateInstancePayloadGetBackupScheduleAttributeType(&o.BackupSchedule, v) } // GetFlavorId returns the FlavorId field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetFlavorId() (ret UpdateInstancePayloadGetFlavorIdRetType) { ret, _ = o.GetFlavorIdOk() return ret @@ -292,16 +363,19 @@ func (o *UpdateInstancePayload) GetFlavorId() (ret UpdateInstancePayloadGetFlavo // GetFlavorIdOk returns a tuple with the FlavorId 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 *UpdateInstancePayload) GetFlavorIdOk() (ret UpdateInstancePayloadGetFlavorIdRetType, ok bool) { return getUpdateInstancePayloadGetFlavorIdAttributeTypeOk(o.FlavorId) } // SetFlavorId sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetFlavorId(v UpdateInstancePayloadGetFlavorIdRetType) { setUpdateInstancePayloadGetFlavorIdAttributeType(&o.FlavorId, 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 *UpdateInstancePayload) GetLabels() (res UpdateInstancePayloadGetLabelsRetType) { res, _ = o.GetLabelsOk() return @@ -309,22 +383,26 @@ func (o *UpdateInstancePayload) GetLabels() (res UpdateInstancePayloadGetLabelsR // 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 *UpdateInstancePayload) GetLabelsOk() (ret UpdateInstancePayloadGetLabelsRetType, ok bool) { return getUpdateInstancePayloadGetLabelsAttributeTypeOk(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 *UpdateInstancePayload) 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 *UpdateInstancePayload) SetLabels(v UpdateInstancePayloadGetLabelsRetType) { setUpdateInstancePayloadGetLabelsAttributeType(&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 *UpdateInstancePayload) GetName() (ret UpdateInstancePayloadGetNameRetType) { ret, _ = o.GetNameOk() return ret @@ -332,16 +410,19 @@ func (o *UpdateInstancePayload) GetName() (ret UpdateInstancePayloadGetNameRetTy // 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 *UpdateInstancePayload) GetNameOk() (ret UpdateInstancePayloadGetNameRetType, ok bool) { return getUpdateInstancePayloadGetNameAttributeTypeOk(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 *UpdateInstancePayload) SetName(v UpdateInstancePayloadGetNameRetType) { setUpdateInstancePayloadGetNameAttributeType(&o.Name, v) } // GetOptions returns the Options field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetOptions() (ret UpdateInstancePayloadGetOptionsRetType) { ret, _ = o.GetOptionsOk() return ret @@ -349,16 +430,19 @@ func (o *UpdateInstancePayload) GetOptions() (ret UpdateInstancePayloadGetOption // GetOptionsOk returns a tuple with the Options 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 *UpdateInstancePayload) GetOptionsOk() (ret UpdateInstancePayloadGetOptionsRetType, ok bool) { return getUpdateInstancePayloadGetOptionsAttributeTypeOk(o.Options) } // SetOptions sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetOptions(v UpdateInstancePayloadGetOptionsRetType) { setUpdateInstancePayloadGetOptionsAttributeType(&o.Options, v) } // GetReplicas returns the Replicas field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetReplicas() (ret UpdateInstancePayloadGetReplicasRetType) { ret, _ = o.GetReplicasOk() return ret @@ -366,16 +450,19 @@ func (o *UpdateInstancePayload) GetReplicas() (ret UpdateInstancePayloadGetRepli // GetReplicasOk returns a tuple with the Replicas 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 *UpdateInstancePayload) GetReplicasOk() (ret UpdateInstancePayloadGetReplicasRetType, ok bool) { return getUpdateInstancePayloadGetReplicasAttributeTypeOk(o.Replicas) } // SetReplicas sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetReplicas(v UpdateInstancePayloadGetReplicasRetType) { setUpdateInstancePayloadGetReplicasAttributeType(&o.Replicas, v) } // GetStorage returns the Storage field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetStorage() (ret UpdateInstancePayloadGetStorageRetType) { ret, _ = o.GetStorageOk() return ret @@ -383,16 +470,19 @@ func (o *UpdateInstancePayload) GetStorage() (ret UpdateInstancePayloadGetStorag // GetStorageOk returns a tuple with the Storage 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 *UpdateInstancePayload) GetStorageOk() (ret UpdateInstancePayloadGetStorageRetType, ok bool) { return getUpdateInstancePayloadGetStorageAttributeTypeOk(o.Storage) } // SetStorage sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetStorage(v UpdateInstancePayloadGetStorageRetType) { setUpdateInstancePayloadGetStorageAttributeType(&o.Storage, v) } // GetVersion returns the Version field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) GetVersion() (ret UpdateInstancePayloadGetVersionRetType) { ret, _ = o.GetVersionOk() return ret @@ -400,15 +490,18 @@ func (o *UpdateInstancePayload) GetVersion() (ret UpdateInstancePayloadGetVersio // GetVersionOk returns a tuple with the Version 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 *UpdateInstancePayload) GetVersionOk() (ret UpdateInstancePayloadGetVersionRetType, ok bool) { return getUpdateInstancePayloadGetVersionAttributeTypeOk(o.Version) } // SetVersion sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstancePayload) SetVersion(v UpdateInstancePayloadGetVersionRetType) { setUpdateInstancePayloadGetVersionAttributeType(&o.Version, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateInstancePayloadGetAclAttributeTypeOk(o.Acl); ok { @@ -441,37 +534,45 @@ func (o UpdateInstancePayload) 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 NullableUpdateInstancePayload struct { value *UpdateInstancePayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { 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 NullableUpdateInstancePayload) 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 *NullableUpdateInstancePayload) 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 NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { return &NullableUpdateInstancePayload{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 NullableUpdateInstancePayload) 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 *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_update_instance_response.go b/services/mongodbflex/model_update_instance_response.go index 9bfb93b03..16a817b9e 100644 --- a/services/mongodbflex/model_update_instance_response.go +++ b/services/mongodbflex/model_update_instance_response.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,10 +23,16 @@ var _ MappedNullable = &UpdateInstanceResponse{} */ // isModel +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceResponseGetItemAttributeType = *Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceResponseGetItemArgType = Instance + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceResponseGetItemRetType = Instance +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateInstanceResponseGetItemAttributeTypeOk(arg UpdateInstanceResponseGetItemAttributeType) (ret UpdateInstanceResponseGetItemRetType, ok bool) { if arg == nil { return ret, false @@ -33,11 +40,13 @@ func getUpdateInstanceResponseGetItemAttributeTypeOk(arg UpdateInstanceResponseG return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateInstanceResponseGetItemAttributeType(arg *UpdateInstanceResponseGetItemAttributeType, val UpdateInstanceResponseGetItemRetType) { *arg = &val } // UpdateInstanceResponse struct for UpdateInstanceResponse +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateInstanceResponse struct { Item UpdateInstanceResponseGetItemAttributeType `json:"item,omitempty"` } @@ -46,6 +55,7 @@ type UpdateInstanceResponse 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 NewUpdateInstanceResponse() *UpdateInstanceResponse { this := UpdateInstanceResponse{} return &this @@ -54,12 +64,14 @@ func NewUpdateInstanceResponse() *UpdateInstanceResponse { // NewUpdateInstanceResponseWithDefaults instantiates a new UpdateInstanceResponse object // This 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 NewUpdateInstanceResponseWithDefaults() *UpdateInstanceResponse { this := UpdateInstanceResponse{} return &this } // GetItem returns the Item 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 *UpdateInstanceResponse) GetItem() (res UpdateInstanceResponseGetItemRetType) { res, _ = o.GetItemOk() return @@ -67,21 +79,25 @@ func (o *UpdateInstanceResponse) GetItem() (res UpdateInstanceResponseGetItemRet // GetItemOk returns a tuple with the Item 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 *UpdateInstanceResponse) GetItemOk() (ret UpdateInstanceResponseGetItemRetType, ok bool) { return getUpdateInstanceResponseGetItemAttributeTypeOk(o.Item) } // HasItem 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 *UpdateInstanceResponse) HasItem() bool { _, ok := o.GetItemOk() return ok } // SetItem gets a reference to the given Instance and assigns it to the Item field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateInstanceResponse) SetItem(v UpdateInstanceResponseGetItemRetType) { setUpdateInstanceResponseGetItemAttributeType(&o.Item, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateInstanceResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateInstanceResponseGetItemAttributeTypeOk(o.Item); ok { @@ -90,37 +106,45 @@ func (o UpdateInstanceResponse) 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 NullableUpdateInstanceResponse struct { value *UpdateInstanceResponse isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateInstanceResponse) Get() *UpdateInstanceResponse { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateInstanceResponse) Set(val *UpdateInstanceResponse) { 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 NullableUpdateInstanceResponse) 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 *NullableUpdateInstanceResponse) 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 NewNullableUpdateInstanceResponse(val *UpdateInstanceResponse) *NullableUpdateInstanceResponse { return &NullableUpdateInstanceResponse{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 NullableUpdateInstanceResponse) 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 *NullableUpdateInstanceResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_update_user_payload.go b/services/mongodbflex/model_update_user_payload.go index 822bafb5e..8bf4eebc9 100644 --- a/services/mongodbflex/model_update_user_payload.go +++ b/services/mongodbflex/model_update_user_payload.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &UpdateUserPayload{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetDatabaseAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateUserPayloadGetDatabaseAttributeTypeOk(arg UpdateUserPayloadGetDatabaseAttributeType) (ret UpdateUserPayloadGetDatabaseRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUpdateUserPayloadGetDatabaseAttributeTypeOk(arg UpdateUserPayloadGetData return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateUserPayloadGetDatabaseAttributeType(arg *UpdateUserPayloadGetDatabaseAttributeType, val UpdateUserPayloadGetDatabaseRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetDatabaseRetType = string /* @@ -43,10 +50,16 @@ type UpdateUserPayloadGetDatabaseRetType = string */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetRolesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayloadGetRolesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUpdateUserPayloadGetRolesAttributeTypeOk(arg UpdateUserPayloadGetRolesAttributeType) (ret UpdateUserPayloadGetRolesRetType, ok bool) { if arg == nil { return ret, false @@ -54,11 +67,13 @@ func getUpdateUserPayloadGetRolesAttributeTypeOk(arg UpdateUserPayloadGetRolesAt return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUpdateUserPayloadGetRolesAttributeType(arg *UpdateUserPayloadGetRolesAttributeType, val UpdateUserPayloadGetRolesRetType) { *arg = &val } // UpdateUserPayload struct for UpdateUserPayload +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UpdateUserPayload struct { // REQUIRED Database UpdateUserPayloadGetDatabaseAttributeType `json:"database" required:"true"` @@ -67,12 +82,14 @@ type UpdateUserPayload struct { Roles UpdateUserPayloadGetRolesAttributeType `json:"roles" required:"true"` } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type _UpdateUserPayload UpdateUserPayload // NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload(database UpdateUserPayloadGetDatabaseArgType, roles UpdateUserPayloadGetRolesArgType) *UpdateUserPayload { this := UpdateUserPayload{} setUpdateUserPayloadGetDatabaseAttributeType(&this.Database, database) @@ -83,12 +100,14 @@ func NewUpdateUserPayload(database UpdateUserPayloadGetDatabaseArgType, roles Up // NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload object // This 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { this := UpdateUserPayload{} return &this } // GetDatabase returns the Database field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) GetDatabase() (ret UpdateUserPayloadGetDatabaseRetType) { ret, _ = o.GetDatabaseOk() return ret @@ -96,16 +115,19 @@ func (o *UpdateUserPayload) GetDatabase() (ret UpdateUserPayloadGetDatabaseRetTy // GetDatabaseOk returns a tuple with the Database 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 *UpdateUserPayload) GetDatabaseOk() (ret UpdateUserPayloadGetDatabaseRetType, ok bool) { return getUpdateUserPayloadGetDatabaseAttributeTypeOk(o.Database) } // SetDatabase sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) SetDatabase(v UpdateUserPayloadGetDatabaseRetType) { setUpdateUserPayloadGetDatabaseAttributeType(&o.Database, v) } // GetRoles returns the Roles field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) GetRoles() (ret UpdateUserPayloadGetRolesRetType) { ret, _ = o.GetRolesOk() return ret @@ -113,15 +135,18 @@ func (o *UpdateUserPayload) GetRoles() (ret UpdateUserPayloadGetRolesRetType) { // GetRolesOk returns a tuple with the Roles 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 *UpdateUserPayload) GetRolesOk() (ret UpdateUserPayloadGetRolesRetType, ok bool) { return getUpdateUserPayloadGetRolesAttributeTypeOk(o.Roles) } // SetRoles sets field value +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *UpdateUserPayload) SetRoles(v UpdateUserPayloadGetRolesRetType) { setUpdateUserPayloadGetRolesAttributeType(&o.Roles, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUpdateUserPayloadGetDatabaseAttributeTypeOk(o.Database); ok { @@ -133,37 +158,45 @@ func (o UpdateUserPayload) 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 NullableUpdateUserPayload struct { value *UpdateUserPayload isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { 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 NullableUpdateUserPayload) 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 *NullableUpdateUserPayload) 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 NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { return &NullableUpdateUserPayload{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 NullableUpdateUserPayload) 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 *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/model_user.go b/services/mongodbflex/model_user.go index c11f8d991..346f1e318 100644 --- a/services/mongodbflex/model_user.go +++ b/services/mongodbflex/model_user.go @@ -8,6 +8,7 @@ API version: 2.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 mongodbflex import ( @@ -22,8 +23,10 @@ var _ MappedNullable = &User{} */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetDatabaseAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetDatabaseAttributeTypeOk(arg UserGetDatabaseAttributeType) (ret UserGetDatabaseRetType, ok bool) { if arg == nil { return ret, false @@ -31,11 +34,15 @@ func getUserGetDatabaseAttributeTypeOk(arg UserGetDatabaseAttributeType) (ret Us return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetDatabaseAttributeType(arg *UserGetDatabaseAttributeType, val UserGetDatabaseRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetDatabaseArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetDatabaseRetType = string /* @@ -43,8 +50,10 @@ type UserGetDatabaseRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetHostAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetHostAttributeTypeOk(arg UserGetHostAttributeType) (ret UserGetHostRetType, ok bool) { if arg == nil { return ret, false @@ -52,11 +61,15 @@ func getUserGetHostAttributeTypeOk(arg UserGetHostAttributeType) (ret UserGetHos return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetHostAttributeType(arg *UserGetHostAttributeType, val UserGetHostRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetHostArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetHostRetType = string /* @@ -64,8 +77,10 @@ type UserGetHostRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetIdAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetIdAttributeTypeOk(arg UserGetIdAttributeType) (ret UserGetIdRetType, ok bool) { if arg == nil { return ret, false @@ -73,11 +88,15 @@ func getUserGetIdAttributeTypeOk(arg UserGetIdAttributeType) (ret UserGetIdRetTy return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetIdAttributeType(arg *UserGetIdAttributeType, val UserGetIdRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetIdArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetIdRetType = string /* @@ -85,8 +104,10 @@ type UserGetIdRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPasswordAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetPasswordAttributeTypeOk(arg UserGetPasswordAttributeType) (ret UserGetPasswordRetType, ok bool) { if arg == nil { return ret, false @@ -94,11 +115,15 @@ func getUserGetPasswordAttributeTypeOk(arg UserGetPasswordAttributeType) (ret Us return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetPasswordAttributeType(arg *UserGetPasswordAttributeType, val UserGetPasswordRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPasswordArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPasswordRetType = string /* @@ -106,10 +131,16 @@ type UserGetPasswordRetType = string */ // isLong +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPortAttributeType = *int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPortArgType = int64 + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetPortRetType = int64 +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetPortAttributeTypeOk(arg UserGetPortAttributeType) (ret UserGetPortRetType, ok bool) { if arg == nil { return ret, false @@ -117,6 +148,7 @@ func getUserGetPortAttributeTypeOk(arg UserGetPortAttributeType) (ret UserGetPor return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetPortAttributeType(arg *UserGetPortAttributeType, val UserGetPortRetType) { *arg = &val } @@ -126,10 +158,16 @@ func setUserGetPortAttributeType(arg *UserGetPortAttributeType, val UserGetPortR */ // isArray +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetRolesAttributeType = *[]string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetRolesArgType = []string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetRolesRetType = []string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetRolesAttributeTypeOk(arg UserGetRolesAttributeType) (ret UserGetRolesRetType, ok bool) { if arg == nil { return ret, false @@ -137,6 +175,7 @@ func getUserGetRolesAttributeTypeOk(arg UserGetRolesAttributeType) (ret UserGetR return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetRolesAttributeType(arg *UserGetRolesAttributeType, val UserGetRolesRetType) { *arg = &val } @@ -146,8 +185,10 @@ func setUserGetRolesAttributeType(arg *UserGetRolesAttributeType, val UserGetRol */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUriAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetUriAttributeTypeOk(arg UserGetUriAttributeType) (ret UserGetUriRetType, ok bool) { if arg == nil { return ret, false @@ -155,11 +196,15 @@ func getUserGetUriAttributeTypeOk(arg UserGetUriAttributeType) (ret UserGetUriRe return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetUriAttributeType(arg *UserGetUriAttributeType, val UserGetUriRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUriArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUriRetType = string /* @@ -167,8 +212,10 @@ type UserGetUriRetType = string */ // isNotNullableString +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUsernameAttributeType = *string +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func getUserGetUsernameAttributeTypeOk(arg UserGetUsernameAttributeType) (ret UserGetUsernameRetType, ok bool) { if arg == nil { return ret, false @@ -176,14 +223,19 @@ func getUserGetUsernameAttributeTypeOk(arg UserGetUsernameAttributeType) (ret Us return *arg, true } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func setUserGetUsernameAttributeType(arg *UserGetUsernameAttributeType, val UserGetUsernameRetType) { *arg = &val } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUsernameArgType = string + +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type UserGetUsernameRetType = string // User struct for User +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead type User struct { Database UserGetDatabaseAttributeType `json:"database,omitempty"` Host UserGetHostAttributeType `json:"host,omitempty"` @@ -200,6 +252,7 @@ type User 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 NewUser() *User { this := User{} return &this @@ -208,12 +261,14 @@ func NewUser() *User { // NewUserWithDefaults instantiates a new User object // This 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 NewUserWithDefaults() *User { this := User{} return &this } // GetDatabase returns the Database 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 *User) GetDatabase() (res UserGetDatabaseRetType) { res, _ = o.GetDatabaseOk() return @@ -221,22 +276,26 @@ func (o *User) GetDatabase() (res UserGetDatabaseRetType) { // GetDatabaseOk returns a tuple with the Database 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 *User) GetDatabaseOk() (ret UserGetDatabaseRetType, ok bool) { return getUserGetDatabaseAttributeTypeOk(o.Database) } // HasDatabase 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 *User) HasDatabase() bool { _, ok := o.GetDatabaseOk() return ok } // SetDatabase gets a reference to the given string and assigns it to the Database field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetDatabase(v UserGetDatabaseRetType) { setUserGetDatabaseAttributeType(&o.Database, v) } // GetHost returns the Host 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 *User) GetHost() (res UserGetHostRetType) { res, _ = o.GetHostOk() return @@ -244,22 +303,26 @@ func (o *User) GetHost() (res UserGetHostRetType) { // GetHostOk returns a tuple with the Host 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 *User) GetHostOk() (ret UserGetHostRetType, ok bool) { return getUserGetHostAttributeTypeOk(o.Host) } // HasHost 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 *User) HasHost() bool { _, ok := o.GetHostOk() return ok } // SetHost gets a reference to the given string and assigns it to the Host field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetHost(v UserGetHostRetType) { setUserGetHostAttributeType(&o.Host, 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 *User) GetId() (res UserGetIdRetType) { res, _ = o.GetIdOk() return @@ -267,22 +330,26 @@ func (o *User) GetId() (res UserGetIdRetType) { // 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 *User) GetIdOk() (ret UserGetIdRetType, ok bool) { return getUserGetIdAttributeTypeOk(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 *User) 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 *User) SetId(v UserGetIdRetType) { setUserGetIdAttributeType(&o.Id, v) } // GetPassword returns the Password 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 *User) GetPassword() (res UserGetPasswordRetType) { res, _ = o.GetPasswordOk() return @@ -290,22 +357,26 @@ func (o *User) GetPassword() (res UserGetPasswordRetType) { // GetPasswordOk returns a tuple with the Password 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 *User) GetPasswordOk() (ret UserGetPasswordRetType, ok bool) { return getUserGetPasswordAttributeTypeOk(o.Password) } // HasPassword 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 *User) HasPassword() bool { _, ok := o.GetPasswordOk() return ok } // SetPassword gets a reference to the given string and assigns it to the Password field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetPassword(v UserGetPasswordRetType) { setUserGetPasswordAttributeType(&o.Password, v) } // GetPort returns the Port 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 *User) GetPort() (res UserGetPortRetType) { res, _ = o.GetPortOk() return @@ -313,22 +384,26 @@ func (o *User) GetPort() (res UserGetPortRetType) { // GetPortOk returns a tuple with the Port 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 *User) GetPortOk() (ret UserGetPortRetType, ok bool) { return getUserGetPortAttributeTypeOk(o.Port) } // HasPort 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 *User) HasPort() bool { _, ok := o.GetPortOk() return ok } // SetPort gets a reference to the given int64 and assigns it to the Port field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetPort(v UserGetPortRetType) { setUserGetPortAttributeType(&o.Port, v) } // GetRoles returns the Roles 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 *User) GetRoles() (res UserGetRolesRetType) { res, _ = o.GetRolesOk() return @@ -336,22 +411,26 @@ func (o *User) GetRoles() (res UserGetRolesRetType) { // GetRolesOk returns a tuple with the Roles 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 *User) GetRolesOk() (ret UserGetRolesRetType, ok bool) { return getUserGetRolesAttributeTypeOk(o.Roles) } // HasRoles 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 *User) HasRoles() bool { _, ok := o.GetRolesOk() return ok } // SetRoles gets a reference to the given []string and assigns it to the Roles field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetRoles(v UserGetRolesRetType) { setUserGetRolesAttributeType(&o.Roles, v) } // GetUri returns the Uri 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 *User) GetUri() (res UserGetUriRetType) { res, _ = o.GetUriOk() return @@ -359,22 +438,26 @@ func (o *User) GetUri() (res UserGetUriRetType) { // GetUriOk returns a tuple with the Uri 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 *User) GetUriOk() (ret UserGetUriRetType, ok bool) { return getUserGetUriAttributeTypeOk(o.Uri) } // HasUri 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 *User) HasUri() bool { _, ok := o.GetUriOk() return ok } // SetUri gets a reference to the given string and assigns it to the Uri field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetUri(v UserGetUriRetType) { setUserGetUriAttributeType(&o.Uri, v) } // GetUsername returns the Username 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 *User) GetUsername() (res UserGetUsernameRetType) { res, _ = o.GetUsernameOk() return @@ -382,21 +465,25 @@ func (o *User) GetUsername() (res UserGetUsernameRetType) { // GetUsernameOk returns a tuple with the Username 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 *User) GetUsernameOk() (ret UserGetUsernameRetType, ok bool) { return getUserGetUsernameAttributeTypeOk(o.Username) } // HasUsername 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 *User) HasUsername() bool { _, ok := o.GetUsernameOk() return ok } // SetUsername gets a reference to the given string and assigns it to the Username field. +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o *User) SetUsername(v UserGetUsernameRetType) { setUserGetUsernameAttributeType(&o.Username, v) } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (o User) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getUserGetDatabaseAttributeTypeOk(o.Database); ok { @@ -426,37 +513,45 @@ func (o User) 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 NullableUser struct { value *User isSet bool } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v NullableUser) Get() *User { return v.value } +// Deprecated: Will be removed after 2026-09-30. Move to the packages generated for each available API version instead func (v *NullableUser) Set(val *User) { 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 NullableUser) 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 *NullableUser) 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 NewNullableUser(val *User) *NullableUser { return &NullableUser{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 NullableUser) 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 *NullableUser) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) diff --git a/services/mongodbflex/oas_commit b/services/mongodbflex/oas_commit index 588ee296b..f5e4510f9 100644 --- a/services/mongodbflex/oas_commit +++ b/services/mongodbflex/oas_commit @@ -1 +1 @@ -964ac4ce34f0b6417f2496a1d48585c4926dee3a +73b7457504497158e2836857f5ca4d2e6186ee5d diff --git a/services/mongodbflex/utils.go b/services/mongodbflex/utils.go index e86ef12de..c5a7aade5 100644 --- a/services/mongodbflex/utils.go +++ b/services/mongodbflex/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/mongodbflex/v1api/api_default.go b/services/mongodbflex/v1api/api_default.go new file mode 100644 index 000000000..9eea681b4 --- /dev/null +++ b/services/mongodbflex/v1api/api_default.go @@ -0,0 +1,4244 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// 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 { + + /* + CloneInstance Clone instance + + Clone an instance via PIT restore
Note that the Timestamp is a RFC3339 standard and uses by default UTC time format
+ As an example a valid timestamp look like "2023-04-20T15:05:15Z" + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiCloneInstanceRequest + */ + CloneInstance(ctx context.Context, projectId string, instanceId string) ApiCloneInstanceRequest + + // CloneInstanceExecute executes the request + // @return CloneInstanceResponse + CloneInstanceExecute(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) + + /* + CreateInstance Create instance + + Create and deploys an instance
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiCreateInstanceRequest + */ + CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest + + // CreateInstanceExecute executes the request + // @return CreateInstanceResponse + CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) + + /* + CreateUser Create User + + create a new user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiCreateUserRequest + */ + CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest + + // CreateUserExecute executes the request + // @return CreateUserResponse + CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) + + /* + DeleteInstance Delete instance + + removes an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiDeleteInstanceRequest + */ + DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest + + // DeleteInstanceExecute executes the request + DeleteInstanceExecute(r ApiDeleteInstanceRequest) error + + /* + DeleteUser Delete User + + delete mongodb user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiDeleteUserRequest + */ + DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest + + // DeleteUserExecute executes the request + DeleteUserExecute(r ApiDeleteUserRequest) error + + /* + GetBackup Get backup + + Get details about a specific backup + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param backupId backup id + @return ApiGetBackupRequest + */ + GetBackup(ctx context.Context, projectId string, instanceId string, backupId string) ApiGetBackupRequest + + // GetBackupExecute executes the request + // @return GetBackupResponse + GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) + + /* + GetInstance Get instance + + gets information of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiGetInstanceRequest + */ + GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest + + // GetInstanceExecute executes the request + // @return GetInstanceResponse + GetInstanceExecute(r ApiGetInstanceRequest) (*GetInstanceResponse, error) + + /* + GetUser Get User + + get detailed information of a user of a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiGetUserRequest + */ + GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest + + // GetUserExecute executes the request + // @return GetUserResponse + GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) + + /* + ListAdvisorSlowQueries Get slow queries + + gets slow queries from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListAdvisorSlowQueriesRequest + */ + ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string) ApiListAdvisorSlowQueriesRequest + + // ListAdvisorSlowQueriesExecute executes the request + // @return HandlersInstancesSlowQueriesResponse + ListAdvisorSlowQueriesExecute(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) + + /* + ListBackups List backup + + List backups of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListBackupsRequest + */ + ListBackups(ctx context.Context, projectId string, instanceId string) ApiListBackupsRequest + + // ListBackupsExecute executes the request + // @return ListBackupsResponse + ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) + + /* + ListFlavors Flavors + + returns all possible flavors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiListFlavorsRequest + */ + ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest + + // ListFlavorsExecute executes the request + // @return ListFlavorsResponse + ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) + + /* + ListInstances List Instances + + list all instances for a projectID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiListInstancesRequest + */ + ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest + + // ListInstancesExecute executes the request + // @return ListInstancesResponse + ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) + + /* + ListMetrics Metrics + + returns metrics for an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param metric metric type + @return ApiListMetricsRequest + */ + ListMetrics(ctx context.Context, projectId string, instanceId string, metric string) ApiListMetricsRequest + + // ListMetricsExecute executes the request + // @return ListMetricsResponse + ListMetricsExecute(r ApiListMetricsRequest) (*ListMetricsResponse, error) + + /* + ListRestoreJobs List restore jobs + + List restore jobs of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListRestoreJobsRequest + */ + ListRestoreJobs(ctx context.Context, projectId string, instanceId string) ApiListRestoreJobsRequest + + // ListRestoreJobsExecute executes the request + // @return ListRestoreJobsResponse + ListRestoreJobsExecute(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) + + /* + ListStorages Get storage + + returns the storage for a certain flavor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param flavor flavor id + @return ApiListStoragesRequest + */ + ListStorages(ctx context.Context, projectId string, flavor string) ApiListStoragesRequest + + // ListStoragesExecute executes the request + // @return ListStoragesResponse + ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) + + /* + ListSuggestedIndexes Get suggested indexes + + gets suggested indexes from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListSuggestedIndexesRequest + */ + ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string) ApiListSuggestedIndexesRequest + + // ListSuggestedIndexesExecute executes the request + // @return HandlersInstancesSuggestedIndexesResponse + ListSuggestedIndexesExecute(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) + + /* + ListUsers List Users + + list all users for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListUsersRequest + */ + ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest + + // ListUsersExecute executes the request + // @return ListUsersResponse + ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) + + /* + ListVersions Get versions + + returns all available versions for creating endpoint + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiListVersionsRequest + */ + ListVersions(ctx context.Context, projectId string) ApiListVersionsRequest + + // ListVersionsExecute executes the request + // @return ListVersionsResponse + ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) + + /* + PartialUpdateInstance Patch endpoint + + Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiPartialUpdateInstanceRequest + */ + PartialUpdateInstance(ctx context.Context, projectId string, instanceId string) ApiPartialUpdateInstanceRequest + + // PartialUpdateInstanceExecute executes the request + // @return UpdateInstanceResponse + PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) + + /* + PartialUpdateUser Update User + + updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiPartialUpdateUserRequest + */ + PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiPartialUpdateUserRequest + + // PartialUpdateUserExecute executes the request + PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) error + + /* + ResetUser Reset User + + resets mongodb user's password + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiResetUserRequest + */ + ResetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiResetUserRequest + + // ResetUserExecute executes the request + // @return User + ResetUserExecute(r ApiResetUserRequest) (*User, error) + + /* + RestoreInstance Restore instance + + Restore an instance based on snapshot + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiRestoreInstanceRequest + */ + RestoreInstance(ctx context.Context, projectId string, instanceId string) ApiRestoreInstanceRequest + + // RestoreInstanceExecute executes the request + // @return RestoreInstanceResponse + RestoreInstanceExecute(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) + + /* + UpdateBackupSchedule Update schedule + + Updates a backup schedule
Note that the time format is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiUpdateBackupScheduleRequest + */ + UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string) ApiUpdateBackupScheduleRequest + + // UpdateBackupScheduleExecute executes the request + // @return BackupSchedule + UpdateBackupScheduleExecute(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) + + /* + UpdateInstance Put endpoint + + Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiUpdateInstanceRequest + */ + UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest + + // UpdateInstanceExecute executes the request + // @return UpdateInstanceResponse + UpdateInstanceExecute(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) + + /* + UpdateUser Update User + + updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiUpdateUserRequest + */ + UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest + + // UpdateUserExecute executes the request + UpdateUserExecute(r ApiUpdateUserRequest) error +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCloneInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + cloneInstancePayload *CloneInstancePayload +} + +// payload +func (r ApiCloneInstanceRequest) CloneInstancePayload(cloneInstancePayload CloneInstancePayload) ApiCloneInstanceRequest { + r.cloneInstancePayload = &cloneInstancePayload + return r +} + +func (r ApiCloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { + return r.ApiService.CloneInstanceExecute(r) +} + +/* +CloneInstance Clone instance + +Clone an instance via PIT restore
Note that the Timestamp is a RFC3339 standard and uses by default UTC time format
+As an example a valid timestamp look like "2023-04-20T15:05:15Z" + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiCloneInstanceRequest +*/ +func (a *DefaultAPIService) CloneInstance(ctx context.Context, projectId string, instanceId string) ApiCloneInstanceRequest { + return ApiCloneInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return CloneInstanceResponse +func (a *DefaultAPIService) CloneInstanceExecute(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CloneInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CloneInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.cloneInstancePayload == nil { + return localVarReturnValue, reportError("cloneInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cloneInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiCreateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + createInstancePayload *CreateInstancePayload +} + +// payload +func (r ApiCreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { + r.createInstancePayload = &createInstancePayload + return r +} + +func (r ApiCreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { + return r.ApiService.CreateInstanceExecute(r) +} + +/* +CreateInstance Create instance + +Create and deploys an instance
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiCreateInstanceRequest +*/ +func (a *DefaultAPIService) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return CreateInstanceResponse +func (a *DefaultAPIService) CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createInstancePayload == nil { + return localVarReturnValue, reportError("createInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiCreateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + createUserPayload *CreateUserPayload +} + +// payload +func (r ApiCreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { + r.createUserPayload = &createUserPayload + return r +} + +func (r ApiCreateUserRequest) Execute() (*CreateUserResponse, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Create User + +create a new user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiCreateUserRequest +*/ +func (a *DefaultAPIService) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return CreateUserResponse +func (a *DefaultAPIService) CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.createUserPayload == nil { + return localVarReturnValue, reportError("createUserPayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createUserPayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + 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 + } + 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 ApiDeleteInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiDeleteInstanceRequest) Execute() error { + return r.ApiService.DeleteInstanceExecute(r) +} + +/* +DeleteInstance Delete instance + +removes an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiDeleteInstanceRequest +*/ +func (a *DefaultAPIService) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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{"*/*"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return 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 newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string +} + +func (r ApiDeleteUserRequest) Execute() error { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Delete User + +delete mongodb user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiDeleteUserRequest +*/ +func (a *DefaultAPIService) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteUserExecute(r ApiDeleteUserRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return 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 newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiGetBackupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + backupId string +} + +func (r ApiGetBackupRequest) Execute() (*GetBackupResponse, error) { + return r.ApiService.GetBackupExecute(r) +} + +/* +GetBackup Get backup + +Get details about a specific backup + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param backupId backup id + @return ApiGetBackupRequest +*/ +func (a *DefaultAPIService) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string) ApiGetBackupRequest { + return ApiGetBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + backupId: backupId, + } +} + +// Execute executes the request +// +// @return GetBackupResponse +func (a *DefaultAPIService) GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetBackupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetBackup") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"backupId"+"}", url.PathEscape(parameterValueToString(r.backupId, "backupId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiGetInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiGetInstanceRequest) Execute() (*GetInstanceResponse, error) { + return r.ApiService.GetInstanceExecute(r) +} + +/* +GetInstance Get instance + +gets information of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiGetInstanceRequest +*/ +func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return GetInstanceResponse +func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*GetInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + 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 ApiGetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string +} + +func (r ApiGetUserRequest) Execute() (*GetUserResponse, error) { + return r.ApiService.GetUserExecute(r) +} + +/* +GetUser Get User + +get detailed information of a user of a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiGetUserRequest +*/ +func (a *DefaultAPIService) GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +// +// @return GetUserResponse +func (a *DefaultAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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"} + + // 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 == 404 { + 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 + } + 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 ApiListAdvisorSlowQueriesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesResponse, error) { + return r.ApiService.ListAdvisorSlowQueriesExecute(r) +} + +/* +ListAdvisorSlowQueries Get slow queries + +gets slow queries from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListAdvisorSlowQueriesRequest +*/ +func (a *DefaultAPIService) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string) ApiListAdvisorSlowQueriesRequest { + return ApiListAdvisorSlowQueriesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return HandlersInstancesSlowQueriesResponse +func (a *DefaultAPIService) ListAdvisorSlowQueriesExecute(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HandlersInstancesSlowQueriesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListAdvisorSlowQueries") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/advisor/slow-queries" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListBackupsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListBackupsRequest) Execute() (*ListBackupsResponse, error) { + return r.ApiService.ListBackupsExecute(r) +} + +/* +ListBackups List backup + +List backups of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListBackupsRequest +*/ +func (a *DefaultAPIService) ListBackups(ctx context.Context, projectId string, instanceId string) ApiListBackupsRequest { + return ApiListBackupsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListBackupsResponse +func (a *DefaultAPIService) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListBackupsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListBackups") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/backups" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiListFlavorsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { + return r.ApiService.ListFlavorsExecute(r) +} + +/* +ListFlavors Flavors + +returns all possible flavors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiListFlavorsRequest +*/ +func (a *DefaultAPIService) ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest { + return ApiListFlavorsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListFlavorsResponse +func (a *DefaultAPIService) ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListFlavorsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListFlavors") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/flavors" + 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"} + + // 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 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 + } + 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 ApiListInstancesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + tag *string +} + +// instance tag +func (r ApiListInstancesRequest) Tag(tag string) ApiListInstancesRequest { + r.tag = &tag + return r +} + +func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { + return r.ApiService.ListInstancesExecute(r) +} + +/* +ListInstances List Instances + +list all instances for a projectID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiListInstancesRequest +*/ +func (a *DefaultAPIService) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListInstancesResponse +func (a *DefaultAPIService) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListInstancesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListInstances") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.tag == nil { + return localVarReturnValue, reportError("tag is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "form", "") + // 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"} + + // 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 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 + } + 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 ApiListMetricsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + metric string + granularity *string + period *string + start *string + end *string +} + +// granularity +func (r ApiListMetricsRequest) Granularity(granularity string) ApiListMetricsRequest { + r.granularity = &granularity + return r +} + +// period +func (r ApiListMetricsRequest) Period(period string) ApiListMetricsRequest { + r.period = &period + return r +} + +// period start +func (r ApiListMetricsRequest) Start(start string) ApiListMetricsRequest { + r.start = &start + return r +} + +// period end +func (r ApiListMetricsRequest) End(end string) ApiListMetricsRequest { + r.end = &end + return r +} + +func (r ApiListMetricsRequest) Execute() (*ListMetricsResponse, error) { + return r.ApiService.ListMetricsExecute(r) +} + +/* +ListMetrics Metrics + +returns metrics for an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param metric metric type + @return ApiListMetricsRequest +*/ +func (a *DefaultAPIService) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string) ApiListMetricsRequest { + return ApiListMetricsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + metric: metric, + } +} + +// Execute executes the request +// +// @return ListMetricsResponse +func (a *DefaultAPIService) ListMetricsExecute(r ApiListMetricsRequest) (*ListMetricsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListMetricsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListMetrics") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/metrics/{metric}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(parameterValueToString(r.metric, "metric")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.granularity == nil { + return localVarReturnValue, reportError("granularity is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "granularity", r.granularity, "form", "") + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "form", "") + } + if r.start != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start", r.start, "form", "") + } + if r.end != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "end", r.end, "form", "") + } + // 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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListRestoreJobsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { + return r.ApiService.ListRestoreJobsExecute(r) +} + +/* +ListRestoreJobs List restore jobs + +List restore jobs of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListRestoreJobsRequest +*/ +func (a *DefaultAPIService) ListRestoreJobs(ctx context.Context, projectId string, instanceId string) ApiListRestoreJobsRequest { + return ApiListRestoreJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListRestoreJobsResponse +func (a *DefaultAPIService) ListRestoreJobsExecute(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListRestoreJobsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListRestoreJobs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/restores" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiListStoragesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + flavor string +} + +func (r ApiListStoragesRequest) Execute() (*ListStoragesResponse, error) { + return r.ApiService.ListStoragesExecute(r) +} + +/* +ListStorages Get storage + +returns the storage for a certain flavor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param flavor flavor id + @return ApiListStoragesRequest +*/ +func (a *DefaultAPIService) ListStorages(ctx context.Context, projectId string, flavor string) ApiListStoragesRequest { + return ApiListStoragesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + flavor: flavor, + } +} + +// Execute executes the request +// +// @return ListStoragesResponse +func (a *DefaultAPIService) ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListStoragesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListStorages") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/storages/{flavor}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flavor"+"}", url.PathEscape(parameterValueToString(r.flavor, "flavor")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiListSuggestedIndexesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndexesResponse, error) { + return r.ApiService.ListSuggestedIndexesExecute(r) +} + +/* +ListSuggestedIndexes Get suggested indexes + +gets suggested indexes from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListSuggestedIndexesRequest +*/ +func (a *DefaultAPIService) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string) ApiListSuggestedIndexesRequest { + return ApiListSuggestedIndexesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return HandlersInstancesSuggestedIndexesResponse +func (a *DefaultAPIService) ListSuggestedIndexesExecute(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HandlersInstancesSuggestedIndexesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListSuggestedIndexes") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/advisor/suggested-indexes" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListUsersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string +} + +func (r ApiListUsersRequest) Execute() (*ListUsersResponse, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers List Users + +list all users for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiListUsersRequest +*/ +func (a *DefaultAPIService) ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return ListUsersResponse +func (a *DefaultAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListUsersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListUsers") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 == 404 { + 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 + } + 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 ApiListVersionsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string +} + +func (r ApiListVersionsRequest) Execute() (*ListVersionsResponse, error) { + return r.ApiService.ListVersionsExecute(r) +} + +/* +ListVersions Get versions + +returns all available versions for creating endpoint + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @return ApiListVersionsRequest +*/ +func (a *DefaultAPIService) ListVersions(ctx context.Context, projectId string) ApiListVersionsRequest { + return ApiListVersionsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// Execute executes the request +// +// @return ListVersionsResponse +func (a *DefaultAPIService) ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListVersionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVersions") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/versions" + 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"} + + // 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 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 ApiPartialUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + partialUpdateInstancePayload *PartialUpdateInstancePayload +} + +// payload +func (r ApiPartialUpdateInstanceRequest) PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest { + r.partialUpdateInstancePayload = &partialUpdateInstancePayload + return r +} + +func (r ApiPartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { + return r.ApiService.PartialUpdateInstanceExecute(r) +} + +/* +PartialUpdateInstance Patch endpoint + +Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiPartialUpdateInstanceRequest +*/ +func (a *DefaultAPIService) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string) ApiPartialUpdateInstanceRequest { + return ApiPartialUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return UpdateInstanceResponse +func (a *DefaultAPIService) PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.partialUpdateInstancePayload == nil { + return localVarReturnValue, reportError("partialUpdateInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.partialUpdateInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + 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 + } + 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 ApiPartialUpdateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + partialUpdateUserPayload *PartialUpdateUserPayload +} + +// payload +func (r ApiPartialUpdateUserRequest) PartialUpdateUserPayload(partialUpdateUserPayload PartialUpdateUserPayload) ApiPartialUpdateUserRequest { + r.partialUpdateUserPayload = &partialUpdateUserPayload + return r +} + +func (r ApiPartialUpdateUserRequest) Execute() error { + return r.ApiService.PartialUpdateUserExecute(r) +} + +/* +PartialUpdateUser Update User + +updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiPartialUpdateUserRequest +*/ +func (a *DefaultAPIService) PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiPartialUpdateUserRequest { + return ApiPartialUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) error { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.partialUpdateUserPayload == nil { + return reportError("partialUpdateUserPayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.partialUpdateUserPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiResetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string +} + +func (r ApiResetUserRequest) Execute() (*User, error) { + return r.ApiService.ResetUserExecute(r) +} + +/* +ResetUser Reset User + +resets mongodb user's password + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiResetUserRequest +*/ +func (a *DefaultAPIService) ResetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiResetUserRequest { + return ApiResetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +// +// @return User +func (a *DefaultAPIService) ResetUserExecute(r ApiResetUserRequest) (*User, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ResetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}/reset" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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"} + + // 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 == 404 { + 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 + } + 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 ApiRestoreInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + restoreInstancePayload *RestoreInstancePayload +} + +// payload +func (r ApiRestoreInstanceRequest) RestoreInstancePayload(restoreInstancePayload RestoreInstancePayload) ApiRestoreInstanceRequest { + r.restoreInstancePayload = &restoreInstancePayload + return r +} + +func (r ApiRestoreInstanceRequest) Execute() (*RestoreInstanceResponse, error) { + return r.ApiService.RestoreInstanceExecute(r) +} + +/* +RestoreInstance Restore instance + +Restore an instance based on snapshot + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiRestoreInstanceRequest +*/ +func (a *DefaultAPIService) RestoreInstance(ctx context.Context, projectId string, instanceId string) ApiRestoreInstanceRequest { + return ApiRestoreInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return RestoreInstanceResponse +func (a *DefaultAPIService) RestoreInstanceExecute(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RestoreInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/restores" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.restoreInstancePayload == nil { + return localVarReturnValue, reportError("restoreInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.restoreInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiUpdateBackupScheduleRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + updateBackupSchedulePayload *UpdateBackupSchedulePayload +} + +// payload +func (r ApiUpdateBackupScheduleRequest) UpdateBackupSchedulePayload(updateBackupSchedulePayload UpdateBackupSchedulePayload) ApiUpdateBackupScheduleRequest { + r.updateBackupSchedulePayload = &updateBackupSchedulePayload + return r +} + +func (r ApiUpdateBackupScheduleRequest) Execute() (*BackupSchedule, error) { + return r.ApiService.UpdateBackupScheduleExecute(r) +} + +/* +UpdateBackupSchedule Update schedule + +Updates a backup schedule
Note that the time format is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiUpdateBackupScheduleRequest +*/ +func (a *DefaultAPIService) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string) ApiUpdateBackupScheduleRequest { + return ApiUpdateBackupScheduleRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return BackupSchedule +func (a *DefaultAPIService) UpdateBackupScheduleExecute(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BackupSchedule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateBackupSchedule") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/backups" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateBackupSchedulePayload == nil { + return localVarReturnValue, reportError("updateBackupSchedulePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateBackupSchedulePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + updateInstancePayload *UpdateInstancePayload +} + +// payload +func (r ApiUpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload + return r +} + +func (r ApiUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { + return r.ApiService.UpdateInstanceExecute(r) +} + +/* +UpdateInstance Put endpoint + +Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @return ApiUpdateInstanceRequest +*/ +func (a *DefaultAPIService) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// Execute executes the request +// +// @return UpdateInstanceResponse +func (a *DefaultAPIService) UpdateInstanceExecute(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateInstancePayload == nil { + return localVarReturnValue, reportError("updateInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + 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 + } + 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 ApiUpdateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + updateUserPayload *UpdateUserPayload +} + +// payload +func (r ApiUpdateUserRequest) UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest { + r.updateUserPayload = &updateUserPayload + return r +} + +func (r ApiUpdateUserRequest) Execute() error { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Update User + +updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @return ApiUpdateUserRequest +*/ +func (a *DefaultAPIService) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateUserExecute(r ApiUpdateUserRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.updateUserPayload == nil { + return reportError("updateUserPayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateUserPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} diff --git a/services/mongodbflex/v1api/api_default_mock.go b/services/mongodbflex/v1api/api_default_mock.go new file mode 100644 index 000000000..66bb6b9c3 --- /dev/null +++ b/services/mongodbflex/v1api/api_default_mock.go @@ -0,0 +1,548 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// 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 { + // CloneInstanceExecuteMock can be populated to implement the behavior of the CloneInstanceExecute function of this mock + CloneInstanceExecuteMock *func(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) + // CreateInstanceExecuteMock can be populated to implement the behavior of the CreateInstanceExecute function of this mock + CreateInstanceExecuteMock *func(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) + // CreateUserExecuteMock can be populated to implement the behavior of the CreateUserExecute function of this mock + CreateUserExecuteMock *func(r ApiCreateUserRequest) (*CreateUserResponse, error) + // DeleteInstanceExecuteMock can be populated to implement the behavior of the DeleteInstanceExecute function of this mock + DeleteInstanceExecuteMock *func(r ApiDeleteInstanceRequest) error + // DeleteUserExecuteMock can be populated to implement the behavior of the DeleteUserExecute function of this mock + DeleteUserExecuteMock *func(r ApiDeleteUserRequest) error + // GetBackupExecuteMock can be populated to implement the behavior of the GetBackupExecute function of this mock + GetBackupExecuteMock *func(r ApiGetBackupRequest) (*GetBackupResponse, error) + // GetInstanceExecuteMock can be populated to implement the behavior of the GetInstanceExecute function of this mock + GetInstanceExecuteMock *func(r ApiGetInstanceRequest) (*GetInstanceResponse, error) + // GetUserExecuteMock can be populated to implement the behavior of the GetUserExecute function of this mock + GetUserExecuteMock *func(r ApiGetUserRequest) (*GetUserResponse, error) + // ListAdvisorSlowQueriesExecuteMock can be populated to implement the behavior of the ListAdvisorSlowQueriesExecute function of this mock + ListAdvisorSlowQueriesExecuteMock *func(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) + // ListBackupsExecuteMock can be populated to implement the behavior of the ListBackupsExecute function of this mock + ListBackupsExecuteMock *func(r ApiListBackupsRequest) (*ListBackupsResponse, error) + // ListFlavorsExecuteMock can be populated to implement the behavior of the ListFlavorsExecute function of this mock + ListFlavorsExecuteMock *func(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) + // ListInstancesExecuteMock can be populated to implement the behavior of the ListInstancesExecute function of this mock + ListInstancesExecuteMock *func(r ApiListInstancesRequest) (*ListInstancesResponse, error) + // ListMetricsExecuteMock can be populated to implement the behavior of the ListMetricsExecute function of this mock + ListMetricsExecuteMock *func(r ApiListMetricsRequest) (*ListMetricsResponse, error) + // ListRestoreJobsExecuteMock can be populated to implement the behavior of the ListRestoreJobsExecute function of this mock + ListRestoreJobsExecuteMock *func(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) + // ListStoragesExecuteMock can be populated to implement the behavior of the ListStoragesExecute function of this mock + ListStoragesExecuteMock *func(r ApiListStoragesRequest) (*ListStoragesResponse, error) + // ListSuggestedIndexesExecuteMock can be populated to implement the behavior of the ListSuggestedIndexesExecute function of this mock + ListSuggestedIndexesExecuteMock *func(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) + // ListUsersExecuteMock can be populated to implement the behavior of the ListUsersExecute function of this mock + ListUsersExecuteMock *func(r ApiListUsersRequest) (*ListUsersResponse, error) + // ListVersionsExecuteMock can be populated to implement the behavior of the ListVersionsExecute function of this mock + ListVersionsExecuteMock *func(r ApiListVersionsRequest) (*ListVersionsResponse, error) + // PartialUpdateInstanceExecuteMock can be populated to implement the behavior of the PartialUpdateInstanceExecute function of this mock + PartialUpdateInstanceExecuteMock *func(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) + // PartialUpdateUserExecuteMock can be populated to implement the behavior of the PartialUpdateUserExecute function of this mock + PartialUpdateUserExecuteMock *func(r ApiPartialUpdateUserRequest) error + // ResetUserExecuteMock can be populated to implement the behavior of the ResetUserExecute function of this mock + ResetUserExecuteMock *func(r ApiResetUserRequest) (*User, error) + // RestoreInstanceExecuteMock can be populated to implement the behavior of the RestoreInstanceExecute function of this mock + RestoreInstanceExecuteMock *func(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) + // UpdateBackupScheduleExecuteMock can be populated to implement the behavior of the UpdateBackupScheduleExecute function of this mock + UpdateBackupScheduleExecuteMock *func(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) + // UpdateInstanceExecuteMock can be populated to implement the behavior of the UpdateInstanceExecute function of this mock + UpdateInstanceExecuteMock *func(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) + // UpdateUserExecuteMock can be populated to implement the behavior of the UpdateUserExecute function of this mock + UpdateUserExecuteMock *func(r ApiUpdateUserRequest) error +} + +func (a DefaultAPIServiceMock) CloneInstance(ctx context.Context, projectId string, instanceId string) ApiCloneInstanceRequest { + return ApiCloneInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// CloneInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CloneInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CloneInstanceExecute(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) { + if a.CloneInstanceExecuteMock == nil { + var localVarReturnValue *CloneInstanceResponse + return localVarReturnValue, nil + } + + return (*a.CloneInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// CreateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) { + if a.CreateInstanceExecuteMock == nil { + var localVarReturnValue *CreateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.CreateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// CreateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) { + if a.CreateUserExecuteMock == nil { + var localVarReturnValue *CreateUserResponse + return localVarReturnValue, nil + } + + return (*a.CreateUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// DeleteInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + if a.DeleteInstanceExecuteMock == nil { + return nil + } + + return (*a.DeleteInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// DeleteUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteUserExecute(r ApiDeleteUserRequest) error { + if a.DeleteUserExecuteMock == nil { + return nil + } + + return (*a.DeleteUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string) ApiGetBackupRequest { + return ApiGetBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + backupId: backupId, + } +} + +// GetBackupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetBackupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) { + if a.GetBackupExecuteMock == nil { + var localVarReturnValue *GetBackupResponse + return localVarReturnValue, nil + } + + return (*a.GetBackupExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// GetInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetInstanceExecute(r ApiGetInstanceRequest) (*GetInstanceResponse, error) { + if a.GetInstanceExecuteMock == nil { + var localVarReturnValue *GetInstanceResponse + return localVarReturnValue, nil + } + + return (*a.GetInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// GetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) { + if a.GetUserExecuteMock == nil { + var localVarReturnValue *GetUserResponse + return localVarReturnValue, nil + } + + return (*a.GetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string) ApiListAdvisorSlowQueriesRequest { + return ApiListAdvisorSlowQueriesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListAdvisorSlowQueriesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListAdvisorSlowQueriesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListAdvisorSlowQueriesExecute(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) { + if a.ListAdvisorSlowQueriesExecuteMock == nil { + var localVarReturnValue *HandlersInstancesSlowQueriesResponse + return localVarReturnValue, nil + } + + return (*a.ListAdvisorSlowQueriesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListBackups(ctx context.Context, projectId string, instanceId string) ApiListBackupsRequest { + return ApiListBackupsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListBackupsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListBackupsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) { + if a.ListBackupsExecuteMock == nil { + var localVarReturnValue *ListBackupsResponse + return localVarReturnValue, nil + } + + return (*a.ListBackupsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest { + return ApiListFlavorsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListFlavorsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListFlavorsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) { + if a.ListFlavorsExecuteMock == nil { + var localVarReturnValue *ListFlavorsResponse + return localVarReturnValue, nil + } + + return (*a.ListFlavorsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListInstancesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListInstancesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + if a.ListInstancesExecuteMock == nil { + var localVarReturnValue *ListInstancesResponse + return localVarReturnValue, nil + } + + return (*a.ListInstancesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string) ApiListMetricsRequest { + return ApiListMetricsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + metric: metric, + } +} + +// ListMetricsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListMetricsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListMetricsExecute(r ApiListMetricsRequest) (*ListMetricsResponse, error) { + if a.ListMetricsExecuteMock == nil { + var localVarReturnValue *ListMetricsResponse + return localVarReturnValue, nil + } + + return (*a.ListMetricsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListRestoreJobs(ctx context.Context, projectId string, instanceId string) ApiListRestoreJobsRequest { + return ApiListRestoreJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListRestoreJobsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListRestoreJobsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListRestoreJobsExecute(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) { + if a.ListRestoreJobsExecuteMock == nil { + var localVarReturnValue *ListRestoreJobsResponse + return localVarReturnValue, nil + } + + return (*a.ListRestoreJobsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListStorages(ctx context.Context, projectId string, flavor string) ApiListStoragesRequest { + return ApiListStoragesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + flavor: flavor, + } +} + +// ListStoragesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListStoragesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) { + if a.ListStoragesExecuteMock == nil { + var localVarReturnValue *ListStoragesResponse + return localVarReturnValue, nil + } + + return (*a.ListStoragesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string) ApiListSuggestedIndexesRequest { + return ApiListSuggestedIndexesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListSuggestedIndexesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListSuggestedIndexesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListSuggestedIndexesExecute(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) { + if a.ListSuggestedIndexesExecuteMock == nil { + var localVarReturnValue *HandlersInstancesSuggestedIndexesResponse + return localVarReturnValue, nil + } + + return (*a.ListSuggestedIndexesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// ListUsersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListUsersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) { + if a.ListUsersExecuteMock == nil { + var localVarReturnValue *ListUsersResponse + return localVarReturnValue, nil + } + + return (*a.ListUsersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListVersions(ctx context.Context, projectId string) ApiListVersionsRequest { + return ApiListVersionsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + } +} + +// ListVersionsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVersionsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) { + if a.ListVersionsExecuteMock == nil { + var localVarReturnValue *ListVersionsResponse + return localVarReturnValue, nil + } + + return (*a.ListVersionsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string) ApiPartialUpdateInstanceRequest { + return ApiPartialUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// PartialUpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + if a.PartialUpdateInstanceExecuteMock == nil { + var localVarReturnValue *UpdateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.PartialUpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiPartialUpdateUserRequest { + return ApiPartialUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// PartialUpdateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) error { + if a.PartialUpdateUserExecuteMock == nil { + return nil + } + + return (*a.PartialUpdateUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ResetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiResetUserRequest { + return ApiResetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// ResetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ResetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ResetUserExecute(r ApiResetUserRequest) (*User, error) { + if a.ResetUserExecuteMock == nil { + var localVarReturnValue *User + return localVarReturnValue, nil + } + + return (*a.ResetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) RestoreInstance(ctx context.Context, projectId string, instanceId string) ApiRestoreInstanceRequest { + return ApiRestoreInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// RestoreInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the RestoreInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) RestoreInstanceExecute(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) { + if a.RestoreInstanceExecuteMock == nil { + var localVarReturnValue *RestoreInstanceResponse + return localVarReturnValue, nil + } + + return (*a.RestoreInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string) ApiUpdateBackupScheduleRequest { + return ApiUpdateBackupScheduleRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// UpdateBackupScheduleExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateBackupScheduleExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateBackupScheduleExecute(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) { + if a.UpdateBackupScheduleExecuteMock == nil { + var localVarReturnValue *BackupSchedule + return localVarReturnValue, nil + } + + return (*a.UpdateBackupScheduleExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + } +} + +// UpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceExecute(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + if a.UpdateInstanceExecuteMock == nil { + var localVarReturnValue *UpdateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.UpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + } +} + +// UpdateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateUserExecute(r ApiUpdateUserRequest) error { + if a.UpdateUserExecuteMock == nil { + return nil + } + + return (*a.UpdateUserExecuteMock)(r) +} diff --git a/services/mongodbflex/v1api/client.go b/services/mongodbflex/v1api/client.go new file mode 100644 index 000000000..2e3b8baa1 --- /dev/null +++ b/services/mongodbflex/v1api/client.go @@ -0,0 +1,659 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// 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 MongoDB Service API 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/mongodbflex/v1api/configuration.go b/services/mongodbflex/v1api/configuration.go new file mode 100644 index 000000000..be2254970 --- /dev/null +++ b/services/mongodbflex/v1api/configuration.go @@ -0,0 +1,41 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// 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/mongodbflex", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://mongodb-flex-service.api.{region}stackit.cloud", + Description: "No description provided", + Variables: map[string]config.ServerVariable{ + "region": { + Description: "No description provided", + DefaultValue: "eu01.", + EnumValues: []string{ + "eu01.", + }, + }, + }, + }, + }, + OperationServers: map[string]config.ServerConfigurations{}, + } + return cfg +} diff --git a/services/mongodbflex/v1api/model_acl.go b/services/mongodbflex/v1api/model_acl.go new file mode 100644 index 000000000..9e64089ef --- /dev/null +++ b/services/mongodbflex/v1api/model_acl.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + +// ACL struct for ACL +type ACL struct { + Items []string `json:"items,omitempty"` +} + +// NewACL instantiates a new ACL 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 NewACL() *ACL { + this := ACL{} + return &this +} + +// NewACLWithDefaults instantiates a new ACL object +// This 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ACL) GetItems() []string { + if o == nil || IsNil(o.Items) { + var ret []string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ACL) GetItemsOk() ([]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ACL) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *ACL) SetItems(v []string) { + o.Items = v +} + +func (o ACL) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_backup.go b/services/mongodbflex/v1api/model_backup.go new file mode 100644 index 000000000..5fcf10158 --- /dev/null +++ b/services/mongodbflex/v1api/model_backup.go @@ -0,0 +1,377 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Backup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Backup{} + +// Backup struct for Backup +type Backup struct { + EndTime *string `json:"endTime,omitempty"` + Error *string `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Labels []string `json:"labels,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + Size *int32 `json:"size,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +// NewBackup instantiates a new Backup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBackup() *Backup { + this := Backup{} + return &this +} + +// NewBackupWithDefaults instantiates a new Backup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBackupWithDefaults() *Backup { + this := Backup{} + return &this +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *Backup) GetEndTime() string { + if o == nil || IsNil(o.EndTime) { + var ret string + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetEndTimeOk() (*string, bool) { + if o == nil || IsNil(o.EndTime) { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *Backup) HasEndTime() bool { + if o != nil && !IsNil(o.EndTime) { + return true + } + + return false +} + +// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +func (o *Backup) SetEndTime(v string) { + o.EndTime = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Backup) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Backup) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Backup) SetError(v string) { + o.Error = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Backup) 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 *Backup) 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 *Backup) 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 *Backup) SetId(v string) { + o.Id = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Backup) GetLabels() []string { + if o == nil || IsNil(o.Labels) { + var ret []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 *Backup) GetLabelsOk() ([]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 *Backup) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *Backup) SetLabels(v []string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Backup) 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 *Backup) 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 *Backup) 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 *Backup) SetName(v string) { + o.Name = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Backup) GetOptions() map[string]string { + if o == nil || IsNil(o.Options) { + var ret map[string]string + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Backup) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Backup) SetOptions(v map[string]string) { + o.Options = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Backup) GetSize() int32 { + if o == nil || IsNil(o.Size) { + var ret int32 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetSizeOk() (*int32, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Backup) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int32 and assigns it to the Size field. +func (o *Backup) SetSize(v int32) { + o.Size = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *Backup) GetStartTime() string { + if o == nil || IsNil(o.StartTime) { + var ret string + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *Backup) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *Backup) SetStartTime(v string) { + o.StartTime = &v +} + +func (o Backup) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Backup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EndTime) { + toSerialize["endTime"] = o.EndTime + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + 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.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.StartTime) { + toSerialize["startTime"] = o.StartTime + } + return toSerialize, nil +} + +type NullableBackup struct { + value *Backup + isSet bool +} + +func (v NullableBackup) Get() *Backup { + return v.value +} + +func (v *NullableBackup) Set(val *Backup) { + v.value = val + v.isSet = true +} + +func (v NullableBackup) IsSet() bool { + return v.isSet +} + +func (v *NullableBackup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackup(val *Backup) *NullableBackup { + return &NullableBackup{value: val, isSet: true} +} + +func (v NullableBackup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_backup_schedule.go b/services/mongodbflex/v1api/model_backup_schedule.go new file mode 100644 index 000000000..d6acb2843 --- /dev/null +++ b/services/mongodbflex/v1api/model_backup_schedule.go @@ -0,0 +1,305 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the BackupSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BackupSchedule{} + +// BackupSchedule struct for BackupSchedule +type BackupSchedule struct { + BackupSchedule *string `json:"backupSchedule,omitempty"` + DailySnapshotRetentionDays *int32 `json:"dailySnapshotRetentionDays,omitempty"` + MonthlySnapshotRetentionMonths *int32 `json:"monthlySnapshotRetentionMonths,omitempty"` + PointInTimeWindowHours *int32 `json:"pointInTimeWindowHours,omitempty"` + SnapshotRetentionDays *int32 `json:"snapshotRetentionDays,omitempty"` + WeeklySnapshotRetentionWeeks *int32 `json:"weeklySnapshotRetentionWeeks,omitempty"` +} + +// NewBackupSchedule instantiates a new BackupSchedule 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 NewBackupSchedule() *BackupSchedule { + this := BackupSchedule{} + return &this +} + +// NewBackupScheduleWithDefaults instantiates a new BackupSchedule object +// This 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 NewBackupScheduleWithDefaults() *BackupSchedule { + this := BackupSchedule{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *BackupSchedule) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *BackupSchedule) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *BackupSchedule) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. +func (o *BackupSchedule) GetDailySnapshotRetentionDays() int32 { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.DailySnapshotRetentionDays +} + +// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetDailySnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + return nil, false + } + return o.DailySnapshotRetentionDays, true +} + +// HasDailySnapshotRetentionDays returns a boolean if a field has been set. +func (o *BackupSchedule) HasDailySnapshotRetentionDays() bool { + if o != nil && !IsNil(o.DailySnapshotRetentionDays) { + return true + } + + return false +} + +// SetDailySnapshotRetentionDays gets a reference to the given int32 and assigns it to the DailySnapshotRetentionDays field. +func (o *BackupSchedule) SetDailySnapshotRetentionDays(v int32) { + o.DailySnapshotRetentionDays = &v +} + +// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. +func (o *BackupSchedule) GetMonthlySnapshotRetentionMonths() int32 { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + var ret int32 + return ret + } + return *o.MonthlySnapshotRetentionMonths +} + +// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetMonthlySnapshotRetentionMonthsOk() (*int32, bool) { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + return nil, false + } + return o.MonthlySnapshotRetentionMonths, true +} + +// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. +func (o *BackupSchedule) HasMonthlySnapshotRetentionMonths() bool { + if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { + return true + } + + return false +} + +// SetMonthlySnapshotRetentionMonths gets a reference to the given int32 and assigns it to the MonthlySnapshotRetentionMonths field. +func (o *BackupSchedule) SetMonthlySnapshotRetentionMonths(v int32) { + o.MonthlySnapshotRetentionMonths = &v +} + +// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. +func (o *BackupSchedule) GetPointInTimeWindowHours() int32 { + if o == nil || IsNil(o.PointInTimeWindowHours) { + var ret int32 + return ret + } + return *o.PointInTimeWindowHours +} + +// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetPointInTimeWindowHoursOk() (*int32, bool) { + if o == nil || IsNil(o.PointInTimeWindowHours) { + return nil, false + } + return o.PointInTimeWindowHours, true +} + +// HasPointInTimeWindowHours returns a boolean if a field has been set. +func (o *BackupSchedule) HasPointInTimeWindowHours() bool { + if o != nil && !IsNil(o.PointInTimeWindowHours) { + return true + } + + return false +} + +// SetPointInTimeWindowHours gets a reference to the given int32 and assigns it to the PointInTimeWindowHours field. +func (o *BackupSchedule) SetPointInTimeWindowHours(v int32) { + o.PointInTimeWindowHours = &v +} + +// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. +func (o *BackupSchedule) GetSnapshotRetentionDays() int32 { + if o == nil || IsNil(o.SnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.SnapshotRetentionDays +} + +// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetSnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.SnapshotRetentionDays) { + return nil, false + } + return o.SnapshotRetentionDays, true +} + +// HasSnapshotRetentionDays returns a boolean if a field has been set. +func (o *BackupSchedule) HasSnapshotRetentionDays() bool { + if o != nil && !IsNil(o.SnapshotRetentionDays) { + return true + } + + return false +} + +// SetSnapshotRetentionDays gets a reference to the given int32 and assigns it to the SnapshotRetentionDays field. +func (o *BackupSchedule) SetSnapshotRetentionDays(v int32) { + o.SnapshotRetentionDays = &v +} + +// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. +func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeks() int32 { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + var ret int32 + return ret + } + return *o.WeeklySnapshotRetentionWeeks +} + +// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeksOk() (*int32, bool) { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + return nil, false + } + return o.WeeklySnapshotRetentionWeeks, true +} + +// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. +func (o *BackupSchedule) HasWeeklySnapshotRetentionWeeks() bool { + if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { + return true + } + + return false +} + +// SetWeeklySnapshotRetentionWeeks gets a reference to the given int32 and assigns it to the WeeklySnapshotRetentionWeeks field. +func (o *BackupSchedule) SetWeeklySnapshotRetentionWeeks(v int32) { + o.WeeklySnapshotRetentionWeeks = &v +} + +func (o BackupSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BackupSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.DailySnapshotRetentionDays) { + toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays + } + if !IsNil(o.MonthlySnapshotRetentionMonths) { + toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths + } + if !IsNil(o.PointInTimeWindowHours) { + toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours + } + if !IsNil(o.SnapshotRetentionDays) { + toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays + } + if !IsNil(o.WeeklySnapshotRetentionWeeks) { + toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks + } + return toSerialize, nil +} + +type NullableBackupSchedule struct { + value *BackupSchedule + isSet bool +} + +func (v NullableBackupSchedule) Get() *BackupSchedule { + return v.value +} + +func (v *NullableBackupSchedule) Set(val *BackupSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableBackupSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableBackupSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackupSchedule(val *BackupSchedule) *NullableBackupSchedule { + return &NullableBackupSchedule{value: val, isSet: true} +} + +func (v NullableBackupSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackupSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_clone_instance_payload.go b/services/mongodbflex/v1api/model_clone_instance_payload.go new file mode 100644 index 000000000..4f916c9c2 --- /dev/null +++ b/services/mongodbflex/v1api/model_clone_instance_payload.go @@ -0,0 +1,193 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CloneInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstancePayload{} + +// CloneInstancePayload struct for CloneInstancePayload +type CloneInstancePayload struct { + InstanceId string `json:"instanceId"` + Timestamp *string `json:"timestamp,omitempty"` +} + +type _CloneInstancePayload CloneInstancePayload + +// NewCloneInstancePayload instantiates a new CloneInstancePayload 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 NewCloneInstancePayload(instanceId string) *CloneInstancePayload { + this := CloneInstancePayload{} + this.InstanceId = instanceId + return &this +} + +// NewCloneInstancePayloadWithDefaults instantiates a new CloneInstancePayload object +// This 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 NewCloneInstancePayloadWithDefaults() *CloneInstancePayload { + this := CloneInstancePayload{} + return &this +} + +// GetInstanceId returns the InstanceId field value +func (o *CloneInstancePayload) GetInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *CloneInstancePayload) SetInstanceId(v string) { + o.InstanceId = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *CloneInstancePayload) GetTimestamp() string { + if o == nil || IsNil(o.Timestamp) { + var ret string + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *CloneInstancePayload) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *CloneInstancePayload) SetTimestamp(v string) { + o.Timestamp = &v +} + +func (o CloneInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instanceId"] = o.InstanceId + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +func (o *CloneInstancePayload) 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{ + "instanceId", + } + + 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) + } + } + + varCloneInstancePayload := _CloneInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCloneInstancePayload) + + if err != nil { + return err + } + + *o = CloneInstancePayload(varCloneInstancePayload) + + return err +} + +type NullableCloneInstancePayload struct { + value *CloneInstancePayload + isSet bool +} + +func (v NullableCloneInstancePayload) Get() *CloneInstancePayload { + return v.value +} + +func (v *NullableCloneInstancePayload) Set(val *CloneInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstancePayload(val *CloneInstancePayload) *NullableCloneInstancePayload { + return &NullableCloneInstancePayload{value: val, isSet: true} +} + +func (v NullableCloneInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_clone_instance_response.go b/services/mongodbflex/v1api/model_clone_instance_response.go new file mode 100644 index 000000000..42e450146 --- /dev/null +++ b/services/mongodbflex/v1api/model_clone_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CloneInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstanceResponse{} + +// CloneInstanceResponse struct for CloneInstanceResponse +type CloneInstanceResponse struct { + InstanceId *string `json:"instanceId,omitempty"` +} + +// NewCloneInstanceResponse instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponse() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// NewCloneInstanceResponseWithDefaults instantiates a new CloneInstanceResponse object +// This 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 NewCloneInstanceResponseWithDefaults() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *CloneInstanceResponse) GetInstanceId() string { + if o == nil || IsNil(o.InstanceId) { + var ret string + return ret + } + return *o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstanceResponse) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *CloneInstanceResponse) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *CloneInstanceResponse) SetInstanceId(v string) { + o.InstanceId = &v +} + +func (o CloneInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + return toSerialize, nil +} + +type NullableCloneInstanceResponse struct { + value *CloneInstanceResponse + isSet bool +} + +func (v NullableCloneInstanceResponse) Get() *CloneInstanceResponse { + return v.value +} + +func (v *NullableCloneInstanceResponse) Set(val *CloneInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstanceResponse(val *CloneInstanceResponse) *NullableCloneInstanceResponse { + return &NullableCloneInstanceResponse{value: val, isSet: true} +} + +func (v NullableCloneInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_create_instance_payload.go b/services/mongodbflex/v1api/model_create_instance_payload.go new file mode 100644 index 000000000..f285677d5 --- /dev/null +++ b/services/mongodbflex/v1api/model_create_instance_payload.go @@ -0,0 +1,390 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + +// CreateInstancePayload struct for CreateInstancePayload +type CreateInstancePayload struct { + Acl ACL `json:"acl"` + BackupSchedule string `json:"backupSchedule"` + FlavorId string `json:"flavorId"` + // Labels field is not certain/clear + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name"` + Options map[string]string `json:"options"` + Replicas int32 `json:"replicas"` + Storage Storage `json:"storage"` + Version string `json:"version"` +} + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(acl ACL, backupSchedule string, flavorId string, name string, options map[string]string, replicas int32, storage Storage, version string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + this.Version = version + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload object +// This 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value +func (o *CreateInstancePayload) GetAcl() ACL { + if o == nil { + var ret ACL + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil { + return nil, false + } + return &o.Acl, true +} + +// SetAcl sets field value +func (o *CreateInstancePayload) SetAcl(v ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *CreateInstancePayload) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *CreateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *CreateInstancePayload) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *CreateInstancePayload) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateInstancePayload) 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 *CreateInstancePayload) 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 *CreateInstancePayload) 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 *CreateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *CreateInstancePayload) 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 *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateInstancePayload) SetName(v string) { + o.Name = v +} + +// GetOptions returns the Options field value +func (o *CreateInstancePayload) GetOptions() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Options, true +} + +// SetOptions sets field value +func (o *CreateInstancePayload) SetOptions(v map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *CreateInstancePayload) GetReplicas() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetReplicasOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Replicas, true +} + +// SetReplicas sets field value +func (o *CreateInstancePayload) SetReplicas(v int32) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *CreateInstancePayload) GetStorage() Storage { + if o == nil { + var ret Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *CreateInstancePayload) SetStorage(v Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *CreateInstancePayload) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *CreateInstancePayload) SetVersion(v string) { + o.Version = v +} + +func (o CreateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *CreateInstancePayload) 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{ + "acl", + "backupSchedule", + "flavorId", + "name", + "options", + "replicas", + "storage", + "version", + } + + 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) + } + } + + varCreateInstancePayload := _CreateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateInstancePayload) + + if err != nil { + return err + } + + *o = CreateInstancePayload(varCreateInstancePayload) + + return err +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_create_instance_response.go b/services/mongodbflex/v1api/model_create_instance_response.go new file mode 100644 index 000000000..8c14bdf14 --- /dev/null +++ b/services/mongodbflex/v1api/model_create_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstanceResponse{} + +// CreateInstanceResponse struct for CreateInstanceResponse +type CreateInstanceResponse struct { + Id *string `json:"id,omitempty"` +} + +// NewCreateInstanceResponse instantiates a new CreateInstanceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateInstanceResponse() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateInstanceResponse) 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 *CreateInstanceResponse) 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 *CreateInstanceResponse) 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 *CreateInstanceResponse) SetId(v string) { + o.Id = &v +} + +func (o CreateInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreateInstanceResponse struct { + value *CreateInstanceResponse + isSet bool +} + +func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { + return v.value +} + +func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { + return &NullableCreateInstanceResponse{value: val, isSet: true} +} + +func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_create_user_payload.go b/services/mongodbflex/v1api/model_create_user_payload.go new file mode 100644 index 000000000..832d2001a --- /dev/null +++ b/services/mongodbflex/v1api/model_create_user_payload.go @@ -0,0 +1,222 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserPayload{} + +// CreateUserPayload struct for CreateUserPayload +type CreateUserPayload struct { + Database string `json:"database"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles"` + Username *string `json:"username,omitempty"` +} + +type _CreateUserPayload CreateUserPayload + +// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(database string, roles []string) *CreateUserPayload { + this := CreateUserPayload{} + this.Database = database + this.Roles = roles + return &this +} + +// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload object +// This 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { + this := CreateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value +func (o *CreateUserPayload) GetDatabase() string { + if o == nil { + var ret string + return ret + } + + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Database, true +} + +// SetDatabase sets field value +func (o *CreateUserPayload) SetDatabase(v string) { + o.Database = v +} + +// GetRoles returns the Roles field value +func (o *CreateUserPayload) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *CreateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateUserPayload) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateUserPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateUserPayload) SetUsername(v string) { + o.Username = &v +} + +func (o CreateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database"] = o.Database + toSerialize["roles"] = o.Roles + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +func (o *CreateUserPayload) 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{ + "database", + "roles", + } + + 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) + } + } + + varCreateUserPayload := _CreateUserPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateUserPayload) + + if err != nil { + return err + } + + *o = CreateUserPayload(varCreateUserPayload) + + return err +} + +type NullableCreateUserPayload struct { + value *CreateUserPayload + isSet bool +} + +func (v NullableCreateUserPayload) Get() *CreateUserPayload { + return v.value +} + +func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { + return &NullableCreateUserPayload{value: val, isSet: true} +} + +func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_create_user_response.go b/services/mongodbflex/v1api/model_create_user_response.go new file mode 100644 index 000000000..bda6e5b25 --- /dev/null +++ b/services/mongodbflex/v1api/model_create_user_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserResponse{} + +// CreateUserResponse struct for CreateUserResponse +type CreateUserResponse struct { + Item *User `json:"item,omitempty"` +} + +// NewCreateUserResponse instantiates a new CreateUserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateUserResponse() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateUserResponseWithDefaults() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *CreateUserResponse) GetItem() User { + if o == nil || IsNil(o.Item) { + var ret User + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetItemOk() (*User, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *CreateUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given User and assigns it to the Item field. +func (o *CreateUserResponse) SetItem(v User) { + o.Item = &v +} + +func (o CreateUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableCreateUserResponse struct { + value *CreateUserResponse + isSet bool +} + +func (v NullableCreateUserResponse) Get() *CreateUserResponse { + return v.value +} + +func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { + return &NullableCreateUserResponse{value: val, isSet: true} +} + +func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_data_point.go b/services/mongodbflex/v1api/model_data_point.go new file mode 100644 index 000000000..0e03ff440 --- /dev/null +++ b/services/mongodbflex/v1api/model_data_point.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the DataPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataPoint{} + +// DataPoint struct for DataPoint +type DataPoint struct { + Timestamp *string `json:"timestamp,omitempty"` + Value *float32 `json:"value,omitempty"` +} + +// NewDataPoint instantiates a new DataPoint 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 NewDataPoint() *DataPoint { + this := DataPoint{} + return &this +} + +// NewDataPointWithDefaults instantiates a new DataPoint object +// This 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 NewDataPointWithDefaults() *DataPoint { + this := DataPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *DataPoint) GetTimestamp() string { + if o == nil || IsNil(o.Timestamp) { + var ret string + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataPoint) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *DataPoint) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *DataPoint) SetTimestamp(v string) { + o.Timestamp = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DataPoint) GetValue() float32 { + if o == nil || IsNil(o.Value) { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataPoint) GetValueOk() (*float32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DataPoint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *DataPoint) SetValue(v float32) { + o.Value = &v +} + +func (o DataPoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableDataPoint struct { + value *DataPoint + isSet bool +} + +func (v NullableDataPoint) Get() *DataPoint { + return v.value +} + +func (v *NullableDataPoint) Set(val *DataPoint) { + v.value = val + v.isSet = true +} + +func (v NullableDataPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableDataPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataPoint(val *DataPoint) *NullableDataPoint { + return &NullableDataPoint{value: val, isSet: true} +} + +func (v NullableDataPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_error.go b/services/mongodbflex/v1api/model_error.go new file mode 100644 index 000000000..97665adc5 --- /dev/null +++ b/services/mongodbflex/v1api/model_error.go @@ -0,0 +1,233 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + Code *int32 `json:"code,omitempty"` + Fields *map[string][]string `json:"fields,omitempty"` + Message *string `json:"message,omitempty"` + Type *string `json:"type,omitempty"` +} + +// 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() *Error { + this := Error{} + return &this +} + +// NewErrorWithDefaults instantiates a new Error object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetCode(v int32) { + o.Code = &v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *Error) GetFields() map[string][]string { + if o == nil || IsNil(o.Fields) { + var ret map[string][]string + return ret + } + return *o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetFieldsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *Error) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. +func (o *Error) SetFields(v map[string][]string) { + o.Fields = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetMessage(v string) { + o.Message = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *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 !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_flavor.go b/services/mongodbflex/v1api/model_flavor.go new file mode 100644 index 000000000..95c2e10e5 --- /dev/null +++ b/services/mongodbflex/v1api/model_flavor.go @@ -0,0 +1,233 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Flavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Flavor{} + +// Flavor struct for Flavor +type Flavor struct { + Cpu *int32 `json:"cpu,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Memory *int32 `json:"memory,omitempty"` +} + +// NewFlavor instantiates a new Flavor 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 NewFlavor() *Flavor { + this := Flavor{} + return &this +} + +// NewFlavorWithDefaults instantiates a new Flavor object +// This 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 NewFlavorWithDefaults() *Flavor { + this := Flavor{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *Flavor) GetCpu() int32 { + if o == nil || IsNil(o.Cpu) { + var ret int32 + return ret + } + return *o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetCpuOk() (*int32, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *Flavor) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int32 and assigns it to the Cpu field. +func (o *Flavor) SetCpu(v int32) { + o.Cpu = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Flavor) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Flavor) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Flavor) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Flavor) 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 *Flavor) 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 *Flavor) 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 *Flavor) SetId(v string) { + o.Id = &v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *Flavor) GetMemory() int32 { + if o == nil || IsNil(o.Memory) { + var ret int32 + return ret + } + return *o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetMemoryOk() (*int32, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *Flavor) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int32 and assigns it to the Memory field. +func (o *Flavor) SetMemory(v int32) { + o.Memory = &v +} + +func (o Flavor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Flavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableFlavor struct { + value *Flavor + isSet bool +} + +func (v NullableFlavor) Get() *Flavor { + return v.value +} + +func (v *NullableFlavor) Set(val *Flavor) { + v.value = val + v.isSet = true +} + +func (v NullableFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavor(val *Flavor) *NullableFlavor { + return &NullableFlavor{value: val, isSet: true} +} + +func (v NullableFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_get_backup_response.go b/services/mongodbflex/v1api/model_get_backup_response.go new file mode 100644 index 000000000..ffc9662ad --- /dev/null +++ b/services/mongodbflex/v1api/model_get_backup_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetBackupResponse{} + +// GetBackupResponse struct for GetBackupResponse +type GetBackupResponse struct { + Item *Backup `json:"item,omitempty"` +} + +// NewGetBackupResponse instantiates a new GetBackupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetBackupResponse() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetBackupResponseWithDefaults() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetBackupResponse) GetItem() Backup { + if o == nil || IsNil(o.Item) { + var ret Backup + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetItemOk() (*Backup, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetBackupResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Backup and assigns it to the Item field. +func (o *GetBackupResponse) SetItem(v Backup) { + o.Item = &v +} + +func (o GetBackupResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetBackupResponse struct { + value *GetBackupResponse + isSet bool +} + +func (v NullableGetBackupResponse) Get() *GetBackupResponse { + return v.value +} + +func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetBackupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetBackupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { + return &NullableGetBackupResponse{value: val, isSet: true} +} + +func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_get_instance_response.go b/services/mongodbflex/v1api/model_get_instance_response.go new file mode 100644 index 000000000..f03d374a0 --- /dev/null +++ b/services/mongodbflex/v1api/model_get_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetInstanceResponse{} + +// GetInstanceResponse struct for GetInstanceResponse +type GetInstanceResponse struct { + Item *Instance `json:"item,omitempty"` +} + +// NewGetInstanceResponse instantiates a new GetInstanceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetInstanceResponse() *GetInstanceResponse { + this := GetInstanceResponse{} + return &this +} + +// NewGetInstanceResponseWithDefaults instantiates a new GetInstanceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetInstanceResponseWithDefaults() *GetInstanceResponse { + this := GetInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetInstanceResponse) GetItem() Instance { + if o == nil || IsNil(o.Item) { + var ret Instance + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *GetInstanceResponse) SetItem(v Instance) { + o.Item = &v +} + +func (o GetInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetInstanceResponse struct { + value *GetInstanceResponse + isSet bool +} + +func (v NullableGetInstanceResponse) Get() *GetInstanceResponse { + return v.value +} + +func (v *NullableGetInstanceResponse) Set(val *GetInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetInstanceResponse(val *GetInstanceResponse) *NullableGetInstanceResponse { + return &NullableGetInstanceResponse{value: val, isSet: true} +} + +func (v NullableGetInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_get_user_response.go b/services/mongodbflex/v1api/model_get_user_response.go new file mode 100644 index 000000000..62e3582c5 --- /dev/null +++ b/services/mongodbflex/v1api/model_get_user_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserResponse{} + +// GetUserResponse struct for GetUserResponse +type GetUserResponse struct { + Item *InstanceResponseUser `json:"item,omitempty"` +} + +// NewGetUserResponse instantiates a new GetUserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetUserResponse() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// NewGetUserResponseWithDefaults instantiates a new GetUserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetUserResponseWithDefaults() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetUserResponse) GetItem() InstanceResponseUser { + if o == nil || IsNil(o.Item) { + var ret InstanceResponseUser + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetItemOk() (*InstanceResponseUser, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given InstanceResponseUser and assigns it to the Item field. +func (o *GetUserResponse) SetItem(v InstanceResponseUser) { + o.Item = &v +} + +func (o GetUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetUserResponse struct { + value *GetUserResponse + isSet bool +} + +func (v NullableGetUserResponse) Get() *GetUserResponse { + return v.value +} + +func (v *NullableGetUserResponse) Set(val *GetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { + return &NullableGetUserResponse{value: val, isSet: true} +} + +func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_handlers_infra_flavor.go b/services/mongodbflex/v1api/model_handlers_infra_flavor.go new file mode 100644 index 000000000..59f03c2d0 --- /dev/null +++ b/services/mongodbflex/v1api/model_handlers_infra_flavor.go @@ -0,0 +1,269 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the HandlersInfraFlavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInfraFlavor{} + +// HandlersInfraFlavor struct for HandlersInfraFlavor +type HandlersInfraFlavor struct { + Categories []string `json:"categories,omitempty"` + Cpu *int32 `json:"cpu,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Memory *int32 `json:"memory,omitempty"` +} + +// NewHandlersInfraFlavor instantiates a new HandlersInfraFlavor 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 NewHandlersInfraFlavor() *HandlersInfraFlavor { + this := HandlersInfraFlavor{} + return &this +} + +// NewHandlersInfraFlavorWithDefaults instantiates a new HandlersInfraFlavor object +// This 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 NewHandlersInfraFlavorWithDefaults() *HandlersInfraFlavor { + this := HandlersInfraFlavor{} + return &this +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) GetCategories() []string { + if o == nil || IsNil(o.Categories) { + var ret []string + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInfraFlavor) GetCategoriesOk() ([]string, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *HandlersInfraFlavor) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []string and assigns it to the Categories field. +func (o *HandlersInfraFlavor) SetCategories(v []string) { + o.Categories = v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) GetCpu() int32 { + if o == nil || IsNil(o.Cpu) { + var ret int32 + return ret + } + return *o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInfraFlavor) GetCpuOk() (*int32, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *HandlersInfraFlavor) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int32 and assigns it to the Cpu field. +func (o *HandlersInfraFlavor) SetCpu(v int32) { + o.Cpu = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInfraFlavor) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *HandlersInfraFlavor) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *HandlersInfraFlavor) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) 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 *HandlersInfraFlavor) SetId(v string) { + o.Id = &v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *HandlersInfraFlavor) GetMemory() int32 { + if o == nil || IsNil(o.Memory) { + var ret int32 + return ret + } + return *o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInfraFlavor) GetMemoryOk() (*int32, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *HandlersInfraFlavor) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int32 and assigns it to the Memory field. +func (o *HandlersInfraFlavor) SetMemory(v int32) { + o.Memory = &v +} + +func (o HandlersInfraFlavor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInfraFlavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableHandlersInfraFlavor struct { + value *HandlersInfraFlavor + isSet bool +} + +func (v NullableHandlersInfraFlavor) Get() *HandlersInfraFlavor { + return v.value +} + +func (v *NullableHandlersInfraFlavor) Set(val *HandlersInfraFlavor) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInfraFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInfraFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInfraFlavor(val *HandlersInfraFlavor) *NullableHandlersInfraFlavor { + return &NullableHandlersInfraFlavor{value: val, isSet: true} +} + +func (v NullableHandlersInfraFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInfraFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_handlers_infra_get_flavors_response.go b/services/mongodbflex/v1api/model_handlers_infra_get_flavors_response.go new file mode 100644 index 000000000..4d5901792 --- /dev/null +++ b/services/mongodbflex/v1api/model_handlers_infra_get_flavors_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the HandlersInfraGetFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInfraGetFlavorsResponse{} + +// HandlersInfraGetFlavorsResponse struct for HandlersInfraGetFlavorsResponse +type HandlersInfraGetFlavorsResponse struct { + Flavors []HandlersInfraFlavor `json:"flavors,omitempty"` +} + +// NewHandlersInfraGetFlavorsResponse instantiates a new HandlersInfraGetFlavorsResponse 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 NewHandlersInfraGetFlavorsResponse() *HandlersInfraGetFlavorsResponse { + this := HandlersInfraGetFlavorsResponse{} + return &this +} + +// NewHandlersInfraGetFlavorsResponseWithDefaults instantiates a new HandlersInfraGetFlavorsResponse object +// This 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 NewHandlersInfraGetFlavorsResponseWithDefaults() *HandlersInfraGetFlavorsResponse { + this := HandlersInfraGetFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value if set, zero value otherwise. +func (o *HandlersInfraGetFlavorsResponse) GetFlavors() []HandlersInfraFlavor { + if o == nil || IsNil(o.Flavors) { + var ret []HandlersInfraFlavor + return ret + } + return o.Flavors +} + +// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInfraGetFlavorsResponse) GetFlavorsOk() ([]HandlersInfraFlavor, bool) { + if o == nil || IsNil(o.Flavors) { + return nil, false + } + return o.Flavors, true +} + +// HasFlavors returns a boolean if a field has been set. +func (o *HandlersInfraGetFlavorsResponse) HasFlavors() bool { + if o != nil && !IsNil(o.Flavors) { + return true + } + + return false +} + +// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. +func (o *HandlersInfraGetFlavorsResponse) SetFlavors(v []HandlersInfraFlavor) { + o.Flavors = v +} + +func (o HandlersInfraGetFlavorsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInfraGetFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Flavors) { + toSerialize["flavors"] = o.Flavors + } + return toSerialize, nil +} + +type NullableHandlersInfraGetFlavorsResponse struct { + value *HandlersInfraGetFlavorsResponse + isSet bool +} + +func (v NullableHandlersInfraGetFlavorsResponse) Get() *HandlersInfraGetFlavorsResponse { + return v.value +} + +func (v *NullableHandlersInfraGetFlavorsResponse) Set(val *HandlersInfraGetFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInfraGetFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInfraGetFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInfraGetFlavorsResponse(val *HandlersInfraGetFlavorsResponse) *NullableHandlersInfraGetFlavorsResponse { + return &NullableHandlersInfraGetFlavorsResponse{value: val, isSet: true} +} + +func (v NullableHandlersInfraGetFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInfraGetFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_handlers_instances_get_instance_response.go b/services/mongodbflex/v1api/model_handlers_instances_get_instance_response.go new file mode 100644 index 000000000..840ff3e4d --- /dev/null +++ b/services/mongodbflex/v1api/model_handlers_instances_get_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the HandlersInstancesGetInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesGetInstanceResponse{} + +// HandlersInstancesGetInstanceResponse struct for HandlersInstancesGetInstanceResponse +type HandlersInstancesGetInstanceResponse struct { + Item *Instance `json:"item,omitempty"` +} + +// NewHandlersInstancesGetInstanceResponse instantiates a new HandlersInstancesGetInstanceResponse 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 NewHandlersInstancesGetInstanceResponse() *HandlersInstancesGetInstanceResponse { + this := HandlersInstancesGetInstanceResponse{} + return &this +} + +// NewHandlersInstancesGetInstanceResponseWithDefaults instantiates a new HandlersInstancesGetInstanceResponse object +// This 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 NewHandlersInstancesGetInstanceResponseWithDefaults() *HandlersInstancesGetInstanceResponse { + this := HandlersInstancesGetInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *HandlersInstancesGetInstanceResponse) GetItem() Instance { + if o == nil || IsNil(o.Item) { + var ret Instance + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesGetInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *HandlersInstancesGetInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *HandlersInstancesGetInstanceResponse) SetItem(v Instance) { + o.Item = &v +} + +func (o HandlersInstancesGetInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInstancesGetInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableHandlersInstancesGetInstanceResponse struct { + value *HandlersInstancesGetInstanceResponse + isSet bool +} + +func (v NullableHandlersInstancesGetInstanceResponse) Get() *HandlersInstancesGetInstanceResponse { + return v.value +} + +func (v *NullableHandlersInstancesGetInstanceResponse) Set(val *HandlersInstancesGetInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesGetInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesGetInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesGetInstanceResponse(val *HandlersInstancesGetInstanceResponse) *NullableHandlersInstancesGetInstanceResponse { + return &NullableHandlersInstancesGetInstanceResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesGetInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesGetInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_handlers_instances_slow_queries_response.go b/services/mongodbflex/v1api/model_handlers_instances_slow_queries_response.go new file mode 100644 index 000000000..c1f02cac1 --- /dev/null +++ b/services/mongodbflex/v1api/model_handlers_instances_slow_queries_response.go @@ -0,0 +1,126 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the HandlersInstancesSlowQueriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesSlowQueriesResponse{} + +// HandlersInstancesSlowQueriesResponse struct for HandlersInstancesSlowQueriesResponse +type HandlersInstancesSlowQueriesResponse struct { + // A list of documents with information about slow queries as detected by the Performance Advisor. + SlowQueries []SlowQuery `json:"slowQueries,omitempty"` +} + +// NewHandlersInstancesSlowQueriesResponse instantiates a new HandlersInstancesSlowQueriesResponse 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 NewHandlersInstancesSlowQueriesResponse() *HandlersInstancesSlowQueriesResponse { + this := HandlersInstancesSlowQueriesResponse{} + return &this +} + +// NewHandlersInstancesSlowQueriesResponseWithDefaults instantiates a new HandlersInstancesSlowQueriesResponse object +// This 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 NewHandlersInstancesSlowQueriesResponseWithDefaults() *HandlersInstancesSlowQueriesResponse { + this := HandlersInstancesSlowQueriesResponse{} + return &this +} + +// GetSlowQueries returns the SlowQueries field value if set, zero value otherwise. +func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueries() []SlowQuery { + if o == nil || IsNil(o.SlowQueries) { + var ret []SlowQuery + return ret + } + return o.SlowQueries +} + +// GetSlowQueriesOk returns a tuple with the SlowQueries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueriesOk() ([]SlowQuery, bool) { + if o == nil || IsNil(o.SlowQueries) { + return nil, false + } + return o.SlowQueries, true +} + +// HasSlowQueries returns a boolean if a field has been set. +func (o *HandlersInstancesSlowQueriesResponse) HasSlowQueries() bool { + if o != nil && !IsNil(o.SlowQueries) { + return true + } + + return false +} + +// SetSlowQueries gets a reference to the given []SlowQuery and assigns it to the SlowQueries field. +func (o *HandlersInstancesSlowQueriesResponse) SetSlowQueries(v []SlowQuery) { + o.SlowQueries = v +} + +func (o HandlersInstancesSlowQueriesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInstancesSlowQueriesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SlowQueries) { + toSerialize["slowQueries"] = o.SlowQueries + } + return toSerialize, nil +} + +type NullableHandlersInstancesSlowQueriesResponse struct { + value *HandlersInstancesSlowQueriesResponse + isSet bool +} + +func (v NullableHandlersInstancesSlowQueriesResponse) Get() *HandlersInstancesSlowQueriesResponse { + return v.value +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) Set(val *HandlersInstancesSlowQueriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesSlowQueriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesSlowQueriesResponse(val *HandlersInstancesSlowQueriesResponse) *NullableHandlersInstancesSlowQueriesResponse { + return &NullableHandlersInstancesSlowQueriesResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesSlowQueriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_handlers_instances_suggested_indexes_response.go b/services/mongodbflex/v1api/model_handlers_instances_suggested_indexes_response.go new file mode 100644 index 000000000..c7e4451be --- /dev/null +++ b/services/mongodbflex/v1api/model_handlers_instances_suggested_indexes_response.go @@ -0,0 +1,163 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the HandlersInstancesSuggestedIndexesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesSuggestedIndexesResponse{} + +// HandlersInstancesSuggestedIndexesResponse struct for HandlersInstancesSuggestedIndexesResponse +type HandlersInstancesSuggestedIndexesResponse struct { + // Documents with information about the query shapes that are served by the suggested indexes. + Shapes []Shape `json:"shapes,omitempty"` + // Documents with information about the indexes suggested by the Performance Advisor. + SuggestedIndexes []SuggestedIndex `json:"suggestedIndexes,omitempty"` +} + +// NewHandlersInstancesSuggestedIndexesResponse instantiates a new HandlersInstancesSuggestedIndexesResponse 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 NewHandlersInstancesSuggestedIndexesResponse() *HandlersInstancesSuggestedIndexesResponse { + this := HandlersInstancesSuggestedIndexesResponse{} + return &this +} + +// NewHandlersInstancesSuggestedIndexesResponseWithDefaults instantiates a new HandlersInstancesSuggestedIndexesResponse object +// This 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 NewHandlersInstancesSuggestedIndexesResponseWithDefaults() *HandlersInstancesSuggestedIndexesResponse { + this := HandlersInstancesSuggestedIndexesResponse{} + return &this +} + +// GetShapes returns the Shapes field value if set, zero value otherwise. +func (o *HandlersInstancesSuggestedIndexesResponse) GetShapes() []Shape { + if o == nil || IsNil(o.Shapes) { + var ret []Shape + return ret + } + return o.Shapes +} + +// GetShapesOk returns a tuple with the Shapes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) GetShapesOk() ([]Shape, bool) { + if o == nil || IsNil(o.Shapes) { + return nil, false + } + return o.Shapes, true +} + +// HasShapes returns a boolean if a field has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) HasShapes() bool { + if o != nil && !IsNil(o.Shapes) { + return true + } + + return false +} + +// SetShapes gets a reference to the given []Shape and assigns it to the Shapes field. +func (o *HandlersInstancesSuggestedIndexesResponse) SetShapes(v []Shape) { + o.Shapes = v +} + +// GetSuggestedIndexes returns the SuggestedIndexes field value if set, zero value otherwise. +func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexes() []SuggestedIndex { + if o == nil || IsNil(o.SuggestedIndexes) { + var ret []SuggestedIndex + return ret + } + return o.SuggestedIndexes +} + +// GetSuggestedIndexesOk returns a tuple with the SuggestedIndexes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexesOk() ([]SuggestedIndex, bool) { + if o == nil || IsNil(o.SuggestedIndexes) { + return nil, false + } + return o.SuggestedIndexes, true +} + +// HasSuggestedIndexes returns a boolean if a field has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) HasSuggestedIndexes() bool { + if o != nil && !IsNil(o.SuggestedIndexes) { + return true + } + + return false +} + +// SetSuggestedIndexes gets a reference to the given []SuggestedIndex and assigns it to the SuggestedIndexes field. +func (o *HandlersInstancesSuggestedIndexesResponse) SetSuggestedIndexes(v []SuggestedIndex) { + o.SuggestedIndexes = v +} + +func (o HandlersInstancesSuggestedIndexesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInstancesSuggestedIndexesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Shapes) { + toSerialize["shapes"] = o.Shapes + } + if !IsNil(o.SuggestedIndexes) { + toSerialize["suggestedIndexes"] = o.SuggestedIndexes + } + return toSerialize, nil +} + +type NullableHandlersInstancesSuggestedIndexesResponse struct { + value *HandlersInstancesSuggestedIndexesResponse + isSet bool +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) Get() *HandlersInstancesSuggestedIndexesResponse { + return v.value +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) Set(val *HandlersInstancesSuggestedIndexesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesSuggestedIndexesResponse(val *HandlersInstancesSuggestedIndexesResponse) *NullableHandlersInstancesSuggestedIndexesResponse { + return &NullableHandlersInstancesSuggestedIndexesResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_host.go b/services/mongodbflex/v1api/model_host.go new file mode 100644 index 000000000..bbe9a6746 --- /dev/null +++ b/services/mongodbflex/v1api/model_host.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Host type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Host{} + +// Host struct for Host +type Host struct { + HostMetrics []HostMetric `json:"hostMetrics,omitempty"` + Id *string `json:"id,omitempty"` +} + +// NewHost instantiates a new Host 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 NewHost() *Host { + this := Host{} + return &this +} + +// NewHostWithDefaults instantiates a new Host object +// This 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 NewHostWithDefaults() *Host { + this := Host{} + return &this +} + +// GetHostMetrics returns the HostMetrics field value if set, zero value otherwise. +func (o *Host) GetHostMetrics() []HostMetric { + if o == nil || IsNil(o.HostMetrics) { + var ret []HostMetric + return ret + } + return o.HostMetrics +} + +// GetHostMetricsOk returns a tuple with the HostMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Host) GetHostMetricsOk() ([]HostMetric, bool) { + if o == nil || IsNil(o.HostMetrics) { + return nil, false + } + return o.HostMetrics, true +} + +// HasHostMetrics returns a boolean if a field has been set. +func (o *Host) HasHostMetrics() bool { + if o != nil && !IsNil(o.HostMetrics) { + return true + } + + return false +} + +// SetHostMetrics gets a reference to the given []HostMetric and assigns it to the HostMetrics field. +func (o *Host) SetHostMetrics(v []HostMetric) { + o.HostMetrics = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Host) 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 *Host) 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 *Host) 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 *Host) SetId(v string) { + o.Id = &v +} + +func (o Host) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Host) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.HostMetrics) { + toSerialize["hostMetrics"] = o.HostMetrics + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableHost struct { + value *Host + isSet bool +} + +func (v NullableHost) Get() *Host { + return v.value +} + +func (v *NullableHost) Set(val *Host) { + v.value = val + v.isSet = true +} + +func (v NullableHost) IsSet() bool { + return v.isSet +} + +func (v *NullableHost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHost(val *Host) *NullableHost { + return &NullableHost{value: val, isSet: true} +} + +func (v NullableHost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_host_metric.go b/services/mongodbflex/v1api/model_host_metric.go new file mode 100644 index 000000000..263855dae --- /dev/null +++ b/services/mongodbflex/v1api/model_host_metric.go @@ -0,0 +1,197 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the HostMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HostMetric{} + +// HostMetric struct for HostMetric +type HostMetric struct { + Datapoints []DataPoint `json:"datapoints,omitempty"` + Name *string `json:"name,omitempty"` + Units *string `json:"units,omitempty"` +} + +// NewHostMetric instantiates a new HostMetric 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 NewHostMetric() *HostMetric { + this := HostMetric{} + return &this +} + +// NewHostMetricWithDefaults instantiates a new HostMetric object +// This 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 NewHostMetricWithDefaults() *HostMetric { + this := HostMetric{} + return &this +} + +// GetDatapoints returns the Datapoints field value if set, zero value otherwise. +func (o *HostMetric) GetDatapoints() []DataPoint { + if o == nil || IsNil(o.Datapoints) { + var ret []DataPoint + return ret + } + return o.Datapoints +} + +// GetDatapointsOk returns a tuple with the Datapoints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostMetric) GetDatapointsOk() ([]DataPoint, bool) { + if o == nil || IsNil(o.Datapoints) { + return nil, false + } + return o.Datapoints, true +} + +// HasDatapoints returns a boolean if a field has been set. +func (o *HostMetric) HasDatapoints() bool { + if o != nil && !IsNil(o.Datapoints) { + return true + } + + return false +} + +// SetDatapoints gets a reference to the given []DataPoint and assigns it to the Datapoints field. +func (o *HostMetric) SetDatapoints(v []DataPoint) { + o.Datapoints = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HostMetric) 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 *HostMetric) 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 *HostMetric) 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 *HostMetric) SetName(v string) { + o.Name = &v +} + +// GetUnits returns the Units field value if set, zero value otherwise. +func (o *HostMetric) GetUnits() string { + if o == nil || IsNil(o.Units) { + var ret string + return ret + } + return *o.Units +} + +// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostMetric) GetUnitsOk() (*string, bool) { + if o == nil || IsNil(o.Units) { + return nil, false + } + return o.Units, true +} + +// HasUnits returns a boolean if a field has been set. +func (o *HostMetric) HasUnits() bool { + if o != nil && !IsNil(o.Units) { + return true + } + + return false +} + +// SetUnits gets a reference to the given string and assigns it to the Units field. +func (o *HostMetric) SetUnits(v string) { + o.Units = &v +} + +func (o HostMetric) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HostMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Datapoints) { + toSerialize["datapoints"] = o.Datapoints + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Units) { + toSerialize["units"] = o.Units + } + return toSerialize, nil +} + +type NullableHostMetric struct { + value *HostMetric + isSet bool +} + +func (v NullableHostMetric) Get() *HostMetric { + return v.value +} + +func (v *NullableHostMetric) Set(val *HostMetric) { + v.value = val + v.isSet = true +} + +func (v NullableHostMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableHostMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHostMetric(val *HostMetric) *NullableHostMetric { + return &NullableHostMetric{value: val, isSet: true} +} + +func (v NullableHostMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHostMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_instance.go b/services/mongodbflex/v1api/model_instance.go new file mode 100644 index 000000000..6cad47036 --- /dev/null +++ b/services/mongodbflex/v1api/model_instance.go @@ -0,0 +1,450 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Instance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Instance{} + +// Instance struct for Instance +type Instance struct { + Acl *ACL `json:"acl,omitempty"` + BackupSchedule *string `json:"backupSchedule,omitempty"` + Flavor *Flavor `json:"flavor,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + // The current status of the instance. + Status *string `json:"status,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` +} + +// NewInstance instantiates a new Instance 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 NewInstance() *Instance { + this := Instance{} + return &this +} + +// NewInstanceWithDefaults instantiates a new Instance object +// This 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 NewInstanceWithDefaults() *Instance { + this := Instance{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Instance) GetAcl() ACL { + if o == nil || IsNil(o.Acl) { + var ret ACL + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Instance) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Instance) SetAcl(v ACL) { + o.Acl = &v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *Instance) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *Instance) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *Instance) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise. +func (o *Instance) GetFlavor() Flavor { + if o == nil || IsNil(o.Flavor) { + var ret Flavor + return ret + } + return *o.Flavor +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetFlavorOk() (*Flavor, bool) { + if o == nil || IsNil(o.Flavor) { + return nil, false + } + return o.Flavor, true +} + +// HasFlavor returns a boolean if a field has been set. +func (o *Instance) HasFlavor() bool { + if o != nil && !IsNil(o.Flavor) { + return true + } + + return false +} + +// SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. +func (o *Instance) SetFlavor(v Flavor) { + o.Flavor = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Instance) 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 *Instance) 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 *Instance) 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 *Instance) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Instance) 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 *Instance) 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 *Instance) 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 *Instance) SetName(v string) { + o.Name = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Instance) GetOptions() map[string]string { + if o == nil || IsNil(o.Options) { + var ret map[string]string + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Instance) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Instance) SetOptions(v map[string]string) { + o.Options = &v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *Instance) GetReplicas() int32 { + if o == nil || IsNil(o.Replicas) { + var ret int32 + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetReplicasOk() (*int32, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *Instance) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int32 and assigns it to the Replicas field. +func (o *Instance) SetReplicas(v int32) { + o.Replicas = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Instance) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Instance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Instance) SetStatus(v string) { + o.Status = &v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *Instance) GetStorage() Storage { + if o == nil || IsNil(o.Storage) { + var ret Storage + return ret + } + return *o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *Instance) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *Instance) SetStorage(v Storage) { + o.Storage = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *Instance) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Instance) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *Instance) SetVersion(v string) { + o.Version = &v +} + +func (o Instance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Instance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.Flavor) { + toSerialize["flavor"] = o.Flavor + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableInstance struct { + value *Instance + isSet bool +} + +func (v NullableInstance) Get() *Instance { + return v.value +} + +func (v *NullableInstance) Set(val *Instance) { + v.value = val + v.isSet = true +} + +func (v NullableInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstance(val *Instance) *NullableInstance { + return &NullableInstance{value: val, isSet: true} +} + +func (v NullableInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_instance_list_instance.go b/services/mongodbflex/v1api/model_instance_list_instance.go new file mode 100644 index 000000000..3063bf621 --- /dev/null +++ b/services/mongodbflex/v1api/model_instance_list_instance.go @@ -0,0 +1,198 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the InstanceListInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceListInstance{} + +// InstanceListInstance struct for InstanceListInstance +type InstanceListInstance struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + // The current status of the instance. + Status *string `json:"status,omitempty"` +} + +// NewInstanceListInstance instantiates a new InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance object +// This 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *InstanceListInstance) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListInstance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *InstanceListInstance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *InstanceListInstance) SetStatus(v string) { + o.Status = &v +} + +func (o InstanceListInstance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableInstanceListInstance struct { + value *InstanceListInstance + isSet bool +} + +func (v NullableInstanceListInstance) Get() *InstanceListInstance { + return v.value +} + +func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceListInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceListInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { + return &NullableInstanceListInstance{value: val, isSet: true} +} + +func (v NullableInstanceListInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_instance_response_user.go b/services/mongodbflex/v1api/model_instance_response_user.go new file mode 100644 index 000000000..e3950e0fb --- /dev/null +++ b/services/mongodbflex/v1api/model_instance_response_user.go @@ -0,0 +1,306 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the InstanceResponseUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceResponseUser{} + +// InstanceResponseUser struct for InstanceResponseUser +type InstanceResponseUser struct { + Database *string `json:"database,omitempty"` + Host *string `json:"host,omitempty"` + Id *string `json:"id,omitempty"` + Port *int32 `json:"port,omitempty"` + // The roles defined for a user. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewInstanceResponseUser instantiates a new InstanceResponseUser 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 NewInstanceResponseUser() *InstanceResponseUser { + this := InstanceResponseUser{} + return &this +} + +// NewInstanceResponseUserWithDefaults instantiates a new InstanceResponseUser object +// This 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 NewInstanceResponseUserWithDefaults() *InstanceResponseUser { + this := InstanceResponseUser{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetDatabase() string { + if o == nil || IsNil(o.Database) { + var ret string + return ret + } + return *o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *InstanceResponseUser) SetDatabase(v string) { + o.Database = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *InstanceResponseUser) SetHost(v string) { + o.Host = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetId(v string) { + o.Id = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *InstanceResponseUser) SetPort(v int32) { + o.Port = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *InstanceResponseUser) SetRoles(v []string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *InstanceResponseUser) SetUsername(v string) { + o.Username = &v +} + +func (o InstanceResponseUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceResponseUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableInstanceResponseUser struct { + value *InstanceResponseUser + isSet bool +} + +func (v NullableInstanceResponseUser) Get() *InstanceResponseUser { + return v.value +} + +func (v *NullableInstanceResponseUser) Set(val *InstanceResponseUser) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceResponseUser) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceResponseUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceResponseUser(val *InstanceResponseUser) *NullableInstanceResponseUser { + return &NullableInstanceResponseUser{value: val, isSet: true} +} + +func (v NullableInstanceResponseUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceResponseUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_backups_response.go b/services/mongodbflex/v1api/model_list_backups_response.go new file mode 100644 index 000000000..3c58eb3af --- /dev/null +++ b/services/mongodbflex/v1api/model_list_backups_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupsResponse{} + +// ListBackupsResponse struct for ListBackupsResponse +type ListBackupsResponse struct { + Count *int32 `json:"count,omitempty"` + Items []Backup `json:"items,omitempty"` +} + +// NewListBackupsResponse instantiates a new ListBackupsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListBackupsResponse() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListBackupsResponseWithDefaults() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *ListBackupsResponse) SetCount(v int32) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetItems() []Backup { + if o == nil || IsNil(o.Items) { + var ret []Backup + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetItemsOk() ([]Backup, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Backup and assigns it to the Items field. +func (o *ListBackupsResponse) SetItems(v []Backup) { + o.Items = v +} + +func (o ListBackupsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListBackupsResponse struct { + value *ListBackupsResponse + isSet bool +} + +func (v NullableListBackupsResponse) Get() *ListBackupsResponse { + return v.value +} + +func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBackupsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackupsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { + return &NullableListBackupsResponse{value: val, isSet: true} +} + +func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_flavors_response.go b/services/mongodbflex/v1api/model_list_flavors_response.go new file mode 100644 index 000000000..019090d4a --- /dev/null +++ b/services/mongodbflex/v1api/model_list_flavors_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavorsResponse{} + +// ListFlavorsResponse struct for ListFlavorsResponse +type ListFlavorsResponse struct { + Flavors []HandlersInfraFlavor `json:"flavors,omitempty"` +} + +// NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse object +// This 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value if set, zero value otherwise. +func (o *ListFlavorsResponse) GetFlavors() []HandlersInfraFlavor { + if o == nil || IsNil(o.Flavors) { + var ret []HandlersInfraFlavor + return ret + } + return o.Flavors +} + +// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFlavorsResponse) GetFlavorsOk() ([]HandlersInfraFlavor, bool) { + if o == nil || IsNil(o.Flavors) { + return nil, false + } + return o.Flavors, true +} + +// HasFlavors returns a boolean if a field has been set. +func (o *ListFlavorsResponse) HasFlavors() bool { + if o != nil && !IsNil(o.Flavors) { + return true + } + + return false +} + +// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. +func (o *ListFlavorsResponse) SetFlavors(v []HandlersInfraFlavor) { + o.Flavors = v +} + +func (o ListFlavorsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Flavors) { + toSerialize["flavors"] = o.Flavors + } + return toSerialize, nil +} + +type NullableListFlavorsResponse struct { + value *ListFlavorsResponse + isSet bool +} + +func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { + return v.value +} + +func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { + return &NullableListFlavorsResponse{value: val, isSet: true} +} + +func (v NullableListFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_instances_response.go b/services/mongodbflex/v1api/model_list_instances_response.go new file mode 100644 index 000000000..1b4e19d7b --- /dev/null +++ b/services/mongodbflex/v1api/model_list_instances_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + +// ListInstancesResponse struct for ListInstancesResponse +type ListInstancesResponse struct { + Count *int32 `json:"count,omitempty"` + Items []InstanceListInstance `json:"items,omitempty"` +} + +// NewListInstancesResponse instantiates a new ListInstancesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListInstancesResponse() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListInstancesResponseWithDefaults() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *ListInstancesResponse) SetCount(v int32) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetItems() []InstanceListInstance { + if o == nil || IsNil(o.Items) { + var ret []InstanceListInstance + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetItemsOk() ([]InstanceListInstance, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. +func (o *ListInstancesResponse) SetItems(v []InstanceListInstance) { + o.Items = v +} + +func (o ListInstancesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListInstancesResponse struct { + value *ListInstancesResponse + isSet bool +} + +func (v NullableListInstancesResponse) Get() *ListInstancesResponse { + return v.value +} + +func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInstancesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstancesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { + return &NullableListInstancesResponse{value: val, isSet: true} +} + +func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_metrics_response.go b/services/mongodbflex/v1api/model_list_metrics_response.go new file mode 100644 index 000000000..11b82dcb1 --- /dev/null +++ b/services/mongodbflex/v1api/model_list_metrics_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListMetricsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMetricsResponse{} + +// ListMetricsResponse struct for ListMetricsResponse +type ListMetricsResponse struct { + Hosts []Host `json:"hosts,omitempty"` +} + +// NewListMetricsResponse instantiates a new ListMetricsResponse 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 NewListMetricsResponse() *ListMetricsResponse { + this := ListMetricsResponse{} + return &this +} + +// NewListMetricsResponseWithDefaults instantiates a new ListMetricsResponse object +// This 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 NewListMetricsResponseWithDefaults() *ListMetricsResponse { + this := ListMetricsResponse{} + return &this +} + +// GetHosts returns the Hosts field value if set, zero value otherwise. +func (o *ListMetricsResponse) GetHosts() []Host { + if o == nil || IsNil(o.Hosts) { + var ret []Host + return ret + } + return o.Hosts +} + +// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMetricsResponse) GetHostsOk() ([]Host, bool) { + if o == nil || IsNil(o.Hosts) { + return nil, false + } + return o.Hosts, true +} + +// HasHosts returns a boolean if a field has been set. +func (o *ListMetricsResponse) HasHosts() bool { + if o != nil && !IsNil(o.Hosts) { + return true + } + + return false +} + +// SetHosts gets a reference to the given []Host and assigns it to the Hosts field. +func (o *ListMetricsResponse) SetHosts(v []Host) { + o.Hosts = v +} + +func (o ListMetricsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMetricsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hosts) { + toSerialize["hosts"] = o.Hosts + } + return toSerialize, nil +} + +type NullableListMetricsResponse struct { + value *ListMetricsResponse + isSet bool +} + +func (v NullableListMetricsResponse) Get() *ListMetricsResponse { + return v.value +} + +func (v *NullableListMetricsResponse) Set(val *ListMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMetricsResponse(val *ListMetricsResponse) *NullableListMetricsResponse { + return &NullableListMetricsResponse{value: val, isSet: true} +} + +func (v NullableListMetricsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMetricsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_restore_jobs_response.go b/services/mongodbflex/v1api/model_list_restore_jobs_response.go new file mode 100644 index 000000000..0efa14587 --- /dev/null +++ b/services/mongodbflex/v1api/model_list_restore_jobs_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListRestoreJobsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRestoreJobsResponse{} + +// ListRestoreJobsResponse struct for ListRestoreJobsResponse +type ListRestoreJobsResponse struct { + Items []RestoreInstanceStatus `json:"items,omitempty"` +} + +// NewListRestoreJobsResponse instantiates a new ListRestoreJobsResponse 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 NewListRestoreJobsResponse() *ListRestoreJobsResponse { + this := ListRestoreJobsResponse{} + return &this +} + +// NewListRestoreJobsResponseWithDefaults instantiates a new ListRestoreJobsResponse object +// This 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 NewListRestoreJobsResponseWithDefaults() *ListRestoreJobsResponse { + this := ListRestoreJobsResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListRestoreJobsResponse) GetItems() []RestoreInstanceStatus { + if o == nil || IsNil(o.Items) { + var ret []RestoreInstanceStatus + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRestoreJobsResponse) GetItemsOk() ([]RestoreInstanceStatus, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListRestoreJobsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []RestoreInstanceStatus and assigns it to the Items field. +func (o *ListRestoreJobsResponse) SetItems(v []RestoreInstanceStatus) { + o.Items = v +} + +func (o ListRestoreJobsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListRestoreJobsResponse struct { + value *ListRestoreJobsResponse + isSet bool +} + +func (v NullableListRestoreJobsResponse) Get() *ListRestoreJobsResponse { + return v.value +} + +func (v *NullableListRestoreJobsResponse) Set(val *ListRestoreJobsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRestoreJobsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRestoreJobsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRestoreJobsResponse(val *ListRestoreJobsResponse) *NullableListRestoreJobsResponse { + return &NullableListRestoreJobsResponse{value: val, isSet: true} +} + +func (v NullableListRestoreJobsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRestoreJobsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_storages_response.go b/services/mongodbflex/v1api/model_list_storages_response.go new file mode 100644 index 000000000..24969512e --- /dev/null +++ b/services/mongodbflex/v1api/model_list_storages_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListStoragesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListStoragesResponse{} + +// ListStoragesResponse struct for ListStoragesResponse +type ListStoragesResponse struct { + StorageClasses []string `json:"storageClasses,omitempty"` + StorageRange *StorageRange `json:"storageRange,omitempty"` +} + +// NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse object +// This 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// GetStorageClasses returns the StorageClasses field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageClasses() []string { + if o == nil || IsNil(o.StorageClasses) { + var ret []string + return ret + } + return o.StorageClasses +} + +// GetStorageClassesOk returns a tuple with the StorageClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageClassesOk() ([]string, bool) { + if o == nil || IsNil(o.StorageClasses) { + return nil, false + } + return o.StorageClasses, true +} + +// HasStorageClasses returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageClasses() bool { + if o != nil && !IsNil(o.StorageClasses) { + return true + } + + return false +} + +// SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. +func (o *ListStoragesResponse) SetStorageClasses(v []string) { + o.StorageClasses = v +} + +// GetStorageRange returns the StorageRange field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageRange() StorageRange { + if o == nil || IsNil(o.StorageRange) { + var ret StorageRange + return ret + } + return *o.StorageRange +} + +// GetStorageRangeOk returns a tuple with the StorageRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageRangeOk() (*StorageRange, bool) { + if o == nil || IsNil(o.StorageRange) { + return nil, false + } + return o.StorageRange, true +} + +// HasStorageRange returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageRange() bool { + if o != nil && !IsNil(o.StorageRange) { + return true + } + + return false +} + +// SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. +func (o *ListStoragesResponse) SetStorageRange(v StorageRange) { + o.StorageRange = &v +} + +func (o ListStoragesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StorageClasses) { + toSerialize["storageClasses"] = o.StorageClasses + } + if !IsNil(o.StorageRange) { + toSerialize["storageRange"] = o.StorageRange + } + return toSerialize, nil +} + +type NullableListStoragesResponse struct { + value *ListStoragesResponse + isSet bool +} + +func (v NullableListStoragesResponse) Get() *ListStoragesResponse { + return v.value +} + +func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListStoragesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListStoragesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { + return &NullableListStoragesResponse{value: val, isSet: true} +} + +func (v NullableListStoragesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_user.go b/services/mongodbflex/v1api/model_list_user.go new file mode 100644 index 000000000..66e636a97 --- /dev/null +++ b/services/mongodbflex/v1api/model_list_user.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUser{} + +// ListUser struct for ListUser +type ListUser struct { + Id *string `json:"id,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewListUser instantiates a new ListUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListUser() *ListUser { + this := ListUser{} + return &this +} + +// NewListUserWithDefaults instantiates a new ListUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListUserWithDefaults() *ListUser { + this := ListUser{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListUser) 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 *ListUser) 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 *ListUser) 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 *ListUser) SetId(v string) { + o.Id = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *ListUser) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *ListUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *ListUser) SetUsername(v string) { + o.Username = &v +} + +func (o ListUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableListUser struct { + value *ListUser + isSet bool +} + +func (v NullableListUser) Get() *ListUser { + return v.value +} + +func (v *NullableListUser) Set(val *ListUser) { + v.value = val + v.isSet = true +} + +func (v NullableListUser) IsSet() bool { + return v.isSet +} + +func (v *NullableListUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUser(val *ListUser) *NullableListUser { + return &NullableListUser{value: val, isSet: true} +} + +func (v NullableListUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_users_response.go b/services/mongodbflex/v1api/model_list_users_response.go new file mode 100644 index 000000000..dac372f04 --- /dev/null +++ b/services/mongodbflex/v1api/model_list_users_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsersResponse{} + +// ListUsersResponse struct for ListUsersResponse +type ListUsersResponse struct { + Count *int32 `json:"count,omitempty"` + Items []ListUser `json:"items,omitempty"` +} + +// NewListUsersResponse instantiates a new ListUsersResponse 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 NewListUsersResponse() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// NewListUsersResponseWithDefaults instantiates a new ListUsersResponse object +// This 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 NewListUsersResponseWithDefaults() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListUsersResponse) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListUsersResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *ListUsersResponse) SetCount(v int32) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListUsersResponse) GetItems() []ListUser { + if o == nil || IsNil(o.Items) { + var ret []ListUser + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetItemsOk() ([]ListUser, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListUsersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ListUser and assigns it to the Items field. +func (o *ListUsersResponse) SetItems(v []ListUser) { + o.Items = v +} + +func (o ListUsersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListUsersResponse struct { + value *ListUsersResponse + isSet bool +} + +func (v NullableListUsersResponse) Get() *ListUsersResponse { + return v.value +} + +func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUsersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUsersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { + return &NullableListUsersResponse{value: val, isSet: true} +} + +func (v NullableListUsersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUsersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_list_versions_response.go b/services/mongodbflex/v1api/model_list_versions_response.go new file mode 100644 index 000000000..ad2f8fcb5 --- /dev/null +++ b/services/mongodbflex/v1api/model_list_versions_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the ListVersionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListVersionsResponse{} + +// ListVersionsResponse struct for ListVersionsResponse +type ListVersionsResponse struct { + Versions []string `json:"versions,omitempty"` +} + +// NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse object +// This 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *ListVersionsResponse) GetVersions() []string { + if o == nil || IsNil(o.Versions) { + var ret []string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVersionsResponse) GetVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *ListVersionsResponse) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *ListVersionsResponse) SetVersions(v []string) { + o.Versions = v +} + +func (o ListVersionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableListVersionsResponse struct { + value *ListVersionsResponse + isSet bool +} + +func (v NullableListVersionsResponse) Get() *ListVersionsResponse { + return v.value +} + +func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListVersionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListVersionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { + return &NullableListVersionsResponse{value: val, isSet: true} +} + +func (v NullableListVersionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_mongodbatlas_operation.go b/services/mongodbflex/v1api/model_mongodbatlas_operation.go new file mode 100644 index 000000000..5ff4e0967 --- /dev/null +++ b/services/mongodbflex/v1api/model_mongodbatlas_operation.go @@ -0,0 +1,200 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MongodbatlasOperation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasOperation{} + +// MongodbatlasOperation struct for MongodbatlasOperation +type MongodbatlasOperation struct { + // Documents containing the search criteria used by the query. + Predicates []map[string]interface{} `json:"predicates,omitempty"` + // Raw log line produced by the query. + Raw *string `json:"raw,omitempty"` + // Query statistics. + Stats *MongodbatlasStats `json:"stats,omitempty"` +} + +// NewMongodbatlasOperation instantiates a new MongodbatlasOperation 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 NewMongodbatlasOperation() *MongodbatlasOperation { + this := MongodbatlasOperation{} + return &this +} + +// NewMongodbatlasOperationWithDefaults instantiates a new MongodbatlasOperation object +// This 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 NewMongodbatlasOperationWithDefaults() *MongodbatlasOperation { + this := MongodbatlasOperation{} + return &this +} + +// GetPredicates returns the Predicates field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetPredicates() []map[string]interface{} { + if o == nil || IsNil(o.Predicates) { + var ret []map[string]interface{} + return ret + } + return o.Predicates +} + +// GetPredicatesOk returns a tuple with the Predicates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetPredicatesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Predicates) { + return nil, false + } + return o.Predicates, true +} + +// HasPredicates returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasPredicates() bool { + if o != nil && !IsNil(o.Predicates) { + return true + } + + return false +} + +// SetPredicates gets a reference to the given []map[string]interface{} and assigns it to the Predicates field. +func (o *MongodbatlasOperation) SetPredicates(v []map[string]interface{}) { + o.Predicates = v +} + +// GetRaw returns the Raw field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetRaw() string { + if o == nil || IsNil(o.Raw) { + var ret string + return ret + } + return *o.Raw +} + +// GetRawOk returns a tuple with the Raw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetRawOk() (*string, bool) { + if o == nil || IsNil(o.Raw) { + return nil, false + } + return o.Raw, true +} + +// HasRaw returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasRaw() bool { + if o != nil && !IsNil(o.Raw) { + return true + } + + return false +} + +// SetRaw gets a reference to the given string and assigns it to the Raw field. +func (o *MongodbatlasOperation) SetRaw(v string) { + o.Raw = &v +} + +// GetStats returns the Stats field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetStats() MongodbatlasStats { + if o == nil || IsNil(o.Stats) { + var ret MongodbatlasStats + return ret + } + return *o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetStatsOk() (*MongodbatlasStats, bool) { + if o == nil || IsNil(o.Stats) { + return nil, false + } + return o.Stats, true +} + +// HasStats returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasStats() bool { + if o != nil && !IsNil(o.Stats) { + return true + } + + return false +} + +// SetStats gets a reference to the given MongodbatlasStats and assigns it to the Stats field. +func (o *MongodbatlasOperation) SetStats(v MongodbatlasStats) { + o.Stats = &v +} + +func (o MongodbatlasOperation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MongodbatlasOperation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Predicates) { + toSerialize["predicates"] = o.Predicates + } + if !IsNil(o.Raw) { + toSerialize["raw"] = o.Raw + } + if !IsNil(o.Stats) { + toSerialize["stats"] = o.Stats + } + return toSerialize, nil +} + +type NullableMongodbatlasOperation struct { + value *MongodbatlasOperation + isSet bool +} + +func (v NullableMongodbatlasOperation) Get() *MongodbatlasOperation { + return v.value +} + +func (v *NullableMongodbatlasOperation) Set(val *MongodbatlasOperation) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasOperation) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasOperation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasOperation(val *MongodbatlasOperation) *NullableMongodbatlasOperation { + return &NullableMongodbatlasOperation{value: val, isSet: true} +} + +func (v NullableMongodbatlasOperation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasOperation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_mongodbatlas_stats.go b/services/mongodbflex/v1api/model_mongodbatlas_stats.go new file mode 100644 index 000000000..ca2e3090c --- /dev/null +++ b/services/mongodbflex/v1api/model_mongodbatlas_stats.go @@ -0,0 +1,237 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the MongodbatlasStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasStats{} + +// MongodbatlasStats struct for MongodbatlasStats +type MongodbatlasStats struct { + // Duration in milliseconds of the query. + Ms *float32 `json:"ms,omitempty"` + // Number of results returned by the query. + NReturned *int32 `json:"nReturned,omitempty"` + // Number of documents read by the query. + NScanned *int32 `json:"nScanned,omitempty"` + // Query timestamp, in seconds since epoch. + Ts *int32 `json:"ts,omitempty"` +} + +// NewMongodbatlasStats instantiates a new MongodbatlasStats 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 NewMongodbatlasStats() *MongodbatlasStats { + this := MongodbatlasStats{} + return &this +} + +// NewMongodbatlasStatsWithDefaults instantiates a new MongodbatlasStats object +// This 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 NewMongodbatlasStatsWithDefaults() *MongodbatlasStats { + this := MongodbatlasStats{} + return &this +} + +// GetMs returns the Ms field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetMs() float32 { + if o == nil || IsNil(o.Ms) { + var ret float32 + return ret + } + return *o.Ms +} + +// GetMsOk returns a tuple with the Ms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetMsOk() (*float32, bool) { + if o == nil || IsNil(o.Ms) { + return nil, false + } + return o.Ms, true +} + +// HasMs returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasMs() bool { + if o != nil && !IsNil(o.Ms) { + return true + } + + return false +} + +// SetMs gets a reference to the given float32 and assigns it to the Ms field. +func (o *MongodbatlasStats) SetMs(v float32) { + o.Ms = &v +} + +// GetNReturned returns the NReturned field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetNReturned() int32 { + if o == nil || IsNil(o.NReturned) { + var ret int32 + return ret + } + return *o.NReturned +} + +// GetNReturnedOk returns a tuple with the NReturned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetNReturnedOk() (*int32, bool) { + if o == nil || IsNil(o.NReturned) { + return nil, false + } + return o.NReturned, true +} + +// HasNReturned returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasNReturned() bool { + if o != nil && !IsNil(o.NReturned) { + return true + } + + return false +} + +// SetNReturned gets a reference to the given int32 and assigns it to the NReturned field. +func (o *MongodbatlasStats) SetNReturned(v int32) { + o.NReturned = &v +} + +// GetNScanned returns the NScanned field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetNScanned() int32 { + if o == nil || IsNil(o.NScanned) { + var ret int32 + return ret + } + return *o.NScanned +} + +// GetNScannedOk returns a tuple with the NScanned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetNScannedOk() (*int32, bool) { + if o == nil || IsNil(o.NScanned) { + return nil, false + } + return o.NScanned, true +} + +// HasNScanned returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasNScanned() bool { + if o != nil && !IsNil(o.NScanned) { + return true + } + + return false +} + +// SetNScanned gets a reference to the given int32 and assigns it to the NScanned field. +func (o *MongodbatlasStats) SetNScanned(v int32) { + o.NScanned = &v +} + +// GetTs returns the Ts field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetTs() int32 { + if o == nil || IsNil(o.Ts) { + var ret int32 + return ret + } + return *o.Ts +} + +// GetTsOk returns a tuple with the Ts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetTsOk() (*int32, bool) { + if o == nil || IsNil(o.Ts) { + return nil, false + } + return o.Ts, true +} + +// HasTs returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasTs() bool { + if o != nil && !IsNil(o.Ts) { + return true + } + + return false +} + +// SetTs gets a reference to the given int32 and assigns it to the Ts field. +func (o *MongodbatlasStats) SetTs(v int32) { + o.Ts = &v +} + +func (o MongodbatlasStats) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MongodbatlasStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ms) { + toSerialize["ms"] = o.Ms + } + if !IsNil(o.NReturned) { + toSerialize["nReturned"] = o.NReturned + } + if !IsNil(o.NScanned) { + toSerialize["nScanned"] = o.NScanned + } + if !IsNil(o.Ts) { + toSerialize["ts"] = o.Ts + } + return toSerialize, nil +} + +type NullableMongodbatlasStats struct { + value *MongodbatlasStats + isSet bool +} + +func (v NullableMongodbatlasStats) Get() *MongodbatlasStats { + return v.value +} + +func (v *NullableMongodbatlasStats) Set(val *MongodbatlasStats) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasStats) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasStats(val *MongodbatlasStats) *NullableMongodbatlasStats { + return &NullableMongodbatlasStats{value: val, isSet: true} +} + +func (v NullableMongodbatlasStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_partial_update_instance_payload.go b/services/mongodbflex/v1api/model_partial_update_instance_payload.go new file mode 100644 index 000000000..fe3f64ca9 --- /dev/null +++ b/services/mongodbflex/v1api/model_partial_update_instance_payload.go @@ -0,0 +1,414 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayload{} + +// PartialUpdateInstancePayload struct for PartialUpdateInstancePayload +type PartialUpdateInstancePayload struct { + Acl *ACL `json:"acl,omitempty"` + BackupSchedule *string `json:"backupSchedule,omitempty"` + FlavorId *string `json:"flavorId,omitempty"` + // Labels field is not certain/clear + Labels *map[string]string `json:"labels,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` +} + +// NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload object +// This 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetAcl() ACL { + if o == nil || IsNil(o.Acl) { + var ret ACL + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *PartialUpdateInstancePayload) SetAcl(v ACL) { + o.Acl = &v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *PartialUpdateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetFlavorId returns the FlavorId field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetFlavorId() string { + if o == nil || IsNil(o.FlavorId) { + var ret string + return ret + } + return *o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil || IsNil(o.FlavorId) { + return nil, false + } + return o.FlavorId, true +} + +// HasFlavorId returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasFlavorId() bool { + if o != nil && !IsNil(o.FlavorId) { + return true + } + + return false +} + +// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +func (o *PartialUpdateInstancePayload) SetFlavorId(v string) { + o.FlavorId = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetName(v string) { + o.Name = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetOptions() map[string]string { + if o == nil || IsNil(o.Options) { + var ret map[string]string + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *PartialUpdateInstancePayload) SetOptions(v map[string]string) { + o.Options = &v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetReplicas() int32 { + if o == nil || IsNil(o.Replicas) { + var ret int32 + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetReplicasOk() (*int32, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int32 and assigns it to the Replicas field. +func (o *PartialUpdateInstancePayload) SetReplicas(v int32) { + o.Replicas = &v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetStorage() Storage { + if o == nil || IsNil(o.Storage) { + var ret Storage + return ret + } + return *o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *PartialUpdateInstancePayload) SetStorage(v Storage) { + o.Storage = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PartialUpdateInstancePayload) SetVersion(v string) { + o.Version = &v +} + +func (o PartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.FlavorId) { + toSerialize["flavorId"] = o.FlavorId + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullablePartialUpdateInstancePayload struct { + value *PartialUpdateInstancePayload + isSet bool +} + +func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { + return v.value +} + +func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { + return &NullablePartialUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_partial_update_user_payload.go b/services/mongodbflex/v1api/model_partial_update_user_payload.go new file mode 100644 index 000000000..bb70d7c76 --- /dev/null +++ b/services/mongodbflex/v1api/model_partial_update_user_payload.go @@ -0,0 +1,162 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateUserPayload{} + +// PartialUpdateUserPayload struct for PartialUpdateUserPayload +type PartialUpdateUserPayload struct { + Database *string `json:"database,omitempty"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles,omitempty"` +} + +// NewPartialUpdateUserPayload instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayload() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// NewPartialUpdateUserPayloadWithDefaults instantiates a new PartialUpdateUserPayload object +// This 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 NewPartialUpdateUserPayloadWithDefaults() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) GetDatabase() string { + if o == nil || IsNil(o.Database) { + var ret string + return ret + } + return *o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *PartialUpdateUserPayload) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *PartialUpdateUserPayload) SetDatabase(v string) { + o.Database = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *PartialUpdateUserPayload) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *PartialUpdateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +func (o PartialUpdateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullablePartialUpdateUserPayload struct { + value *PartialUpdateUserPayload + isSet bool +} + +func (v NullablePartialUpdateUserPayload) Get() *PartialUpdateUserPayload { + return v.value +} + +func (v *NullablePartialUpdateUserPayload) Set(val *PartialUpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateUserPayload(val *PartialUpdateUserPayload) *NullablePartialUpdateUserPayload { + return &NullablePartialUpdateUserPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_restore_instance_payload.go b/services/mongodbflex/v1api/model_restore_instance_payload.go new file mode 100644 index 000000000..8d4644876 --- /dev/null +++ b/services/mongodbflex/v1api/model_restore_instance_payload.go @@ -0,0 +1,185 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RestoreInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstancePayload{} + +// RestoreInstancePayload struct for RestoreInstancePayload +type RestoreInstancePayload struct { + BackupId string `json:"backupId"` + InstanceId string `json:"instanceId"` +} + +type _RestoreInstancePayload RestoreInstancePayload + +// NewRestoreInstancePayload instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayload(backupId string, instanceId string) *RestoreInstancePayload { + this := RestoreInstancePayload{} + this.BackupId = backupId + this.InstanceId = instanceId + return &this +} + +// NewRestoreInstancePayloadWithDefaults instantiates a new RestoreInstancePayload object +// This 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 NewRestoreInstancePayloadWithDefaults() *RestoreInstancePayload { + this := RestoreInstancePayload{} + return &this +} + +// GetBackupId returns the BackupId field value +func (o *RestoreInstancePayload) GetBackupId() string { + if o == nil { + var ret string + return ret + } + + return o.BackupId +} + +// GetBackupIdOk returns a tuple with the BackupId field value +// and a boolean to check if the value has been set. +func (o *RestoreInstancePayload) GetBackupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupId, true +} + +// SetBackupId sets field value +func (o *RestoreInstancePayload) SetBackupId(v string) { + o.BackupId = v +} + +// GetInstanceId returns the InstanceId field value +func (o *RestoreInstancePayload) GetInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *RestoreInstancePayload) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *RestoreInstancePayload) SetInstanceId(v string) { + o.InstanceId = v +} + +func (o RestoreInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupId"] = o.BackupId + toSerialize["instanceId"] = o.InstanceId + return toSerialize, nil +} + +func (o *RestoreInstancePayload) 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{ + "backupId", + "instanceId", + } + + 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) + } + } + + varRestoreInstancePayload := _RestoreInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRestoreInstancePayload) + + if err != nil { + return err + } + + *o = RestoreInstancePayload(varRestoreInstancePayload) + + return err +} + +type NullableRestoreInstancePayload struct { + value *RestoreInstancePayload + isSet bool +} + +func (v NullableRestoreInstancePayload) Get() *RestoreInstancePayload { + return v.value +} + +func (v *NullableRestoreInstancePayload) Set(val *RestoreInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstancePayload(val *RestoreInstancePayload) *NullableRestoreInstancePayload { + return &NullableRestoreInstancePayload{value: val, isSet: true} +} + +func (v NullableRestoreInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_restore_instance_response.go b/services/mongodbflex/v1api/model_restore_instance_response.go new file mode 100644 index 000000000..0a989a12e --- /dev/null +++ b/services/mongodbflex/v1api/model_restore_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the RestoreInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstanceResponse{} + +// RestoreInstanceResponse struct for RestoreInstanceResponse +type RestoreInstanceResponse struct { + Item *RestoreInstanceStatus `json:"item,omitempty"` +} + +// NewRestoreInstanceResponse instantiates a new RestoreInstanceResponse 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 NewRestoreInstanceResponse() *RestoreInstanceResponse { + this := RestoreInstanceResponse{} + return &this +} + +// NewRestoreInstanceResponseWithDefaults instantiates a new RestoreInstanceResponse object +// This 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 NewRestoreInstanceResponseWithDefaults() *RestoreInstanceResponse { + this := RestoreInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *RestoreInstanceResponse) GetItem() RestoreInstanceStatus { + if o == nil || IsNil(o.Item) { + var ret RestoreInstanceStatus + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceResponse) GetItemOk() (*RestoreInstanceStatus, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *RestoreInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given RestoreInstanceStatus and assigns it to the Item field. +func (o *RestoreInstanceResponse) SetItem(v RestoreInstanceStatus) { + o.Item = &v +} + +func (o RestoreInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableRestoreInstanceResponse struct { + value *RestoreInstanceResponse + isSet bool +} + +func (v NullableRestoreInstanceResponse) Get() *RestoreInstanceResponse { + return v.value +} + +func (v *NullableRestoreInstanceResponse) Set(val *RestoreInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstanceResponse(val *RestoreInstanceResponse) *NullableRestoreInstanceResponse { + return &NullableRestoreInstanceResponse{value: val, isSet: true} +} + +func (v NullableRestoreInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_restore_instance_status.go b/services/mongodbflex/v1api/model_restore_instance_status.go new file mode 100644 index 000000000..f34ea856e --- /dev/null +++ b/services/mongodbflex/v1api/model_restore_instance_status.go @@ -0,0 +1,269 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the RestoreInstanceStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstanceStatus{} + +// RestoreInstanceStatus struct for RestoreInstanceStatus +type RestoreInstanceStatus struct { + BackupID *string `json:"backupID,omitempty"` + Date *string `json:"date,omitempty"` + Id *string `json:"id,omitempty"` + InstanceId *string `json:"instanceId,omitempty"` + Status *string `json:"status,omitempty"` +} + +// NewRestoreInstanceStatus instantiates a new RestoreInstanceStatus 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 NewRestoreInstanceStatus() *RestoreInstanceStatus { + this := RestoreInstanceStatus{} + return &this +} + +// NewRestoreInstanceStatusWithDefaults instantiates a new RestoreInstanceStatus object +// This 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 NewRestoreInstanceStatusWithDefaults() *RestoreInstanceStatus { + this := RestoreInstanceStatus{} + return &this +} + +// GetBackupID returns the BackupID field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetBackupID() string { + if o == nil || IsNil(o.BackupID) { + var ret string + return ret + } + return *o.BackupID +} + +// GetBackupIDOk returns a tuple with the BackupID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetBackupIDOk() (*string, bool) { + if o == nil || IsNil(o.BackupID) { + return nil, false + } + return o.BackupID, true +} + +// HasBackupID returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasBackupID() bool { + if o != nil && !IsNil(o.BackupID) { + return true + } + + return false +} + +// SetBackupID gets a reference to the given string and assigns it to the BackupID field. +func (o *RestoreInstanceStatus) SetBackupID(v string) { + o.BackupID = &v +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetDate() string { + if o == nil || IsNil(o.Date) { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetDateOk() (*string, bool) { + if o == nil || IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasDate() bool { + if o != nil && !IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *RestoreInstanceStatus) SetDate(v string) { + o.Date = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) SetId(v string) { + o.Id = &v +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetInstanceId() string { + if o == nil || IsNil(o.InstanceId) { + var ret string + return ret + } + return *o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *RestoreInstanceStatus) SetInstanceId(v string) { + o.InstanceId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *RestoreInstanceStatus) SetStatus(v string) { + o.Status = &v +} + +func (o RestoreInstanceStatus) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreInstanceStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupID) { + toSerialize["backupID"] = o.BackupID + } + if !IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableRestoreInstanceStatus struct { + value *RestoreInstanceStatus + isSet bool +} + +func (v NullableRestoreInstanceStatus) Get() *RestoreInstanceStatus { + return v.value +} + +func (v *NullableRestoreInstanceStatus) Set(val *RestoreInstanceStatus) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstanceStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstanceStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstanceStatus(val *RestoreInstanceStatus) *NullableRestoreInstanceStatus { + return &NullableRestoreInstanceStatus{value: val, isSet: true} +} + +func (v NullableRestoreInstanceStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstanceStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_shape.go b/services/mongodbflex/v1api/model_shape.go new file mode 100644 index 000000000..7d6dc0a3e --- /dev/null +++ b/services/mongodbflex/v1api/model_shape.go @@ -0,0 +1,311 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Shape type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Shape{} + +// Shape struct for Shape +type Shape struct { + // Average duration in milliseconds for the queries examined that match this shape. + AvgMs *float32 `json:"avgMs,omitempty"` + // Number of queries examined that match this shape. + Count *int32 `json:"count,omitempty"` + // Unique id for this shape. Exists only for the duration of the API request. + Id *string `json:"id,omitempty"` + // Average number of documents read for every document returned by the query. + InefficiencyScore *int32 `json:"inefficiencyScore,omitempty"` + // The namespace in which the slow query ran. + Namespace *string `json:"namespace,omitempty"` + // It represents documents with specific information and log lines for individual queries. + Operations []MongodbatlasOperation `json:"operations,omitempty"` +} + +// NewShape instantiates a new Shape 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 NewShape() *Shape { + this := Shape{} + return &this +} + +// NewShapeWithDefaults instantiates a new Shape object +// This 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 NewShapeWithDefaults() *Shape { + this := Shape{} + return &this +} + +// GetAvgMs returns the AvgMs field value if set, zero value otherwise. +func (o *Shape) GetAvgMs() float32 { + if o == nil || IsNil(o.AvgMs) { + var ret float32 + return ret + } + return *o.AvgMs +} + +// GetAvgMsOk returns a tuple with the AvgMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetAvgMsOk() (*float32, bool) { + if o == nil || IsNil(o.AvgMs) { + return nil, false + } + return o.AvgMs, true +} + +// HasAvgMs returns a boolean if a field has been set. +func (o *Shape) HasAvgMs() bool { + if o != nil && !IsNil(o.AvgMs) { + return true + } + + return false +} + +// SetAvgMs gets a reference to the given float32 and assigns it to the AvgMs field. +func (o *Shape) SetAvgMs(v float32) { + o.AvgMs = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Shape) GetCount() int32 { + if o == nil || IsNil(o.Count) { + var ret int32 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetCountOk() (*int32, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Shape) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int32 and assigns it to the Count field. +func (o *Shape) SetCount(v int32) { + o.Count = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Shape) 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 *Shape) 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 *Shape) 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 *Shape) SetId(v string) { + o.Id = &v +} + +// GetInefficiencyScore returns the InefficiencyScore field value if set, zero value otherwise. +func (o *Shape) GetInefficiencyScore() int32 { + if o == nil || IsNil(o.InefficiencyScore) { + var ret int32 + return ret + } + return *o.InefficiencyScore +} + +// GetInefficiencyScoreOk returns a tuple with the InefficiencyScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetInefficiencyScoreOk() (*int32, bool) { + if o == nil || IsNil(o.InefficiencyScore) { + return nil, false + } + return o.InefficiencyScore, true +} + +// HasInefficiencyScore returns a boolean if a field has been set. +func (o *Shape) HasInefficiencyScore() bool { + if o != nil && !IsNil(o.InefficiencyScore) { + return true + } + + return false +} + +// SetInefficiencyScore gets a reference to the given int32 and assigns it to the InefficiencyScore field. +func (o *Shape) SetInefficiencyScore(v int32) { + o.InefficiencyScore = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *Shape) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *Shape) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *Shape) SetNamespace(v string) { + o.Namespace = &v +} + +// GetOperations returns the Operations field value if set, zero value otherwise. +func (o *Shape) GetOperations() []MongodbatlasOperation { + if o == nil || IsNil(o.Operations) { + var ret []MongodbatlasOperation + return ret + } + return o.Operations +} + +// GetOperationsOk returns a tuple with the Operations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetOperationsOk() ([]MongodbatlasOperation, bool) { + if o == nil || IsNil(o.Operations) { + return nil, false + } + return o.Operations, true +} + +// HasOperations returns a boolean if a field has been set. +func (o *Shape) HasOperations() bool { + if o != nil && !IsNil(o.Operations) { + return true + } + + return false +} + +// SetOperations gets a reference to the given []MongodbatlasOperation and assigns it to the Operations field. +func (o *Shape) SetOperations(v []MongodbatlasOperation) { + o.Operations = v +} + +func (o Shape) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Shape) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvgMs) { + toSerialize["avgMs"] = o.AvgMs + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InefficiencyScore) { + toSerialize["inefficiencyScore"] = o.InefficiencyScore + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Operations) { + toSerialize["operations"] = o.Operations + } + return toSerialize, nil +} + +type NullableShape struct { + value *Shape + isSet bool +} + +func (v NullableShape) Get() *Shape { + return v.value +} + +func (v *NullableShape) Set(val *Shape) { + v.value = val + v.isSet = true +} + +func (v NullableShape) IsSet() bool { + return v.isSet +} + +func (v *NullableShape) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShape(val *Shape) *NullableShape { + return &NullableShape{value: val, isSet: true} +} + +func (v NullableShape) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShape) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_slow_query.go b/services/mongodbflex/v1api/model_slow_query.go new file mode 100644 index 000000000..4e6a78788 --- /dev/null +++ b/services/mongodbflex/v1api/model_slow_query.go @@ -0,0 +1,163 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the SlowQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SlowQuery{} + +// SlowQuery struct for SlowQuery +type SlowQuery struct { + // The raw log line pertaining to the slow query. + Line *string `json:"line,omitempty"` + // The namespace in which the slow query ran. + Namespace *string `json:"namespace,omitempty"` +} + +// NewSlowQuery instantiates a new SlowQuery 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 NewSlowQuery() *SlowQuery { + this := SlowQuery{} + return &this +} + +// NewSlowQueryWithDefaults instantiates a new SlowQuery object +// This 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 NewSlowQueryWithDefaults() *SlowQuery { + this := SlowQuery{} + return &this +} + +// GetLine returns the Line field value if set, zero value otherwise. +func (o *SlowQuery) GetLine() string { + if o == nil || IsNil(o.Line) { + var ret string + return ret + } + return *o.Line +} + +// GetLineOk returns a tuple with the Line field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SlowQuery) GetLineOk() (*string, bool) { + if o == nil || IsNil(o.Line) { + return nil, false + } + return o.Line, true +} + +// HasLine returns a boolean if a field has been set. +func (o *SlowQuery) HasLine() bool { + if o != nil && !IsNil(o.Line) { + return true + } + + return false +} + +// SetLine gets a reference to the given string and assigns it to the Line field. +func (o *SlowQuery) SetLine(v string) { + o.Line = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SlowQuery) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SlowQuery) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SlowQuery) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SlowQuery) SetNamespace(v string) { + o.Namespace = &v +} + +func (o SlowQuery) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SlowQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Line) { + toSerialize["line"] = o.Line + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + return toSerialize, nil +} + +type NullableSlowQuery struct { + value *SlowQuery + isSet bool +} + +func (v NullableSlowQuery) Get() *SlowQuery { + return v.value +} + +func (v *NullableSlowQuery) Set(val *SlowQuery) { + v.value = val + v.isSet = true +} + +func (v NullableSlowQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableSlowQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSlowQuery(val *SlowQuery) *NullableSlowQuery { + return &NullableSlowQuery{value: val, isSet: true} +} + +func (v NullableSlowQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSlowQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_storage.go b/services/mongodbflex/v1api/model_storage.go new file mode 100644 index 000000000..4c3b5bd9a --- /dev/null +++ b/services/mongodbflex/v1api/model_storage.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the Storage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Storage{} + +// Storage struct for Storage +type Storage struct { + Class *string `json:"class,omitempty"` + Size *int32 `json:"size,omitempty"` +} + +// NewStorage instantiates a new Storage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStorage() *Storage { + this := Storage{} + return &this +} + +// NewStorageWithDefaults instantiates a new Storage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStorageWithDefaults() *Storage { + this := Storage{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *Storage) GetClass() string { + if o == nil || IsNil(o.Class) { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Storage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Storage) SetClass(v string) { + o.Class = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Storage) GetSize() int32 { + if o == nil || IsNil(o.Size) { + var ret int32 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetSizeOk() (*int32, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Storage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int32 and assigns it to the Size field. +func (o *Storage) SetSize(v int32) { + o.Size = &v +} + +func (o Storage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Storage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableStorage struct { + value *Storage + isSet bool +} + +func (v NullableStorage) Get() *Storage { + return v.value +} + +func (v *NullableStorage) Set(val *Storage) { + v.value = val + v.isSet = true +} + +func (v NullableStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorage(val *Storage) *NullableStorage { + return &NullableStorage{value: val, isSet: true} +} + +func (v NullableStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_storage_range.go b/services/mongodbflex/v1api/model_storage_range.go new file mode 100644 index 000000000..ce5714e1b --- /dev/null +++ b/services/mongodbflex/v1api/model_storage_range.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the StorageRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageRange{} + +// StorageRange struct for StorageRange +type StorageRange struct { + Max *int32 `json:"max,omitempty"` + Min *int32 `json:"min,omitempty"` +} + +// NewStorageRange instantiates a new StorageRange 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 NewStorageRange() *StorageRange { + this := StorageRange{} + return &this +} + +// NewStorageRangeWithDefaults instantiates a new StorageRange object +// This 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 NewStorageRangeWithDefaults() *StorageRange { + this := StorageRange{} + return &this +} + +// GetMax returns the Max field value if set, zero value otherwise. +func (o *StorageRange) GetMax() int32 { + if o == nil || IsNil(o.Max) { + var ret int32 + return ret + } + return *o.Max +} + +// GetMaxOk returns a tuple with the Max field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMaxOk() (*int32, bool) { + if o == nil || IsNil(o.Max) { + return nil, false + } + return o.Max, true +} + +// HasMax returns a boolean if a field has been set. +func (o *StorageRange) HasMax() bool { + if o != nil && !IsNil(o.Max) { + return true + } + + return false +} + +// SetMax gets a reference to the given int32 and assigns it to the Max field. +func (o *StorageRange) SetMax(v int32) { + o.Max = &v +} + +// GetMin returns the Min field value if set, zero value otherwise. +func (o *StorageRange) GetMin() int32 { + if o == nil || IsNil(o.Min) { + var ret int32 + return ret + } + return *o.Min +} + +// GetMinOk returns a tuple with the Min field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMinOk() (*int32, bool) { + if o == nil || IsNil(o.Min) { + return nil, false + } + return o.Min, true +} + +// HasMin returns a boolean if a field has been set. +func (o *StorageRange) HasMin() bool { + if o != nil && !IsNil(o.Min) { + return true + } + + return false +} + +// SetMin gets a reference to the given int32 and assigns it to the Min field. +func (o *StorageRange) SetMin(v int32) { + o.Min = &v +} + +func (o StorageRange) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StorageRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Max) { + toSerialize["max"] = o.Max + } + if !IsNil(o.Min) { + toSerialize["min"] = o.Min + } + return toSerialize, nil +} + +type NullableStorageRange struct { + value *StorageRange + isSet bool +} + +func (v NullableStorageRange) Get() *StorageRange { + return v.value +} + +func (v *NullableStorageRange) Set(val *StorageRange) { + v.value = val + v.isSet = true +} + +func (v NullableStorageRange) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageRange(val *StorageRange) *NullableStorageRange { + return &NullableStorageRange{value: val, isSet: true} +} + +func (v NullableStorageRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_suggested_index.go b/services/mongodbflex/v1api/model_suggested_index.go new file mode 100644 index 000000000..b449e9ae6 --- /dev/null +++ b/services/mongodbflex/v1api/model_suggested_index.go @@ -0,0 +1,274 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the SuggestedIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuggestedIndex{} + +// SuggestedIndex struct for SuggestedIndex +type SuggestedIndex struct { + // Unique id for this suggested index. + Id *string `json:"id,omitempty"` + // List of unique identifiers which correspond the query shapes in this response which pertain to this suggested index. + Impact []string `json:"impact,omitempty"` + // Array of documents that specifies a key in the index and its sort order, ascending or descending. + Index []map[string]int32 `json:"index,omitempty"` + // Namespace of the suggested index. + Namespace *string `json:"namespace,omitempty"` + // Estimated percentage performance improvement that the suggested index would provide. + Weight *float32 `json:"weight,omitempty"` +} + +// NewSuggestedIndex instantiates a new SuggestedIndex 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 NewSuggestedIndex() *SuggestedIndex { + this := SuggestedIndex{} + return &this +} + +// NewSuggestedIndexWithDefaults instantiates a new SuggestedIndex object +// This 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 NewSuggestedIndexWithDefaults() *SuggestedIndex { + this := SuggestedIndex{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SuggestedIndex) 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 *SuggestedIndex) 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 *SuggestedIndex) 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 *SuggestedIndex) SetId(v string) { + o.Id = &v +} + +// GetImpact returns the Impact field value if set, zero value otherwise. +func (o *SuggestedIndex) GetImpact() []string { + if o == nil || IsNil(o.Impact) { + var ret []string + return ret + } + return o.Impact +} + +// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetImpactOk() ([]string, bool) { + if o == nil || IsNil(o.Impact) { + return nil, false + } + return o.Impact, true +} + +// HasImpact returns a boolean if a field has been set. +func (o *SuggestedIndex) HasImpact() bool { + if o != nil && !IsNil(o.Impact) { + return true + } + + return false +} + +// SetImpact gets a reference to the given []string and assigns it to the Impact field. +func (o *SuggestedIndex) SetImpact(v []string) { + o.Impact = v +} + +// GetIndex returns the Index field value if set, zero value otherwise. +func (o *SuggestedIndex) GetIndex() []map[string]int32 { + if o == nil || IsNil(o.Index) { + var ret []map[string]int32 + return ret + } + return o.Index +} + +// GetIndexOk returns a tuple with the Index field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetIndexOk() ([]map[string]int32, bool) { + if o == nil || IsNil(o.Index) { + return nil, false + } + return o.Index, true +} + +// HasIndex returns a boolean if a field has been set. +func (o *SuggestedIndex) HasIndex() bool { + if o != nil && !IsNil(o.Index) { + return true + } + + return false +} + +// SetIndex gets a reference to the given []map[string]int32 and assigns it to the Index field. +func (o *SuggestedIndex) SetIndex(v []map[string]int32) { + o.Index = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SuggestedIndex) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SuggestedIndex) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SuggestedIndex) SetNamespace(v string) { + o.Namespace = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *SuggestedIndex) GetWeight() float32 { + if o == nil || IsNil(o.Weight) { + var ret float32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetWeightOk() (*float32, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *SuggestedIndex) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given float32 and assigns it to the Weight field. +func (o *SuggestedIndex) SetWeight(v float32) { + o.Weight = &v +} + +func (o SuggestedIndex) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SuggestedIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Impact) { + toSerialize["impact"] = o.Impact + } + if !IsNil(o.Index) { + toSerialize["index"] = o.Index + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +type NullableSuggestedIndex struct { + value *SuggestedIndex + isSet bool +} + +func (v NullableSuggestedIndex) Get() *SuggestedIndex { + return v.value +} + +func (v *NullableSuggestedIndex) Set(val *SuggestedIndex) { + v.value = val + v.isSet = true +} + +func (v NullableSuggestedIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableSuggestedIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuggestedIndex(val *SuggestedIndex) *NullableSuggestedIndex { + return &NullableSuggestedIndex{value: val, isSet: true} +} + +func (v NullableSuggestedIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuggestedIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_update_backup_schedule_payload.go b/services/mongodbflex/v1api/model_update_backup_schedule_payload.go new file mode 100644 index 000000000..1b667b6cb --- /dev/null +++ b/services/mongodbflex/v1api/model_update_backup_schedule_payload.go @@ -0,0 +1,305 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateBackupSchedulePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateBackupSchedulePayload{} + +// UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload +type UpdateBackupSchedulePayload struct { + BackupSchedule *string `json:"backupSchedule,omitempty"` + DailySnapshotRetentionDays *int32 `json:"dailySnapshotRetentionDays,omitempty"` + MonthlySnapshotRetentionMonths *int32 `json:"monthlySnapshotRetentionMonths,omitempty"` + PointInTimeWindowHours *int32 `json:"pointInTimeWindowHours,omitempty"` + SnapshotRetentionDays *int32 `json:"snapshotRetentionDays,omitempty"` + WeeklySnapshotRetentionWeeks *int32 `json:"weeklySnapshotRetentionWeeks,omitempty"` +} + +// NewUpdateBackupSchedulePayload instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayload() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// NewUpdateBackupSchedulePayloadWithDefaults instantiates a new UpdateBackupSchedulePayload object +// This 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 NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *UpdateBackupSchedulePayload) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDays() int32 { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.DailySnapshotRetentionDays +} + +// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + return nil, false + } + return o.DailySnapshotRetentionDays, true +} + +// HasDailySnapshotRetentionDays returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasDailySnapshotRetentionDays() bool { + if o != nil && !IsNil(o.DailySnapshotRetentionDays) { + return true + } + + return false +} + +// SetDailySnapshotRetentionDays gets a reference to the given int32 and assigns it to the DailySnapshotRetentionDays field. +func (o *UpdateBackupSchedulePayload) SetDailySnapshotRetentionDays(v int32) { + o.DailySnapshotRetentionDays = &v +} + +// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonths() int32 { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + var ret int32 + return ret + } + return *o.MonthlySnapshotRetentionMonths +} + +// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonthsOk() (*int32, bool) { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + return nil, false + } + return o.MonthlySnapshotRetentionMonths, true +} + +// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasMonthlySnapshotRetentionMonths() bool { + if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { + return true + } + + return false +} + +// SetMonthlySnapshotRetentionMonths gets a reference to the given int32 and assigns it to the MonthlySnapshotRetentionMonths field. +func (o *UpdateBackupSchedulePayload) SetMonthlySnapshotRetentionMonths(v int32) { + o.MonthlySnapshotRetentionMonths = &v +} + +// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHours() int32 { + if o == nil || IsNil(o.PointInTimeWindowHours) { + var ret int32 + return ret + } + return *o.PointInTimeWindowHours +} + +// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHoursOk() (*int32, bool) { + if o == nil || IsNil(o.PointInTimeWindowHours) { + return nil, false + } + return o.PointInTimeWindowHours, true +} + +// HasPointInTimeWindowHours returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasPointInTimeWindowHours() bool { + if o != nil && !IsNil(o.PointInTimeWindowHours) { + return true + } + + return false +} + +// SetPointInTimeWindowHours gets a reference to the given int32 and assigns it to the PointInTimeWindowHours field. +func (o *UpdateBackupSchedulePayload) SetPointInTimeWindowHours(v int32) { + o.PointInTimeWindowHours = &v +} + +// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDays() int32 { + if o == nil || IsNil(o.SnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.SnapshotRetentionDays +} + +// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.SnapshotRetentionDays) { + return nil, false + } + return o.SnapshotRetentionDays, true +} + +// HasSnapshotRetentionDays returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasSnapshotRetentionDays() bool { + if o != nil && !IsNil(o.SnapshotRetentionDays) { + return true + } + + return false +} + +// SetSnapshotRetentionDays gets a reference to the given int32 and assigns it to the SnapshotRetentionDays field. +func (o *UpdateBackupSchedulePayload) SetSnapshotRetentionDays(v int32) { + o.SnapshotRetentionDays = &v +} + +// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeks() int32 { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + var ret int32 + return ret + } + return *o.WeeklySnapshotRetentionWeeks +} + +// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeksOk() (*int32, bool) { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + return nil, false + } + return o.WeeklySnapshotRetentionWeeks, true +} + +// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasWeeklySnapshotRetentionWeeks() bool { + if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { + return true + } + + return false +} + +// SetWeeklySnapshotRetentionWeeks gets a reference to the given int32 and assigns it to the WeeklySnapshotRetentionWeeks field. +func (o *UpdateBackupSchedulePayload) SetWeeklySnapshotRetentionWeeks(v int32) { + o.WeeklySnapshotRetentionWeeks = &v +} + +func (o UpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateBackupSchedulePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.DailySnapshotRetentionDays) { + toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays + } + if !IsNil(o.MonthlySnapshotRetentionMonths) { + toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths + } + if !IsNil(o.PointInTimeWindowHours) { + toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours + } + if !IsNil(o.SnapshotRetentionDays) { + toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays + } + if !IsNil(o.WeeklySnapshotRetentionWeeks) { + toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks + } + return toSerialize, nil +} + +type NullableUpdateBackupSchedulePayload struct { + value *UpdateBackupSchedulePayload + isSet bool +} + +func (v NullableUpdateBackupSchedulePayload) Get() *UpdateBackupSchedulePayload { + return v.value +} + +func (v *NullableUpdateBackupSchedulePayload) Set(val *UpdateBackupSchedulePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateBackupSchedulePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateBackupSchedulePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateBackupSchedulePayload(val *UpdateBackupSchedulePayload) *NullableUpdateBackupSchedulePayload { + return &NullableUpdateBackupSchedulePayload{value: val, isSet: true} +} + +func (v NullableUpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateBackupSchedulePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_update_instance_payload.go b/services/mongodbflex/v1api/model_update_instance_payload.go new file mode 100644 index 000000000..8f18727de --- /dev/null +++ b/services/mongodbflex/v1api/model_update_instance_payload.go @@ -0,0 +1,390 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + +// UpdateInstancePayload struct for UpdateInstancePayload +type UpdateInstancePayload struct { + Acl ACL `json:"acl"` + BackupSchedule string `json:"backupSchedule"` + FlavorId string `json:"flavorId"` + // Labels field is not certain/clear + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name"` + Options map[string]string `json:"options"` + Replicas int32 `json:"replicas"` + Storage Storage `json:"storage"` + Version string `json:"version"` +} + +type _UpdateInstancePayload UpdateInstancePayload + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(acl ACL, backupSchedule string, flavorId string, name string, options map[string]string, replicas int32, storage Storage, version string) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + this.Version = version + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload object +// This 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value +func (o *UpdateInstancePayload) GetAcl() ACL { + if o == nil { + var ret ACL + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil { + return nil, false + } + return &o.Acl, true +} + +// SetAcl sets field value +func (o *UpdateInstancePayload) SetAcl(v ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *UpdateInstancePayload) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *UpdateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *UpdateInstancePayload) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *UpdateInstancePayload) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateInstancePayload) 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 *UpdateInstancePayload) 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 *UpdateInstancePayload) 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 *UpdateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *UpdateInstancePayload) 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 *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateInstancePayload) SetName(v string) { + o.Name = v +} + +// GetOptions returns the Options field value +func (o *UpdateInstancePayload) GetOptions() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Options, true +} + +// SetOptions sets field value +func (o *UpdateInstancePayload) SetOptions(v map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *UpdateInstancePayload) GetReplicas() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetReplicasOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Replicas, true +} + +// SetReplicas sets field value +func (o *UpdateInstancePayload) SetReplicas(v int32) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *UpdateInstancePayload) GetStorage() Storage { + if o == nil { + var ret Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *UpdateInstancePayload) SetStorage(v Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *UpdateInstancePayload) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *UpdateInstancePayload) SetVersion(v string) { + o.Version = v +} + +func (o UpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *UpdateInstancePayload) 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{ + "acl", + "backupSchedule", + "flavorId", + "name", + "options", + "replicas", + "storage", + "version", + } + + 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) + } + } + + varUpdateInstancePayload := _UpdateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateInstancePayload) + + if err != nil { + return err + } + + *o = UpdateInstancePayload(varUpdateInstancePayload) + + return err +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_update_instance_response.go b/services/mongodbflex/v1api/model_update_instance_response.go new file mode 100644 index 000000000..d072ff807 --- /dev/null +++ b/services/mongodbflex/v1api/model_update_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the UpdateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceResponse{} + +// UpdateInstanceResponse struct for UpdateInstanceResponse +type UpdateInstanceResponse struct { + Item *Instance `json:"item,omitempty"` +} + +// NewUpdateInstanceResponse instantiates a new UpdateInstanceResponse 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 NewUpdateInstanceResponse() *UpdateInstanceResponse { + this := UpdateInstanceResponse{} + return &this +} + +// NewUpdateInstanceResponseWithDefaults instantiates a new UpdateInstanceResponse object +// This 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 NewUpdateInstanceResponseWithDefaults() *UpdateInstanceResponse { + this := UpdateInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *UpdateInstanceResponse) GetItem() Instance { + if o == nil || IsNil(o.Item) { + var ret Instance + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *UpdateInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *UpdateInstanceResponse) SetItem(v Instance) { + o.Item = &v +} + +func (o UpdateInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableUpdateInstanceResponse struct { + value *UpdateInstanceResponse + isSet bool +} + +func (v NullableUpdateInstanceResponse) Get() *UpdateInstanceResponse { + return v.value +} + +func (v *NullableUpdateInstanceResponse) Set(val *UpdateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstanceResponse(val *UpdateInstanceResponse) *NullableUpdateInstanceResponse { + return &NullableUpdateInstanceResponse{value: val, isSet: true} +} + +func (v NullableUpdateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_update_user_payload.go b/services/mongodbflex/v1api/model_update_user_payload.go new file mode 100644 index 000000000..f0ef04d26 --- /dev/null +++ b/services/mongodbflex/v1api/model_update_user_payload.go @@ -0,0 +1,186 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUserPayload{} + +// UpdateUserPayload struct for UpdateUserPayload +type UpdateUserPayload struct { + Database string `json:"database"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles"` +} + +type _UpdateUserPayload UpdateUserPayload + +// NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload(database string, roles []string) *UpdateUserPayload { + this := UpdateUserPayload{} + this.Database = database + this.Roles = roles + return &this +} + +// NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload object +// This 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value +func (o *UpdateUserPayload) GetDatabase() string { + if o == nil { + var ret string + return ret + } + + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Database, true +} + +// SetDatabase sets field value +func (o *UpdateUserPayload) SetDatabase(v string) { + o.Database = v +} + +// GetRoles returns the Roles field value +func (o *UpdateUserPayload) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *UpdateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +func (o UpdateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database"] = o.Database + toSerialize["roles"] = o.Roles + return toSerialize, nil +} + +func (o *UpdateUserPayload) 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{ + "database", + "roles", + } + + 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) + } + } + + varUpdateUserPayload := _UpdateUserPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateUserPayload) + + if err != nil { + return err + } + + *o = UpdateUserPayload(varUpdateUserPayload) + + return err +} + +type NullableUpdateUserPayload struct { + value *UpdateUserPayload + isSet bool +} + +func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { + return v.value +} + +func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { + return &NullableUpdateUserPayload{value: val, isSet: true} +} + +func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/model_user.go b/services/mongodbflex/v1api/model_user.go new file mode 100644 index 000000000..b1acb5c2e --- /dev/null +++ b/services/mongodbflex/v1api/model_user.go @@ -0,0 +1,378 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v1api + +import ( + "encoding/json" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + Database *string `json:"database,omitempty"` + Host *string `json:"host,omitempty"` + Id *string `json:"id,omitempty"` + Password *string `json:"password,omitempty"` + Port *int32 `json:"port,omitempty"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The roles array can contain the following values: 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. + Roles []string `json:"roles,omitempty"` + Uri *string `json:"uri,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewUser instantiates a new User 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 NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This 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 NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *User) GetDatabase() string { + if o == nil || IsNil(o.Database) { + var ret string + return ret + } + return *o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *User) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *User) SetDatabase(v string) { + o.Database = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *User) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *User) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *User) SetHost(v string) { + o.Host = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) 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 *User) 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 *User) 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 *User) SetId(v string) { + o.Id = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *User) GetPort() int32 { + if o == nil || IsNil(o.Port) { + var ret int32 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPortOk() (*int32, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *User) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int32 and assigns it to the Port field. +func (o *User) SetPort(v int32) { + o.Port = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *User) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *User) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *User) SetRoles(v []string) { + o.Roles = v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *User) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *User) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *User) SetUri(v string) { + o.Uri = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *User) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username = &v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v1api/response.go b/services/mongodbflex/v1api/response.go new file mode 100644 index 000000000..46d3f1c98 --- /dev/null +++ b/services/mongodbflex/v1api/response.go @@ -0,0 +1,48 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// 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/mongodbflex/v1api/utils.go b/services/mongodbflex/v1api/utils.go new file mode 100644 index 000000000..fc1a59a26 --- /dev/null +++ b/services/mongodbflex/v1api/utils.go @@ -0,0 +1,362 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 1.0.0 +Contact: support@stackit.cloud +*/ + +// 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/mongodbflex/v2api/api_default.go b/services/mongodbflex/v2api/api_default.go new file mode 100644 index 000000000..7c0e3c10b --- /dev/null +++ b/services/mongodbflex/v2api/api_default.go @@ -0,0 +1,4717 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v2api + +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 { + + /* + CloneInstance Clone instance + + Clone an instance via PIT restore
Note that the Timestamp is a RFC3339 standard and uses by default UTC time format
+ As an example a valid timestamp look like "2023-04-20T15:05:15Z" + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiCloneInstanceRequest + */ + CloneInstance(ctx context.Context, projectId string, instanceId string, region string) ApiCloneInstanceRequest + + // CloneInstanceExecute executes the request + // @return CloneInstanceResponse + CloneInstanceExecute(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) + + /* + CreateInstance Create instance + + Create and deploys an instance
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiCreateInstanceRequest + */ + CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest + + // CreateInstanceExecute executes the request + // @return CreateInstanceResponse + CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) + + /* + CreateUser Create User + + create a new user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiCreateUserRequest + */ + CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest + + // CreateUserExecute executes the request + // @return CreateUserResponse + CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) + + /* + DeleteInstance Delete instance + + removes an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiDeleteInstanceRequest + */ + DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest + + // DeleteInstanceExecute executes the request + DeleteInstanceExecute(r ApiDeleteInstanceRequest) error + + /* + DeleteUser Delete User + + delete mongodb user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiDeleteUserRequest + */ + DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest + + // DeleteUserExecute executes the request + DeleteUserExecute(r ApiDeleteUserRequest) error + + /* + GetBackup Get backup + + Get details about a specific backup + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param backupId backup id + @param region The region which should be addressed + @return ApiGetBackupRequest + */ + GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest + + // GetBackupExecute executes the request + // @return GetBackupResponse + GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) + + /* + GetInstance Get instance + + gets information of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiGetInstanceRequest + */ + GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest + + // GetInstanceExecute executes the request + // @return InstanceResponse + GetInstanceExecute(r ApiGetInstanceRequest) (*InstanceResponse, error) + + /* + GetUser Get User + + get detailed information of a user of a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiGetUserRequest + */ + GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest + + // GetUserExecute executes the request + // @return GetUserResponse + GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) + + /* + ListAdvisorSlowQueries Get slow queries + + gets slow queries from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListAdvisorSlowQueriesRequest + */ + ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string, region string) ApiListAdvisorSlowQueriesRequest + + // ListAdvisorSlowQueriesExecute executes the request + // @return HandlersInstancesSlowQueriesResponse + ListAdvisorSlowQueriesExecute(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) + + /* + ListBackups List backup + + List backups of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListBackupsRequest + */ + ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest + + // ListBackupsExecute executes the request + // @return ListBackupsResponse + ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) + + /* + ListFlavors Flavors + + returns all possible flavors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiListFlavorsRequest + */ + ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest + + // ListFlavorsExecute executes the request + // @return ListFlavorsResponse + ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) + + /* + ListInstances List Instances + + list all instances for a projectID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiListInstancesRequest + */ + ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest + + // ListInstancesExecute executes the request + // @return ListInstancesResponse + ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) + + /* + ListMetrics Metrics + + returns metrics for an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param metric metric type + @param region The region which should be addressed + @return ApiListMetricsRequest + */ + ListMetrics(ctx context.Context, projectId string, instanceId string, metric string, region string) ApiListMetricsRequest + + // ListMetricsExecute executes the request + // @return ListMetricsResponse + ListMetricsExecute(r ApiListMetricsRequest) (*ListMetricsResponse, error) + + /* + ListRestoreJobs List restore jobs + + List restore jobs of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListRestoreJobsRequest + */ + ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest + + // ListRestoreJobsExecute executes the request + // @return ListRestoreJobsResponse + ListRestoreJobsExecute(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) + + /* + ListStorages Get storage + + returns the storage for a certain flavor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param flavor flavor id + @param region The region which should be addressed + @return ApiListStoragesRequest + */ + ListStorages(ctx context.Context, projectId string, flavor string, region string) ApiListStoragesRequest + + // ListStoragesExecute executes the request + // @return ListStoragesResponse + ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) + + /* + ListSuggestedIndexes Get suggested indexes + + gets suggested indexes from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListSuggestedIndexesRequest + */ + ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string, region string) ApiListSuggestedIndexesRequest + + // ListSuggestedIndexesExecute executes the request + // @return HandlersInstancesSuggestedIndexesResponse + ListSuggestedIndexesExecute(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) + + /* + ListUsers List Users + + list all users for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListUsersRequest + */ + ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest + + // ListUsersExecute executes the request + // @return ListUsersResponse + ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) + + /* + ListVersions Get versions + + returns all available versions for creating endpoint + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiListVersionsRequest + */ + ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest + + // ListVersionsExecute executes the request + // @return ListVersionsResponse + ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) + + /* + PartialUpdateInstance Patch endpoint + + Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiPartialUpdateInstanceRequest + */ + PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest + + // PartialUpdateInstanceExecute executes the request + // @return UpdateInstanceResponse + PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) + + /* + PartialUpdateUser Update User + + updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiPartialUpdateUserRequest + */ + PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiPartialUpdateUserRequest + + // PartialUpdateUserExecute executes the request + PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) error + + /* + ResetUser Reset User + + resets mongodb user's password + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiResetUserRequest + */ + ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest + + // ResetUserExecute executes the request + // @return User + ResetUserExecute(r ApiResetUserRequest) (*User, error) + + /* + RestoreInstance Restore instance + + Restore an instance based on snapshot + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiRestoreInstanceRequest + */ + RestoreInstance(ctx context.Context, projectId string, instanceId string, region string) ApiRestoreInstanceRequest + + // RestoreInstanceExecute executes the request + // @return RestoreInstanceResponse + RestoreInstanceExecute(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) + + /* + UpdateBackupSchedule Update schedule + + Updates a backup schedule
Note that the time format is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiUpdateBackupScheduleRequest + */ + UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateBackupScheduleRequest + + // UpdateBackupScheduleExecute executes the request + // @return BackupSchedule + UpdateBackupScheduleExecute(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) + + /* + UpdateInstance Put endpoint + + Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiUpdateInstanceRequest + */ + UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest + + // UpdateInstanceExecute executes the request + // @return UpdateInstanceResponse + UpdateInstanceExecute(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) + + /* + UpdateUser Update User + + updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiUpdateUserRequest + */ + UpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiUpdateUserRequest + + // UpdateUserExecute executes the request + UpdateUserExecute(r ApiUpdateUserRequest) error +} + +// DefaultAPIService DefaultAPI service +type DefaultAPIService service + +type ApiCloneInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string + cloneInstancePayload *CloneInstancePayload +} + +// payload +func (r ApiCloneInstanceRequest) CloneInstancePayload(cloneInstancePayload CloneInstancePayload) ApiCloneInstanceRequest { + r.cloneInstancePayload = &cloneInstancePayload + return r +} + +func (r ApiCloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { + return r.ApiService.CloneInstanceExecute(r) +} + +/* +CloneInstance Clone instance + +Clone an instance via PIT restore
Note that the Timestamp is a RFC3339 standard and uses by default UTC time format
+As an example a valid timestamp look like "2023-04-20T15:05:15Z" + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiCloneInstanceRequest +*/ +func (a *DefaultAPIService) CloneInstance(ctx context.Context, projectId string, instanceId string, region string) ApiCloneInstanceRequest { + return ApiCloneInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return CloneInstanceResponse +func (a *DefaultAPIService) CloneInstanceExecute(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CloneInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CloneInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/clone" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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.cloneInstancePayload == nil { + return localVarReturnValue, reportError("cloneInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.cloneInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiCreateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string + createInstancePayload *CreateInstancePayload +} + +// payload +func (r ApiCreateInstanceRequest) CreateInstancePayload(createInstancePayload CreateInstancePayload) ApiCreateInstanceRequest { + r.createInstancePayload = &createInstancePayload + return r +} + +func (r ApiCreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { + return r.ApiService.CreateInstanceExecute(r) +} + +/* +CreateInstance Create instance + +Create and deploys an instance
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiCreateInstanceRequest +*/ +func (a *DefaultAPIService) CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateInstanceResponse +func (a *DefaultAPIService) CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances" + 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.createInstancePayload == nil { + return localVarReturnValue, reportError("createInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiCreateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string + createUserPayload *CreateUserPayload +} + +// payload +func (r ApiCreateUserRequest) CreateUserPayload(createUserPayload CreateUserPayload) ApiCreateUserRequest { + r.createUserPayload = &createUserPayload + return r +} + +func (r ApiCreateUserRequest) Execute() (*CreateUserResponse, error) { + return r.ApiService.CreateUserExecute(r) +} + +/* +CreateUser Create User + +create a new user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiCreateUserRequest +*/ +func (a *DefaultAPIService) CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return CreateUserResponse +func (a *DefaultAPIService) CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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.createUserPayload == nil { + return localVarReturnValue, reportError("createUserPayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createUserPayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + 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 + } + 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 ApiDeleteInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiDeleteInstanceRequest) Execute() error { + return r.ApiService.DeleteInstanceExecute(r) +} + +/* +DeleteInstance Delete instance + +removes an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiDeleteInstanceRequest +*/ +func (a *DefaultAPIService) DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteInstance") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return 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 newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiDeleteUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + region string +} + +func (r ApiDeleteUserRequest) Execute() error { + return r.ApiService.DeleteUserExecute(r) +} + +/* +DeleteUser Delete User + +delete mongodb user + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiDeleteUserRequest +*/ +func (a *DefaultAPIService) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// Execute executes the request +func (a *DefaultAPIService) DeleteUserExecute(r ApiDeleteUserRequest) error { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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"} + + // 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 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return 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 newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiGetBackupRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + backupId string + region string +} + +func (r ApiGetBackupRequest) Execute() (*GetBackupResponse, error) { + return r.ApiService.GetBackupExecute(r) +} + +/* +GetBackup Get backup + +Get details about a specific backup + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param backupId backup id + @param region The region which should be addressed + @return ApiGetBackupRequest +*/ +func (a *DefaultAPIService) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest { + return ApiGetBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + backupId: backupId, + region: region, + } +} + +// Execute executes the request +// +// @return GetBackupResponse +func (a *DefaultAPIService) GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetBackupResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetBackup") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"backupId"+"}", url.PathEscape(parameterValueToString(r.backupId, "backupId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiGetInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiGetInstanceRequest) Execute() (*InstanceResponse, error) { + return r.ApiService.GetInstanceExecute(r) +} + +/* +GetInstance Get instance + +gets information of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiGetInstanceRequest +*/ +func (a *DefaultAPIService) GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return InstanceResponse +func (a *DefaultAPIService) GetInstanceExecute(r ApiGetInstanceRequest) (*InstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *InstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + 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 ApiGetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + region string +} + +func (r ApiGetUserRequest) Execute() (*GetUserResponse, error) { + return r.ApiService.GetUserExecute(r) +} + +/* +GetUser Get User + +get detailed information of a user of a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiGetUserRequest +*/ +func (a *DefaultAPIService) GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// Execute executes the request +// +// @return GetUserResponse +func (a *DefaultAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GetUserResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListAdvisorSlowQueriesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesResponse, error) { + return r.ApiService.ListAdvisorSlowQueriesExecute(r) +} + +/* +ListAdvisorSlowQueries Get slow queries + +gets slow queries from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListAdvisorSlowQueriesRequest +*/ +func (a *DefaultAPIService) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string, region string) ApiListAdvisorSlowQueriesRequest { + return ApiListAdvisorSlowQueriesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return HandlersInstancesSlowQueriesResponse +func (a *DefaultAPIService) ListAdvisorSlowQueriesExecute(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HandlersInstancesSlowQueriesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListAdvisorSlowQueries") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/advisor/slow-queries" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListBackupsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiListBackupsRequest) Execute() (*ListBackupsResponse, error) { + return r.ApiService.ListBackupsExecute(r) +} + +/* +ListBackups List backup + +List backups of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListBackupsRequest +*/ +func (a *DefaultAPIService) ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest { + return ApiListBackupsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return ListBackupsResponse +func (a *DefaultAPIService) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListBackupsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListBackups") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiListFlavorsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { + return r.ApiService.ListFlavorsExecute(r) +} + +/* +ListFlavors Flavors + +returns all possible flavors + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiListFlavorsRequest +*/ +func (a *DefaultAPIService) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { + return ApiListFlavorsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListFlavorsResponse +func (a *DefaultAPIService) ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListFlavorsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListFlavors") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/flavors" + 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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + 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 ApiListInstancesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + tag *string + region string +} + +// instance tag +func (r ApiListInstancesRequest) Tag(tag string) ApiListInstancesRequest { + r.tag = &tag + return r +} + +func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { + return r.ApiService.ListInstancesExecute(r) +} + +/* +ListInstances List Instances + +list all instances for a projectID + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiListInstancesRequest +*/ +func (a *DefaultAPIService) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListInstancesResponse +func (a *DefaultAPIService) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListInstancesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListInstances") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances" + 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.tag == nil { + return localVarReturnValue, reportError("tag is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "tag", r.tag, "form", "") + // 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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + 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 ApiListMetricsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + metric string + granularity *string + region string + period *string + start *string + end *string +} + +// granularity +func (r ApiListMetricsRequest) Granularity(granularity string) ApiListMetricsRequest { + r.granularity = &granularity + return r +} + +// period +func (r ApiListMetricsRequest) Period(period string) ApiListMetricsRequest { + r.period = &period + return r +} + +// period start +func (r ApiListMetricsRequest) Start(start string) ApiListMetricsRequest { + r.start = &start + return r +} + +// period end +func (r ApiListMetricsRequest) End(end string) ApiListMetricsRequest { + r.end = &end + return r +} + +func (r ApiListMetricsRequest) Execute() (*ListMetricsResponse, error) { + return r.ApiService.ListMetricsExecute(r) +} + +/* +ListMetrics Metrics + +returns metrics for an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param metric metric type + @param region The region which should be addressed + @return ApiListMetricsRequest +*/ +func (a *DefaultAPIService) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string, region string) ApiListMetricsRequest { + return ApiListMetricsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + metric: metric, + region: region, + } +} + +// Execute executes the request +// +// @return ListMetricsResponse +func (a *DefaultAPIService) ListMetricsExecute(r ApiListMetricsRequest) (*ListMetricsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListMetricsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListMetrics") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"metric"+"}", url.PathEscape(parameterValueToString(r.metric, "metric")), -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.granularity == nil { + return localVarReturnValue, reportError("granularity is required and must be specified") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "granularity", r.granularity, "form", "") + if r.period != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "period", r.period, "form", "") + } + if r.start != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start", r.start, "form", "") + } + if r.end != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "end", r.end, "form", "") + } + // 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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListRestoreJobsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { + return r.ApiService.ListRestoreJobsExecute(r) +} + +/* +ListRestoreJobs List restore jobs + +List restore jobs of an instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListRestoreJobsRequest +*/ +func (a *DefaultAPIService) ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest { + return ApiListRestoreJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return ListRestoreJobsResponse +func (a *DefaultAPIService) ListRestoreJobsExecute(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListRestoreJobsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListRestoreJobs") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiListStoragesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + flavor string + region string +} + +func (r ApiListStoragesRequest) Execute() (*ListStoragesResponse, error) { + return r.ApiService.ListStoragesExecute(r) +} + +/* +ListStorages Get storage + +returns the storage for a certain flavor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param flavor flavor id + @param region The region which should be addressed + @return ApiListStoragesRequest +*/ +func (a *DefaultAPIService) ListStorages(ctx context.Context, projectId string, flavor string, region string) ApiListStoragesRequest { + return ApiListStoragesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + flavor: flavor, + region: region, + } +} + +// Execute executes the request +// +// @return ListStoragesResponse +func (a *DefaultAPIService) ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListStoragesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListStorages") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/storages/{flavor}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"flavor"+"}", url.PathEscape(parameterValueToString(r.flavor, "flavor")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiListSuggestedIndexesRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndexesResponse, error) { + return r.ApiService.ListSuggestedIndexesExecute(r) +} + +/* +ListSuggestedIndexes Get suggested indexes + +gets suggested indexes from the Opsmanager performance advisor + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListSuggestedIndexesRequest +*/ +func (a *DefaultAPIService) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string, region string) ApiListSuggestedIndexesRequest { + return ApiListSuggestedIndexesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return HandlersInstancesSuggestedIndexesResponse +func (a *DefaultAPIService) ListSuggestedIndexesExecute(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *HandlersInstancesSuggestedIndexesResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListSuggestedIndexes") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/advisor/suggested-indexes" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListUsersRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string +} + +func (r ApiListUsersRequest) Execute() (*ListUsersResponse, error) { + return r.ApiService.ListUsersExecute(r) +} + +/* +ListUsers List Users + +list all users for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiListUsersRequest +*/ +func (a *DefaultAPIService) ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return ListUsersResponse +func (a *DefaultAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListUsersResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListUsers") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiListVersionsRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + region string +} + +func (r ApiListVersionsRequest) Execute() (*ListVersionsResponse, error) { + return r.ApiService.ListVersionsExecute(r) +} + +/* +ListVersions Get versions + +returns all available versions for creating endpoint + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param region The region which should be addressed + @return ApiListVersionsRequest +*/ +func (a *DefaultAPIService) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { + return ApiListVersionsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// Execute executes the request +// +// @return ListVersionsResponse +func (a *DefaultAPIService) ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListVersionsResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListVersions") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/versions" + 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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 ApiPartialUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string + partialUpdateInstancePayload *PartialUpdateInstancePayload +} + +// payload +func (r ApiPartialUpdateInstanceRequest) PartialUpdateInstancePayload(partialUpdateInstancePayload PartialUpdateInstancePayload) ApiPartialUpdateInstanceRequest { + r.partialUpdateInstancePayload = &partialUpdateInstancePayload + return r +} + +func (r ApiPartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { + return r.ApiService.PartialUpdateInstanceExecute(r) +} + +/* +PartialUpdateInstance Patch endpoint + +Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiPartialUpdateInstanceRequest +*/ +func (a *DefaultAPIService) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest { + return ApiPartialUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return UpdateInstanceResponse +func (a *DefaultAPIService) PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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.partialUpdateInstancePayload == nil { + return localVarReturnValue, reportError("partialUpdateInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.partialUpdateInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + 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 + } + 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 ApiPartialUpdateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + region string + partialUpdateUserPayload *PartialUpdateUserPayload +} + +// payload +func (r ApiPartialUpdateUserRequest) PartialUpdateUserPayload(partialUpdateUserPayload PartialUpdateUserPayload) ApiPartialUpdateUserRequest { + r.partialUpdateUserPayload = &partialUpdateUserPayload + return r +} + +func (r ApiPartialUpdateUserRequest) Execute() error { + return r.ApiService.PartialUpdateUserExecute(r) +} + +/* +PartialUpdateUser Update User + +updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiPartialUpdateUserRequest +*/ +func (a *DefaultAPIService) PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiPartialUpdateUserRequest { + return ApiPartialUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// Execute executes the request +func (a *DefaultAPIService) PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) error { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PartialUpdateUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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.partialUpdateUserPayload == nil { + return reportError("partialUpdateUserPayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.partialUpdateUserPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} + +type ApiResetUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + region string +} + +func (r ApiResetUserRequest) Execute() (*User, error) { + return r.ApiService.ResetUserExecute(r) +} + +/* +ResetUser Reset User + +resets mongodb user's password + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiResetUserRequest +*/ +func (a *DefaultAPIService) ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest { + return ApiResetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// Execute executes the request +// +// @return User +func (a *DefaultAPIService) ResetUserExecute(r ApiResetUserRequest) (*User, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *User + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ResetUser") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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"} + + // 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + 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 ApiRestoreInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string + restoreInstancePayload *RestoreInstancePayload +} + +// payload +func (r ApiRestoreInstanceRequest) RestoreInstancePayload(restoreInstancePayload RestoreInstancePayload) ApiRestoreInstanceRequest { + r.restoreInstancePayload = &restoreInstancePayload + return r +} + +func (r ApiRestoreInstanceRequest) Execute() (*RestoreInstanceResponse, error) { + return r.ApiService.RestoreInstanceExecute(r) +} + +/* +RestoreInstance Restore instance + +Restore an instance based on snapshot + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiRestoreInstanceRequest +*/ +func (a *DefaultAPIService) RestoreInstance(ctx context.Context, projectId string, instanceId string, region string) ApiRestoreInstanceRequest { + return ApiRestoreInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return RestoreInstanceResponse +func (a *DefaultAPIService) RestoreInstanceExecute(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *RestoreInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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.restoreInstancePayload == nil { + return localVarReturnValue, reportError("restoreInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.restoreInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiUpdateBackupScheduleRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string + updateBackupSchedulePayload *UpdateBackupSchedulePayload +} + +// payload +func (r ApiUpdateBackupScheduleRequest) UpdateBackupSchedulePayload(updateBackupSchedulePayload UpdateBackupSchedulePayload) ApiUpdateBackupScheduleRequest { + r.updateBackupSchedulePayload = &updateBackupSchedulePayload + return r +} + +func (r ApiUpdateBackupScheduleRequest) Execute() (*BackupSchedule, error) { + return r.ApiService.UpdateBackupScheduleExecute(r) +} + +/* +UpdateBackupSchedule Update schedule + +Updates a backup schedule
Note that the time format is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiUpdateBackupScheduleRequest +*/ +func (a *DefaultAPIService) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateBackupScheduleRequest { + return ApiUpdateBackupScheduleRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return BackupSchedule +func (a *DefaultAPIService) UpdateBackupScheduleExecute(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *BackupSchedule + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateBackupSchedule") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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.updateBackupSchedulePayload == nil { + return localVarReturnValue, reportError("updateBackupSchedulePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateBackupSchedulePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 ApiUpdateInstanceRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + region string + updateInstancePayload *UpdateInstancePayload +} + +// payload +func (r ApiUpdateInstanceRequest) UpdateInstancePayload(updateInstancePayload UpdateInstancePayload) ApiUpdateInstanceRequest { + r.updateInstancePayload = &updateInstancePayload + return r +} + +func (r ApiUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { + return r.ApiService.UpdateInstanceExecute(r) +} + +/* +UpdateInstance Put endpoint + +Updates a deployment plan
Note that the time format for the backupSchedule is in UTC + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param region The region which should be addressed + @return ApiUpdateInstanceRequest +*/ +func (a *DefaultAPIService) UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// Execute executes the request +// +// @return UpdateInstanceResponse +func (a *DefaultAPIService) UpdateInstanceExecute(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *UpdateInstanceResponse + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateInstance") + if err != nil { + return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -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.updateInstancePayload == nil { + return localVarReturnValue, reportError("updateInstancePayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateInstancePayload + 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 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 + } + if localVarHTTPResponse.StatusCode == 401 { + 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 + } + if localVarHTTPResponse.StatusCode == 404 { + 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 + } + if localVarHTTPResponse.StatusCode == 409 { + 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 + } + 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 ApiUpdateUserRequest struct { + ctx context.Context + ApiService DefaultAPI + projectId string + instanceId string + userId string + region string + updateUserPayload *UpdateUserPayload +} + +// payload +func (r ApiUpdateUserRequest) UpdateUserPayload(updateUserPayload UpdateUserPayload) ApiUpdateUserRequest { + r.updateUserPayload = &updateUserPayload + return r +} + +func (r ApiUpdateUserRequest) Execute() error { + return r.ApiService.UpdateUserExecute(r) +} + +/* +UpdateUser Update User + +updates user for a mongodb instance + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param projectId project id + @param instanceId instance id + @param userId user id + @param region The region which should be addressed + @return ApiUpdateUserRequest +*/ +func (a *DefaultAPIService) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// Execute executes the request +func (a *DefaultAPIService) UpdateUserExecute(r ApiUpdateUserRequest) error { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateUser") + if err != nil { + return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} + } + + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(parameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(parameterValueToString(r.instanceId, "instanceId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", url.PathEscape(parameterValueToString(r.userId, "userId")), -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.updateUserPayload == nil { + return reportError("updateUserPayload 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"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateUserPayload + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return 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 err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &oapierror.GenericOpenAPIError{ + Body: localVarBody, + ErrorMessage: localVarHTTPResponse.Status, + StatusCode: localVarHTTPResponse.StatusCode, + } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + return newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + return newErr + } + + return nil +} diff --git a/services/mongodbflex/v2api/api_default_mock.go b/services/mongodbflex/v2api/api_default_mock.go new file mode 100644 index 000000000..6a29dbfb0 --- /dev/null +++ b/services/mongodbflex/v2api/api_default_mock.go @@ -0,0 +1,573 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +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 { + // CloneInstanceExecuteMock can be populated to implement the behavior of the CloneInstanceExecute function of this mock + CloneInstanceExecuteMock *func(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) + // CreateInstanceExecuteMock can be populated to implement the behavior of the CreateInstanceExecute function of this mock + CreateInstanceExecuteMock *func(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) + // CreateUserExecuteMock can be populated to implement the behavior of the CreateUserExecute function of this mock + CreateUserExecuteMock *func(r ApiCreateUserRequest) (*CreateUserResponse, error) + // DeleteInstanceExecuteMock can be populated to implement the behavior of the DeleteInstanceExecute function of this mock + DeleteInstanceExecuteMock *func(r ApiDeleteInstanceRequest) error + // DeleteUserExecuteMock can be populated to implement the behavior of the DeleteUserExecute function of this mock + DeleteUserExecuteMock *func(r ApiDeleteUserRequest) error + // GetBackupExecuteMock can be populated to implement the behavior of the GetBackupExecute function of this mock + GetBackupExecuteMock *func(r ApiGetBackupRequest) (*GetBackupResponse, error) + // GetInstanceExecuteMock can be populated to implement the behavior of the GetInstanceExecute function of this mock + GetInstanceExecuteMock *func(r ApiGetInstanceRequest) (*InstanceResponse, error) + // GetUserExecuteMock can be populated to implement the behavior of the GetUserExecute function of this mock + GetUserExecuteMock *func(r ApiGetUserRequest) (*GetUserResponse, error) + // ListAdvisorSlowQueriesExecuteMock can be populated to implement the behavior of the ListAdvisorSlowQueriesExecute function of this mock + ListAdvisorSlowQueriesExecuteMock *func(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) + // ListBackupsExecuteMock can be populated to implement the behavior of the ListBackupsExecute function of this mock + ListBackupsExecuteMock *func(r ApiListBackupsRequest) (*ListBackupsResponse, error) + // ListFlavorsExecuteMock can be populated to implement the behavior of the ListFlavorsExecute function of this mock + ListFlavorsExecuteMock *func(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) + // ListInstancesExecuteMock can be populated to implement the behavior of the ListInstancesExecute function of this mock + ListInstancesExecuteMock *func(r ApiListInstancesRequest) (*ListInstancesResponse, error) + // ListMetricsExecuteMock can be populated to implement the behavior of the ListMetricsExecute function of this mock + ListMetricsExecuteMock *func(r ApiListMetricsRequest) (*ListMetricsResponse, error) + // ListRestoreJobsExecuteMock can be populated to implement the behavior of the ListRestoreJobsExecute function of this mock + ListRestoreJobsExecuteMock *func(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) + // ListStoragesExecuteMock can be populated to implement the behavior of the ListStoragesExecute function of this mock + ListStoragesExecuteMock *func(r ApiListStoragesRequest) (*ListStoragesResponse, error) + // ListSuggestedIndexesExecuteMock can be populated to implement the behavior of the ListSuggestedIndexesExecute function of this mock + ListSuggestedIndexesExecuteMock *func(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) + // ListUsersExecuteMock can be populated to implement the behavior of the ListUsersExecute function of this mock + ListUsersExecuteMock *func(r ApiListUsersRequest) (*ListUsersResponse, error) + // ListVersionsExecuteMock can be populated to implement the behavior of the ListVersionsExecute function of this mock + ListVersionsExecuteMock *func(r ApiListVersionsRequest) (*ListVersionsResponse, error) + // PartialUpdateInstanceExecuteMock can be populated to implement the behavior of the PartialUpdateInstanceExecute function of this mock + PartialUpdateInstanceExecuteMock *func(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) + // PartialUpdateUserExecuteMock can be populated to implement the behavior of the PartialUpdateUserExecute function of this mock + PartialUpdateUserExecuteMock *func(r ApiPartialUpdateUserRequest) error + // ResetUserExecuteMock can be populated to implement the behavior of the ResetUserExecute function of this mock + ResetUserExecuteMock *func(r ApiResetUserRequest) (*User, error) + // RestoreInstanceExecuteMock can be populated to implement the behavior of the RestoreInstanceExecute function of this mock + RestoreInstanceExecuteMock *func(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) + // UpdateBackupScheduleExecuteMock can be populated to implement the behavior of the UpdateBackupScheduleExecute function of this mock + UpdateBackupScheduleExecuteMock *func(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) + // UpdateInstanceExecuteMock can be populated to implement the behavior of the UpdateInstanceExecute function of this mock + UpdateInstanceExecuteMock *func(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) + // UpdateUserExecuteMock can be populated to implement the behavior of the UpdateUserExecute function of this mock + UpdateUserExecuteMock *func(r ApiUpdateUserRequest) error +} + +func (a DefaultAPIServiceMock) CloneInstance(ctx context.Context, projectId string, instanceId string, region string) ApiCloneInstanceRequest { + return ApiCloneInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// CloneInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CloneInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CloneInstanceExecute(r ApiCloneInstanceRequest) (*CloneInstanceResponse, error) { + if a.CloneInstanceExecuteMock == nil { + var localVarReturnValue *CloneInstanceResponse + return localVarReturnValue, nil + } + + return (*a.CloneInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest { + return ApiCreateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// CreateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateInstanceExecute(r ApiCreateInstanceRequest) (*CreateInstanceResponse, error) { + if a.CreateInstanceExecuteMock == nil { + var localVarReturnValue *CreateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.CreateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest { + return ApiCreateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// CreateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the CreateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) CreateUserExecute(r ApiCreateUserRequest) (*CreateUserResponse, error) { + if a.CreateUserExecuteMock == nil { + var localVarReturnValue *CreateUserResponse + return localVarReturnValue, nil + } + + return (*a.CreateUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest { + return ApiDeleteInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// DeleteInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteInstanceExecute(r ApiDeleteInstanceRequest) error { + if a.DeleteInstanceExecuteMock == nil { + return nil + } + + return (*a.DeleteInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest { + return ApiDeleteUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// DeleteUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the DeleteUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) DeleteUserExecute(r ApiDeleteUserRequest) error { + if a.DeleteUserExecuteMock == nil { + return nil + } + + return (*a.DeleteUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest { + return ApiGetBackupRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + backupId: backupId, + region: region, + } +} + +// GetBackupExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetBackupExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetBackupExecute(r ApiGetBackupRequest) (*GetBackupResponse, error) { + if a.GetBackupExecuteMock == nil { + var localVarReturnValue *GetBackupResponse + return localVarReturnValue, nil + } + + return (*a.GetBackupExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest { + return ApiGetInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// GetInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetInstanceExecute(r ApiGetInstanceRequest) (*InstanceResponse, error) { + if a.GetInstanceExecuteMock == nil { + var localVarReturnValue *InstanceResponse + return localVarReturnValue, nil + } + + return (*a.GetInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest { + return ApiGetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// GetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the GetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) GetUserExecute(r ApiGetUserRequest) (*GetUserResponse, error) { + if a.GetUserExecuteMock == nil { + var localVarReturnValue *GetUserResponse + return localVarReturnValue, nil + } + + return (*a.GetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string, region string) ApiListAdvisorSlowQueriesRequest { + return ApiListAdvisorSlowQueriesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// ListAdvisorSlowQueriesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListAdvisorSlowQueriesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListAdvisorSlowQueriesExecute(r ApiListAdvisorSlowQueriesRequest) (*HandlersInstancesSlowQueriesResponse, error) { + if a.ListAdvisorSlowQueriesExecuteMock == nil { + var localVarReturnValue *HandlersInstancesSlowQueriesResponse + return localVarReturnValue, nil + } + + return (*a.ListAdvisorSlowQueriesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest { + return ApiListBackupsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// ListBackupsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListBackupsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListBackupsExecute(r ApiListBackupsRequest) (*ListBackupsResponse, error) { + if a.ListBackupsExecuteMock == nil { + var localVarReturnValue *ListBackupsResponse + return localVarReturnValue, nil + } + + return (*a.ListBackupsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { + return ApiListFlavorsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListFlavorsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListFlavorsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListFlavorsExecute(r ApiListFlavorsRequest) (*ListFlavorsResponse, error) { + if a.ListFlavorsExecuteMock == nil { + var localVarReturnValue *ListFlavorsResponse + return localVarReturnValue, nil + } + + return (*a.ListFlavorsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { + return ApiListInstancesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListInstancesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListInstancesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListInstancesExecute(r ApiListInstancesRequest) (*ListInstancesResponse, error) { + if a.ListInstancesExecuteMock == nil { + var localVarReturnValue *ListInstancesResponse + return localVarReturnValue, nil + } + + return (*a.ListInstancesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string, region string) ApiListMetricsRequest { + return ApiListMetricsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + metric: metric, + region: region, + } +} + +// ListMetricsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListMetricsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListMetricsExecute(r ApiListMetricsRequest) (*ListMetricsResponse, error) { + if a.ListMetricsExecuteMock == nil { + var localVarReturnValue *ListMetricsResponse + return localVarReturnValue, nil + } + + return (*a.ListMetricsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest { + return ApiListRestoreJobsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// ListRestoreJobsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListRestoreJobsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListRestoreJobsExecute(r ApiListRestoreJobsRequest) (*ListRestoreJobsResponse, error) { + if a.ListRestoreJobsExecuteMock == nil { + var localVarReturnValue *ListRestoreJobsResponse + return localVarReturnValue, nil + } + + return (*a.ListRestoreJobsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListStorages(ctx context.Context, projectId string, flavor string, region string) ApiListStoragesRequest { + return ApiListStoragesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + flavor: flavor, + region: region, + } +} + +// ListStoragesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListStoragesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListStoragesExecute(r ApiListStoragesRequest) (*ListStoragesResponse, error) { + if a.ListStoragesExecuteMock == nil { + var localVarReturnValue *ListStoragesResponse + return localVarReturnValue, nil + } + + return (*a.ListStoragesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string, region string) ApiListSuggestedIndexesRequest { + return ApiListSuggestedIndexesRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// ListSuggestedIndexesExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListSuggestedIndexesExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListSuggestedIndexesExecute(r ApiListSuggestedIndexesRequest) (*HandlersInstancesSuggestedIndexesResponse, error) { + if a.ListSuggestedIndexesExecuteMock == nil { + var localVarReturnValue *HandlersInstancesSuggestedIndexesResponse + return localVarReturnValue, nil + } + + return (*a.ListSuggestedIndexesExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest { + return ApiListUsersRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// ListUsersExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListUsersExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListUsersExecute(r ApiListUsersRequest) (*ListUsersResponse, error) { + if a.ListUsersExecuteMock == nil { + var localVarReturnValue *ListUsersResponse + return localVarReturnValue, nil + } + + return (*a.ListUsersExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { + return ApiListVersionsRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + region: region, + } +} + +// ListVersionsExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ListVersionsExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ListVersionsExecute(r ApiListVersionsRequest) (*ListVersionsResponse, error) { + if a.ListVersionsExecuteMock == nil { + var localVarReturnValue *ListVersionsResponse + return localVarReturnValue, nil + } + + return (*a.ListVersionsExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest { + return ApiPartialUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// PartialUpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateInstanceExecute(r ApiPartialUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + if a.PartialUpdateInstanceExecuteMock == nil { + var localVarReturnValue *UpdateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.PartialUpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiPartialUpdateUserRequest { + return ApiPartialUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// PartialUpdateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the PartialUpdateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) PartialUpdateUserExecute(r ApiPartialUpdateUserRequest) error { + if a.PartialUpdateUserExecuteMock == nil { + return nil + } + + return (*a.PartialUpdateUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest { + return ApiResetUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// ResetUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the ResetUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) ResetUserExecute(r ApiResetUserRequest) (*User, error) { + if a.ResetUserExecuteMock == nil { + var localVarReturnValue *User + return localVarReturnValue, nil + } + + return (*a.ResetUserExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) RestoreInstance(ctx context.Context, projectId string, instanceId string, region string) ApiRestoreInstanceRequest { + return ApiRestoreInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// RestoreInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the RestoreInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) RestoreInstanceExecute(r ApiRestoreInstanceRequest) (*RestoreInstanceResponse, error) { + if a.RestoreInstanceExecuteMock == nil { + var localVarReturnValue *RestoreInstanceResponse + return localVarReturnValue, nil + } + + return (*a.RestoreInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateBackupScheduleRequest { + return ApiUpdateBackupScheduleRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// UpdateBackupScheduleExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateBackupScheduleExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateBackupScheduleExecute(r ApiUpdateBackupScheduleRequest) (*BackupSchedule, error) { + if a.UpdateBackupScheduleExecuteMock == nil { + var localVarReturnValue *BackupSchedule + return localVarReturnValue, nil + } + + return (*a.UpdateBackupScheduleExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest { + return ApiUpdateInstanceRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + region: region, + } +} + +// UpdateInstanceExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateInstanceExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateInstanceExecute(r ApiUpdateInstanceRequest) (*UpdateInstanceResponse, error) { + if a.UpdateInstanceExecuteMock == nil { + var localVarReturnValue *UpdateInstanceResponse + return localVarReturnValue, nil + } + + return (*a.UpdateInstanceExecuteMock)(r) +} + +func (a DefaultAPIServiceMock) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiUpdateUserRequest { + return ApiUpdateUserRequest{ + ApiService: a, + ctx: ctx, + projectId: projectId, + instanceId: instanceId, + userId: userId, + region: region, + } +} + +// UpdateUserExecute is a no-op by default and will return only return nil values. Behavior can be controlled by populating the UpdateUserExecuteMock field in the DefaultAPIServiceMock struct. +func (a DefaultAPIServiceMock) UpdateUserExecute(r ApiUpdateUserRequest) error { + if a.UpdateUserExecuteMock == nil { + return nil + } + + return (*a.UpdateUserExecuteMock)(r) +} diff --git a/services/mongodbflex/v2api/client.go b/services/mongodbflex/v2api/client.go new file mode 100644 index 000000000..1abf3a268 --- /dev/null +++ b/services/mongodbflex/v2api/client.go @@ -0,0 +1,659 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v2api + +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 MongoDB Service API API v2.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/mongodbflex/v2api/configuration.go b/services/mongodbflex/v2api/configuration.go new file mode 100644 index 000000000..38bd17f6f --- /dev/null +++ b/services/mongodbflex/v2api/configuration.go @@ -0,0 +1,38 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. +package v2api + +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/mongodbflex", + Debug: false, + Servers: config.ServerConfigurations{ + { + URL: "https://mongodb-flex-service.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/mongodbflex/v2api/model_acl.go b/services/mongodbflex/v2api/model_acl.go new file mode 100644 index 000000000..edb9a72f1 --- /dev/null +++ b/services/mongodbflex/v2api/model_acl.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ACL type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ACL{} + +// ACL struct for ACL +type ACL struct { + Items []string `json:"items,omitempty"` +} + +// NewACL instantiates a new ACL 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 NewACL() *ACL { + this := ACL{} + return &this +} + +// NewACLWithDefaults instantiates a new ACL object +// This 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 NewACLWithDefaults() *ACL { + this := ACL{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ACL) GetItems() []string { + if o == nil || IsNil(o.Items) { + var ret []string + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ACL) GetItemsOk() ([]string, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ACL) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []string and assigns it to the Items field. +func (o *ACL) SetItems(v []string) { + o.Items = v +} + +func (o ACL) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ACL) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableACL struct { + value *ACL + isSet bool +} + +func (v NullableACL) Get() *ACL { + return v.value +} + +func (v *NullableACL) Set(val *ACL) { + v.value = val + v.isSet = true +} + +func (v NullableACL) IsSet() bool { + return v.isSet +} + +func (v *NullableACL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableACL(val *ACL) *NullableACL { + return &NullableACL{value: val, isSet: true} +} + +func (v NullableACL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableACL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_backup.go b/services/mongodbflex/v2api/model_backup.go new file mode 100644 index 000000000..e26547c40 --- /dev/null +++ b/services/mongodbflex/v2api/model_backup.go @@ -0,0 +1,377 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Backup type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Backup{} + +// Backup struct for Backup +type Backup struct { + EndTime *string `json:"endTime,omitempty"` + Error *string `json:"error,omitempty"` + Id *string `json:"id,omitempty"` + Labels []string `json:"labels,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + Size *int64 `json:"size,omitempty"` + StartTime *string `json:"startTime,omitempty"` +} + +// NewBackup instantiates a new Backup object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewBackup() *Backup { + this := Backup{} + return &this +} + +// NewBackupWithDefaults instantiates a new Backup object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewBackupWithDefaults() *Backup { + this := Backup{} + return &this +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *Backup) GetEndTime() string { + if o == nil || IsNil(o.EndTime) { + var ret string + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetEndTimeOk() (*string, bool) { + if o == nil || IsNil(o.EndTime) { + return nil, false + } + return o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *Backup) HasEndTime() bool { + if o != nil && !IsNil(o.EndTime) { + return true + } + + return false +} + +// SetEndTime gets a reference to the given string and assigns it to the EndTime field. +func (o *Backup) SetEndTime(v string) { + o.EndTime = &v +} + +// GetError returns the Error field value if set, zero value otherwise. +func (o *Backup) GetError() string { + if o == nil || IsNil(o.Error) { + var ret string + return ret + } + return *o.Error +} + +// GetErrorOk returns a tuple with the Error field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetErrorOk() (*string, bool) { + if o == nil || IsNil(o.Error) { + return nil, false + } + return o.Error, true +} + +// HasError returns a boolean if a field has been set. +func (o *Backup) HasError() bool { + if o != nil && !IsNil(o.Error) { + return true + } + + return false +} + +// SetError gets a reference to the given string and assigns it to the Error field. +func (o *Backup) SetError(v string) { + o.Error = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Backup) 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 *Backup) 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 *Backup) 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 *Backup) SetId(v string) { + o.Id = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *Backup) GetLabels() []string { + if o == nil || IsNil(o.Labels) { + var ret []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 *Backup) GetLabelsOk() ([]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 *Backup) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *Backup) SetLabels(v []string) { + o.Labels = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Backup) 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 *Backup) 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 *Backup) 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 *Backup) SetName(v string) { + o.Name = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Backup) GetOptions() map[string]string { + if o == nil || IsNil(o.Options) { + var ret map[string]string + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Backup) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Backup) SetOptions(v map[string]string) { + o.Options = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Backup) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Backup) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Backup) SetSize(v int64) { + o.Size = &v +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *Backup) GetStartTime() string { + if o == nil || IsNil(o.StartTime) { + var ret string + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Backup) GetStartTimeOk() (*string, bool) { + if o == nil || IsNil(o.StartTime) { + return nil, false + } + return o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *Backup) HasStartTime() bool { + if o != nil && !IsNil(o.StartTime) { + return true + } + + return false +} + +// SetStartTime gets a reference to the given string and assigns it to the StartTime field. +func (o *Backup) SetStartTime(v string) { + o.StartTime = &v +} + +func (o Backup) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Backup) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EndTime) { + toSerialize["endTime"] = o.EndTime + } + if !IsNil(o.Error) { + toSerialize["error"] = o.Error + } + 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.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + if !IsNil(o.StartTime) { + toSerialize["startTime"] = o.StartTime + } + return toSerialize, nil +} + +type NullableBackup struct { + value *Backup + isSet bool +} + +func (v NullableBackup) Get() *Backup { + return v.value +} + +func (v *NullableBackup) Set(val *Backup) { + v.value = val + v.isSet = true +} + +func (v NullableBackup) IsSet() bool { + return v.isSet +} + +func (v *NullableBackup) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackup(val *Backup) *NullableBackup { + return &NullableBackup{value: val, isSet: true} +} + +func (v NullableBackup) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackup) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_backup_schedule.go b/services/mongodbflex/v2api/model_backup_schedule.go new file mode 100644 index 000000000..0926beed9 --- /dev/null +++ b/services/mongodbflex/v2api/model_backup_schedule.go @@ -0,0 +1,305 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the BackupSchedule type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &BackupSchedule{} + +// BackupSchedule struct for BackupSchedule +type BackupSchedule struct { + BackupSchedule *string `json:"backupSchedule,omitempty"` + DailySnapshotRetentionDays *int32 `json:"dailySnapshotRetentionDays,omitempty"` + MonthlySnapshotRetentionMonths *int32 `json:"monthlySnapshotRetentionMonths,omitempty"` + PointInTimeWindowHours *int32 `json:"pointInTimeWindowHours,omitempty"` + SnapshotRetentionDays *int32 `json:"snapshotRetentionDays,omitempty"` + WeeklySnapshotRetentionWeeks *int32 `json:"weeklySnapshotRetentionWeeks,omitempty"` +} + +// NewBackupSchedule instantiates a new BackupSchedule 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 NewBackupSchedule() *BackupSchedule { + this := BackupSchedule{} + return &this +} + +// NewBackupScheduleWithDefaults instantiates a new BackupSchedule object +// This 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 NewBackupScheduleWithDefaults() *BackupSchedule { + this := BackupSchedule{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *BackupSchedule) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *BackupSchedule) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *BackupSchedule) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. +func (o *BackupSchedule) GetDailySnapshotRetentionDays() int32 { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.DailySnapshotRetentionDays +} + +// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetDailySnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + return nil, false + } + return o.DailySnapshotRetentionDays, true +} + +// HasDailySnapshotRetentionDays returns a boolean if a field has been set. +func (o *BackupSchedule) HasDailySnapshotRetentionDays() bool { + if o != nil && !IsNil(o.DailySnapshotRetentionDays) { + return true + } + + return false +} + +// SetDailySnapshotRetentionDays gets a reference to the given int32 and assigns it to the DailySnapshotRetentionDays field. +func (o *BackupSchedule) SetDailySnapshotRetentionDays(v int32) { + o.DailySnapshotRetentionDays = &v +} + +// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. +func (o *BackupSchedule) GetMonthlySnapshotRetentionMonths() int32 { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + var ret int32 + return ret + } + return *o.MonthlySnapshotRetentionMonths +} + +// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetMonthlySnapshotRetentionMonthsOk() (*int32, bool) { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + return nil, false + } + return o.MonthlySnapshotRetentionMonths, true +} + +// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. +func (o *BackupSchedule) HasMonthlySnapshotRetentionMonths() bool { + if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { + return true + } + + return false +} + +// SetMonthlySnapshotRetentionMonths gets a reference to the given int32 and assigns it to the MonthlySnapshotRetentionMonths field. +func (o *BackupSchedule) SetMonthlySnapshotRetentionMonths(v int32) { + o.MonthlySnapshotRetentionMonths = &v +} + +// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. +func (o *BackupSchedule) GetPointInTimeWindowHours() int32 { + if o == nil || IsNil(o.PointInTimeWindowHours) { + var ret int32 + return ret + } + return *o.PointInTimeWindowHours +} + +// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetPointInTimeWindowHoursOk() (*int32, bool) { + if o == nil || IsNil(o.PointInTimeWindowHours) { + return nil, false + } + return o.PointInTimeWindowHours, true +} + +// HasPointInTimeWindowHours returns a boolean if a field has been set. +func (o *BackupSchedule) HasPointInTimeWindowHours() bool { + if o != nil && !IsNil(o.PointInTimeWindowHours) { + return true + } + + return false +} + +// SetPointInTimeWindowHours gets a reference to the given int32 and assigns it to the PointInTimeWindowHours field. +func (o *BackupSchedule) SetPointInTimeWindowHours(v int32) { + o.PointInTimeWindowHours = &v +} + +// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. +func (o *BackupSchedule) GetSnapshotRetentionDays() int32 { + if o == nil || IsNil(o.SnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.SnapshotRetentionDays +} + +// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetSnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.SnapshotRetentionDays) { + return nil, false + } + return o.SnapshotRetentionDays, true +} + +// HasSnapshotRetentionDays returns a boolean if a field has been set. +func (o *BackupSchedule) HasSnapshotRetentionDays() bool { + if o != nil && !IsNil(o.SnapshotRetentionDays) { + return true + } + + return false +} + +// SetSnapshotRetentionDays gets a reference to the given int32 and assigns it to the SnapshotRetentionDays field. +func (o *BackupSchedule) SetSnapshotRetentionDays(v int32) { + o.SnapshotRetentionDays = &v +} + +// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. +func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeks() int32 { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + var ret int32 + return ret + } + return *o.WeeklySnapshotRetentionWeeks +} + +// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *BackupSchedule) GetWeeklySnapshotRetentionWeeksOk() (*int32, bool) { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + return nil, false + } + return o.WeeklySnapshotRetentionWeeks, true +} + +// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. +func (o *BackupSchedule) HasWeeklySnapshotRetentionWeeks() bool { + if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { + return true + } + + return false +} + +// SetWeeklySnapshotRetentionWeeks gets a reference to the given int32 and assigns it to the WeeklySnapshotRetentionWeeks field. +func (o *BackupSchedule) SetWeeklySnapshotRetentionWeeks(v int32) { + o.WeeklySnapshotRetentionWeeks = &v +} + +func (o BackupSchedule) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o BackupSchedule) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.DailySnapshotRetentionDays) { + toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays + } + if !IsNil(o.MonthlySnapshotRetentionMonths) { + toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths + } + if !IsNil(o.PointInTimeWindowHours) { + toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours + } + if !IsNil(o.SnapshotRetentionDays) { + toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays + } + if !IsNil(o.WeeklySnapshotRetentionWeeks) { + toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks + } + return toSerialize, nil +} + +type NullableBackupSchedule struct { + value *BackupSchedule + isSet bool +} + +func (v NullableBackupSchedule) Get() *BackupSchedule { + return v.value +} + +func (v *NullableBackupSchedule) Set(val *BackupSchedule) { + v.value = val + v.isSet = true +} + +func (v NullableBackupSchedule) IsSet() bool { + return v.isSet +} + +func (v *NullableBackupSchedule) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableBackupSchedule(val *BackupSchedule) *NullableBackupSchedule { + return &NullableBackupSchedule{value: val, isSet: true} +} + +func (v NullableBackupSchedule) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableBackupSchedule) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_clone_instance_payload.go b/services/mongodbflex/v2api/model_clone_instance_payload.go new file mode 100644 index 000000000..382f28259 --- /dev/null +++ b/services/mongodbflex/v2api/model_clone_instance_payload.go @@ -0,0 +1,193 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CloneInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstancePayload{} + +// CloneInstancePayload struct for CloneInstancePayload +type CloneInstancePayload struct { + InstanceId string `json:"instanceId"` + Timestamp *string `json:"timestamp,omitempty"` +} + +type _CloneInstancePayload CloneInstancePayload + +// NewCloneInstancePayload instantiates a new CloneInstancePayload 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 NewCloneInstancePayload(instanceId string) *CloneInstancePayload { + this := CloneInstancePayload{} + this.InstanceId = instanceId + return &this +} + +// NewCloneInstancePayloadWithDefaults instantiates a new CloneInstancePayload object +// This 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 NewCloneInstancePayloadWithDefaults() *CloneInstancePayload { + this := CloneInstancePayload{} + return &this +} + +// GetInstanceId returns the InstanceId field value +func (o *CloneInstancePayload) GetInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *CloneInstancePayload) SetInstanceId(v string) { + o.InstanceId = v +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *CloneInstancePayload) GetTimestamp() string { + if o == nil || IsNil(o.Timestamp) { + var ret string + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstancePayload) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *CloneInstancePayload) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *CloneInstancePayload) SetTimestamp(v string) { + o.Timestamp = &v +} + +func (o CloneInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["instanceId"] = o.InstanceId + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + return toSerialize, nil +} + +func (o *CloneInstancePayload) 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{ + "instanceId", + } + + 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) + } + } + + varCloneInstancePayload := _CloneInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCloneInstancePayload) + + if err != nil { + return err + } + + *o = CloneInstancePayload(varCloneInstancePayload) + + return err +} + +type NullableCloneInstancePayload struct { + value *CloneInstancePayload + isSet bool +} + +func (v NullableCloneInstancePayload) Get() *CloneInstancePayload { + return v.value +} + +func (v *NullableCloneInstancePayload) Set(val *CloneInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstancePayload(val *CloneInstancePayload) *NullableCloneInstancePayload { + return &NullableCloneInstancePayload{value: val, isSet: true} +} + +func (v NullableCloneInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_clone_instance_response.go b/services/mongodbflex/v2api/model_clone_instance_response.go new file mode 100644 index 000000000..4eeb750df --- /dev/null +++ b/services/mongodbflex/v2api/model_clone_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the CloneInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CloneInstanceResponse{} + +// CloneInstanceResponse struct for CloneInstanceResponse +type CloneInstanceResponse struct { + InstanceId *string `json:"instanceId,omitempty"` +} + +// NewCloneInstanceResponse instantiates a new CloneInstanceResponse 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 NewCloneInstanceResponse() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// NewCloneInstanceResponseWithDefaults instantiates a new CloneInstanceResponse object +// This 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 NewCloneInstanceResponseWithDefaults() *CloneInstanceResponse { + this := CloneInstanceResponse{} + return &this +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *CloneInstanceResponse) GetInstanceId() string { + if o == nil || IsNil(o.InstanceId) { + var ret string + return ret + } + return *o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CloneInstanceResponse) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *CloneInstanceResponse) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *CloneInstanceResponse) SetInstanceId(v string) { + o.InstanceId = &v +} + +func (o CloneInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CloneInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + return toSerialize, nil +} + +type NullableCloneInstanceResponse struct { + value *CloneInstanceResponse + isSet bool +} + +func (v NullableCloneInstanceResponse) Get() *CloneInstanceResponse { + return v.value +} + +func (v *NullableCloneInstanceResponse) Set(val *CloneInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCloneInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCloneInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCloneInstanceResponse(val *CloneInstanceResponse) *NullableCloneInstanceResponse { + return &NullableCloneInstanceResponse{value: val, isSet: true} +} + +func (v NullableCloneInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCloneInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_create_instance_payload.go b/services/mongodbflex/v2api/model_create_instance_payload.go new file mode 100644 index 000000000..4d4383b18 --- /dev/null +++ b/services/mongodbflex/v2api/model_create_instance_payload.go @@ -0,0 +1,391 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayload{} + +// CreateInstancePayload struct for CreateInstancePayload +type CreateInstancePayload struct { + // ACL is the Access Control List defining the IP ranges allowed to connect to the database + Acl ACL `json:"acl"` + BackupSchedule string `json:"backupSchedule"` + FlavorId string `json:"flavorId"` + // Labels field is not certain/clear + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name"` + Options map[string]string `json:"options"` + Replicas int32 `json:"replicas"` + Storage Storage `json:"storage"` + Version string `json:"version"` +} + +type _CreateInstancePayload CreateInstancePayload + +// NewCreateInstancePayload instantiates a new CreateInstancePayload 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 NewCreateInstancePayload(acl ACL, backupSchedule string, flavorId string, name string, options map[string]string, replicas int32, storage Storage, version string) *CreateInstancePayload { + this := CreateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + this.Version = version + return &this +} + +// NewCreateInstancePayloadWithDefaults instantiates a new CreateInstancePayload object +// This 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 NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { + this := CreateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value +func (o *CreateInstancePayload) GetAcl() ACL { + if o == nil { + var ret ACL + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil { + return nil, false + } + return &o.Acl, true +} + +// SetAcl sets field value +func (o *CreateInstancePayload) SetAcl(v ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *CreateInstancePayload) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *CreateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *CreateInstancePayload) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *CreateInstancePayload) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreateInstancePayload) 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 *CreateInstancePayload) 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 *CreateInstancePayload) 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 *CreateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *CreateInstancePayload) 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 *CreateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateInstancePayload) SetName(v string) { + o.Name = v +} + +// GetOptions returns the Options field value +func (o *CreateInstancePayload) GetOptions() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Options, true +} + +// SetOptions sets field value +func (o *CreateInstancePayload) SetOptions(v map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *CreateInstancePayload) GetReplicas() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetReplicasOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.Replicas, true +} + +// SetReplicas sets field value +func (o *CreateInstancePayload) SetReplicas(v int32) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *CreateInstancePayload) GetStorage() Storage { + if o == nil { + var ret Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *CreateInstancePayload) SetStorage(v Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *CreateInstancePayload) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *CreateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *CreateInstancePayload) SetVersion(v string) { + o.Version = v +} + +func (o CreateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *CreateInstancePayload) 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{ + "acl", + "backupSchedule", + "flavorId", + "name", + "options", + "replicas", + "storage", + "version", + } + + 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) + } + } + + varCreateInstancePayload := _CreateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateInstancePayload) + + if err != nil { + return err + } + + *o = CreateInstancePayload(varCreateInstancePayload) + + return err +} + +type NullableCreateInstancePayload struct { + value *CreateInstancePayload + isSet bool +} + +func (v NullableCreateInstancePayload) Get() *CreateInstancePayload { + return v.value +} + +func (v *NullableCreateInstancePayload) Set(val *CreateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayload(val *CreateInstancePayload) *NullableCreateInstancePayload { + return &NullableCreateInstancePayload{value: val, isSet: true} +} + +func (v NullableCreateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_create_instance_response.go b/services/mongodbflex/v2api/model_create_instance_response.go new file mode 100644 index 000000000..62b05587f --- /dev/null +++ b/services/mongodbflex/v2api/model_create_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the CreateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstanceResponse{} + +// CreateInstanceResponse struct for CreateInstanceResponse +type CreateInstanceResponse struct { + Id *string `json:"id,omitempty"` +} + +// NewCreateInstanceResponse instantiates a new CreateInstanceResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateInstanceResponse() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// NewCreateInstanceResponseWithDefaults instantiates a new CreateInstanceResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateInstanceResponseWithDefaults() *CreateInstanceResponse { + this := CreateInstanceResponse{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *CreateInstanceResponse) 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 *CreateInstanceResponse) 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 *CreateInstanceResponse) 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 *CreateInstanceResponse) SetId(v string) { + o.Id = &v +} + +func (o CreateInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableCreateInstanceResponse struct { + value *CreateInstanceResponse + isSet bool +} + +func (v NullableCreateInstanceResponse) Get() *CreateInstanceResponse { + return v.value +} + +func (v *NullableCreateInstanceResponse) Set(val *CreateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstanceResponse(val *CreateInstanceResponse) *NullableCreateInstanceResponse { + return &NullableCreateInstanceResponse{value: val, isSet: true} +} + +func (v NullableCreateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_create_user_payload.go b/services/mongodbflex/v2api/model_create_user_payload.go new file mode 100644 index 000000000..3a3f56895 --- /dev/null +++ b/services/mongodbflex/v2api/model_create_user_payload.go @@ -0,0 +1,222 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the CreateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserPayload{} + +// CreateUserPayload struct for CreateUserPayload +type CreateUserPayload struct { + Database string `json:"database"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles"` + Username *string `json:"username,omitempty"` +} + +type _CreateUserPayload CreateUserPayload + +// NewCreateUserPayload instantiates a new CreateUserPayload 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 NewCreateUserPayload(database string, roles []string) *CreateUserPayload { + this := CreateUserPayload{} + this.Database = database + this.Roles = roles + return &this +} + +// NewCreateUserPayloadWithDefaults instantiates a new CreateUserPayload object +// This 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 NewCreateUserPayloadWithDefaults() *CreateUserPayload { + this := CreateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value +func (o *CreateUserPayload) GetDatabase() string { + if o == nil { + var ret string + return ret + } + + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Database, true +} + +// SetDatabase sets field value +func (o *CreateUserPayload) SetDatabase(v string) { + o.Database = v +} + +// GetRoles returns the Roles field value +func (o *CreateUserPayload) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *CreateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreateUserPayload) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserPayload) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreateUserPayload) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreateUserPayload) SetUsername(v string) { + o.Username = &v +} + +func (o CreateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database"] = o.Database + toSerialize["roles"] = o.Roles + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +func (o *CreateUserPayload) 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{ + "database", + "roles", + } + + 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) + } + } + + varCreateUserPayload := _CreateUserPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varCreateUserPayload) + + if err != nil { + return err + } + + *o = CreateUserPayload(varCreateUserPayload) + + return err +} + +type NullableCreateUserPayload struct { + value *CreateUserPayload + isSet bool +} + +func (v NullableCreateUserPayload) Get() *CreateUserPayload { + return v.value +} + +func (v *NullableCreateUserPayload) Set(val *CreateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserPayload(val *CreateUserPayload) *NullableCreateUserPayload { + return &NullableCreateUserPayload{value: val, isSet: true} +} + +func (v NullableCreateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_create_user_response.go b/services/mongodbflex/v2api/model_create_user_response.go new file mode 100644 index 000000000..f2b4df57f --- /dev/null +++ b/services/mongodbflex/v2api/model_create_user_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the CreateUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateUserResponse{} + +// CreateUserResponse struct for CreateUserResponse +type CreateUserResponse struct { + Item *User `json:"item,omitempty"` +} + +// NewCreateUserResponse instantiates a new CreateUserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateUserResponse() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// NewCreateUserResponseWithDefaults instantiates a new CreateUserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateUserResponseWithDefaults() *CreateUserResponse { + this := CreateUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *CreateUserResponse) GetItem() User { + if o == nil || IsNil(o.Item) { + var ret User + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateUserResponse) GetItemOk() (*User, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *CreateUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given User and assigns it to the Item field. +func (o *CreateUserResponse) SetItem(v User) { + o.Item = &v +} + +func (o CreateUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableCreateUserResponse struct { + value *CreateUserResponse + isSet bool +} + +func (v NullableCreateUserResponse) Get() *CreateUserResponse { + return v.value +} + +func (v *NullableCreateUserResponse) Set(val *CreateUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableCreateUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateUserResponse(val *CreateUserResponse) *NullableCreateUserResponse { + return &NullableCreateUserResponse{value: val, isSet: true} +} + +func (v NullableCreateUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_data_point.go b/services/mongodbflex/v2api/model_data_point.go new file mode 100644 index 000000000..ae6c19d10 --- /dev/null +++ b/services/mongodbflex/v2api/model_data_point.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the DataPoint type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DataPoint{} + +// DataPoint struct for DataPoint +type DataPoint struct { + Timestamp *string `json:"timestamp,omitempty"` + Value *float32 `json:"value,omitempty"` +} + +// NewDataPoint instantiates a new DataPoint 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 NewDataPoint() *DataPoint { + this := DataPoint{} + return &this +} + +// NewDataPointWithDefaults instantiates a new DataPoint object +// This 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 NewDataPointWithDefaults() *DataPoint { + this := DataPoint{} + return &this +} + +// GetTimestamp returns the Timestamp field value if set, zero value otherwise. +func (o *DataPoint) GetTimestamp() string { + if o == nil || IsNil(o.Timestamp) { + var ret string + return ret + } + return *o.Timestamp +} + +// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataPoint) GetTimestampOk() (*string, bool) { + if o == nil || IsNil(o.Timestamp) { + return nil, false + } + return o.Timestamp, true +} + +// HasTimestamp returns a boolean if a field has been set. +func (o *DataPoint) HasTimestamp() bool { + if o != nil && !IsNil(o.Timestamp) { + return true + } + + return false +} + +// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. +func (o *DataPoint) SetTimestamp(v string) { + o.Timestamp = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *DataPoint) GetValue() float32 { + if o == nil || IsNil(o.Value) { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DataPoint) GetValueOk() (*float32, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *DataPoint) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *DataPoint) SetValue(v float32) { + o.Value = &v +} + +func (o DataPoint) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DataPoint) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Timestamp) { + toSerialize["timestamp"] = o.Timestamp + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + return toSerialize, nil +} + +type NullableDataPoint struct { + value *DataPoint + isSet bool +} + +func (v NullableDataPoint) Get() *DataPoint { + return v.value +} + +func (v *NullableDataPoint) Set(val *DataPoint) { + v.value = val + v.isSet = true +} + +func (v NullableDataPoint) IsSet() bool { + return v.isSet +} + +func (v *NullableDataPoint) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDataPoint(val *DataPoint) *NullableDataPoint { + return &NullableDataPoint{value: val, isSet: true} +} + +func (v NullableDataPoint) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDataPoint) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_error.go b/services/mongodbflex/v2api/model_error.go new file mode 100644 index 000000000..82f59d5af --- /dev/null +++ b/services/mongodbflex/v2api/model_error.go @@ -0,0 +1,233 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Error type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Error{} + +// Error struct for Error +type Error struct { + Code *int32 `json:"code,omitempty"` + Fields *map[string][]string `json:"fields,omitempty"` + Message *string `json:"message,omitempty"` + Type *string `json:"type,omitempty"` +} + +// 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() *Error { + this := Error{} + return &this +} + +// NewErrorWithDefaults instantiates a new Error object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewErrorWithDefaults() *Error { + this := Error{} + return &this +} + +// GetCode returns the Code field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetCode(v int32) { + o.Code = &v +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *Error) GetFields() map[string][]string { + if o == nil || IsNil(o.Fields) { + var ret map[string][]string + return ret + } + return *o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Error) GetFieldsOk() (*map[string][]string, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *Error) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given map[string][]string and assigns it to the Fields field. +func (o *Error) SetFields(v map[string][]string) { + o.Fields = &v +} + +// GetMessage returns the Message field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *Error) SetMessage(v string) { + o.Message = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *Error) 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 *Error) 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 *Error) 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 *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 !IsNil(o.Code) { + toSerialize["code"] = o.Code + } + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + if !IsNil(o.Message) { + toSerialize["message"] = o.Message + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + return toSerialize, nil +} + +type NullableError struct { + value *Error + isSet bool +} + +func (v NullableError) Get() *Error { + return v.value +} + +func (v *NullableError) Set(val *Error) { + v.value = val + v.isSet = true +} + +func (v NullableError) IsSet() bool { + return v.isSet +} + +func (v *NullableError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableError(val *Error) *NullableError { + return &NullableError{value: val, isSet: true} +} + +func (v NullableError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_flavor.go b/services/mongodbflex/v2api/model_flavor.go new file mode 100644 index 000000000..81181778e --- /dev/null +++ b/services/mongodbflex/v2api/model_flavor.go @@ -0,0 +1,233 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Flavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Flavor{} + +// Flavor struct for Flavor +type Flavor struct { + Cpu *int32 `json:"cpu,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Memory *int32 `json:"memory,omitempty"` +} + +// NewFlavor instantiates a new Flavor 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 NewFlavor() *Flavor { + this := Flavor{} + return &this +} + +// NewFlavorWithDefaults instantiates a new Flavor object +// This 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 NewFlavorWithDefaults() *Flavor { + this := Flavor{} + return &this +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *Flavor) GetCpu() int32 { + if o == nil || IsNil(o.Cpu) { + var ret int32 + return ret + } + return *o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetCpuOk() (*int32, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *Flavor) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int32 and assigns it to the Cpu field. +func (o *Flavor) SetCpu(v int32) { + o.Cpu = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *Flavor) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *Flavor) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *Flavor) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Flavor) 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 *Flavor) 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 *Flavor) 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 *Flavor) SetId(v string) { + o.Id = &v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *Flavor) GetMemory() int32 { + if o == nil || IsNil(o.Memory) { + var ret int32 + return ret + } + return *o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Flavor) GetMemoryOk() (*int32, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *Flavor) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int32 and assigns it to the Memory field. +func (o *Flavor) SetMemory(v int32) { + o.Memory = &v +} + +func (o Flavor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Flavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableFlavor struct { + value *Flavor + isSet bool +} + +func (v NullableFlavor) Get() *Flavor { + return v.value +} + +func (v *NullableFlavor) Set(val *Flavor) { + v.value = val + v.isSet = true +} + +func (v NullableFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFlavor(val *Flavor) *NullableFlavor { + return &NullableFlavor{value: val, isSet: true} +} + +func (v NullableFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_get_backup_response.go b/services/mongodbflex/v2api/model_get_backup_response.go new file mode 100644 index 000000000..ff0c4104f --- /dev/null +++ b/services/mongodbflex/v2api/model_get_backup_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the GetBackupResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetBackupResponse{} + +// GetBackupResponse struct for GetBackupResponse +type GetBackupResponse struct { + Item *Backup `json:"item,omitempty"` +} + +// NewGetBackupResponse instantiates a new GetBackupResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetBackupResponse() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// NewGetBackupResponseWithDefaults instantiates a new GetBackupResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetBackupResponseWithDefaults() *GetBackupResponse { + this := GetBackupResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetBackupResponse) GetItem() Backup { + if o == nil || IsNil(o.Item) { + var ret Backup + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetBackupResponse) GetItemOk() (*Backup, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetBackupResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Backup and assigns it to the Item field. +func (o *GetBackupResponse) SetItem(v Backup) { + o.Item = &v +} + +func (o GetBackupResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetBackupResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetBackupResponse struct { + value *GetBackupResponse + isSet bool +} + +func (v NullableGetBackupResponse) Get() *GetBackupResponse { + return v.value +} + +func (v *NullableGetBackupResponse) Set(val *GetBackupResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetBackupResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetBackupResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetBackupResponse(val *GetBackupResponse) *NullableGetBackupResponse { + return &NullableGetBackupResponse{value: val, isSet: true} +} + +func (v NullableGetBackupResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetBackupResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_get_user_response.go b/services/mongodbflex/v2api/model_get_user_response.go new file mode 100644 index 000000000..8b6c37921 --- /dev/null +++ b/services/mongodbflex/v2api/model_get_user_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the GetUserResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GetUserResponse{} + +// GetUserResponse struct for GetUserResponse +type GetUserResponse struct { + Item *InstanceResponseUser `json:"item,omitempty"` +} + +// NewGetUserResponse instantiates a new GetUserResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGetUserResponse() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// NewGetUserResponseWithDefaults instantiates a new GetUserResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGetUserResponseWithDefaults() *GetUserResponse { + this := GetUserResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *GetUserResponse) GetItem() InstanceResponseUser { + if o == nil || IsNil(o.Item) { + var ret InstanceResponseUser + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *GetUserResponse) GetItemOk() (*InstanceResponseUser, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *GetUserResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given InstanceResponseUser and assigns it to the Item field. +func (o *GetUserResponse) SetItem(v InstanceResponseUser) { + o.Item = &v +} + +func (o GetUserResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GetUserResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableGetUserResponse struct { + value *GetUserResponse + isSet bool +} + +func (v NullableGetUserResponse) Get() *GetUserResponse { + return v.value +} + +func (v *NullableGetUserResponse) Set(val *GetUserResponse) { + v.value = val + v.isSet = true +} + +func (v NullableGetUserResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableGetUserResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGetUserResponse(val *GetUserResponse) *NullableGetUserResponse { + return &NullableGetUserResponse{value: val, isSet: true} +} + +func (v NullableGetUserResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGetUserResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_handlers_instances_slow_queries_response.go b/services/mongodbflex/v2api/model_handlers_instances_slow_queries_response.go new file mode 100644 index 000000000..c5ca43447 --- /dev/null +++ b/services/mongodbflex/v2api/model_handlers_instances_slow_queries_response.go @@ -0,0 +1,126 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the HandlersInstancesSlowQueriesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesSlowQueriesResponse{} + +// HandlersInstancesSlowQueriesResponse struct for HandlersInstancesSlowQueriesResponse +type HandlersInstancesSlowQueriesResponse struct { + // A list of documents with information about slow queries as detected by the Performance Advisor. + SlowQueries []SlowQuery `json:"slowQueries,omitempty"` +} + +// NewHandlersInstancesSlowQueriesResponse instantiates a new HandlersInstancesSlowQueriesResponse 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 NewHandlersInstancesSlowQueriesResponse() *HandlersInstancesSlowQueriesResponse { + this := HandlersInstancesSlowQueriesResponse{} + return &this +} + +// NewHandlersInstancesSlowQueriesResponseWithDefaults instantiates a new HandlersInstancesSlowQueriesResponse object +// This 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 NewHandlersInstancesSlowQueriesResponseWithDefaults() *HandlersInstancesSlowQueriesResponse { + this := HandlersInstancesSlowQueriesResponse{} + return &this +} + +// GetSlowQueries returns the SlowQueries field value if set, zero value otherwise. +func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueries() []SlowQuery { + if o == nil || IsNil(o.SlowQueries) { + var ret []SlowQuery + return ret + } + return o.SlowQueries +} + +// GetSlowQueriesOk returns a tuple with the SlowQueries field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSlowQueriesResponse) GetSlowQueriesOk() ([]SlowQuery, bool) { + if o == nil || IsNil(o.SlowQueries) { + return nil, false + } + return o.SlowQueries, true +} + +// HasSlowQueries returns a boolean if a field has been set. +func (o *HandlersInstancesSlowQueriesResponse) HasSlowQueries() bool { + if o != nil && !IsNil(o.SlowQueries) { + return true + } + + return false +} + +// SetSlowQueries gets a reference to the given []SlowQuery and assigns it to the SlowQueries field. +func (o *HandlersInstancesSlowQueriesResponse) SetSlowQueries(v []SlowQuery) { + o.SlowQueries = v +} + +func (o HandlersInstancesSlowQueriesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInstancesSlowQueriesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.SlowQueries) { + toSerialize["slowQueries"] = o.SlowQueries + } + return toSerialize, nil +} + +type NullableHandlersInstancesSlowQueriesResponse struct { + value *HandlersInstancesSlowQueriesResponse + isSet bool +} + +func (v NullableHandlersInstancesSlowQueriesResponse) Get() *HandlersInstancesSlowQueriesResponse { + return v.value +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) Set(val *HandlersInstancesSlowQueriesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesSlowQueriesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesSlowQueriesResponse(val *HandlersInstancesSlowQueriesResponse) *NullableHandlersInstancesSlowQueriesResponse { + return &NullableHandlersInstancesSlowQueriesResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesSlowQueriesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesSlowQueriesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_handlers_instances_suggested_indexes_response.go b/services/mongodbflex/v2api/model_handlers_instances_suggested_indexes_response.go new file mode 100644 index 000000000..6cd414b01 --- /dev/null +++ b/services/mongodbflex/v2api/model_handlers_instances_suggested_indexes_response.go @@ -0,0 +1,163 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the HandlersInstancesSuggestedIndexesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HandlersInstancesSuggestedIndexesResponse{} + +// HandlersInstancesSuggestedIndexesResponse struct for HandlersInstancesSuggestedIndexesResponse +type HandlersInstancesSuggestedIndexesResponse struct { + // Documents with information about the query shapes that are served by the suggested indexes. + Shapes []Shape `json:"shapes,omitempty"` + // Documents with information about the indexes suggested by the Performance Advisor. + SuggestedIndexes []SuggestedIndex `json:"suggestedIndexes,omitempty"` +} + +// NewHandlersInstancesSuggestedIndexesResponse instantiates a new HandlersInstancesSuggestedIndexesResponse 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 NewHandlersInstancesSuggestedIndexesResponse() *HandlersInstancesSuggestedIndexesResponse { + this := HandlersInstancesSuggestedIndexesResponse{} + return &this +} + +// NewHandlersInstancesSuggestedIndexesResponseWithDefaults instantiates a new HandlersInstancesSuggestedIndexesResponse object +// This 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 NewHandlersInstancesSuggestedIndexesResponseWithDefaults() *HandlersInstancesSuggestedIndexesResponse { + this := HandlersInstancesSuggestedIndexesResponse{} + return &this +} + +// GetShapes returns the Shapes field value if set, zero value otherwise. +func (o *HandlersInstancesSuggestedIndexesResponse) GetShapes() []Shape { + if o == nil || IsNil(o.Shapes) { + var ret []Shape + return ret + } + return o.Shapes +} + +// GetShapesOk returns a tuple with the Shapes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) GetShapesOk() ([]Shape, bool) { + if o == nil || IsNil(o.Shapes) { + return nil, false + } + return o.Shapes, true +} + +// HasShapes returns a boolean if a field has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) HasShapes() bool { + if o != nil && !IsNil(o.Shapes) { + return true + } + + return false +} + +// SetShapes gets a reference to the given []Shape and assigns it to the Shapes field. +func (o *HandlersInstancesSuggestedIndexesResponse) SetShapes(v []Shape) { + o.Shapes = v +} + +// GetSuggestedIndexes returns the SuggestedIndexes field value if set, zero value otherwise. +func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexes() []SuggestedIndex { + if o == nil || IsNil(o.SuggestedIndexes) { + var ret []SuggestedIndex + return ret + } + return o.SuggestedIndexes +} + +// GetSuggestedIndexesOk returns a tuple with the SuggestedIndexes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) GetSuggestedIndexesOk() ([]SuggestedIndex, bool) { + if o == nil || IsNil(o.SuggestedIndexes) { + return nil, false + } + return o.SuggestedIndexes, true +} + +// HasSuggestedIndexes returns a boolean if a field has been set. +func (o *HandlersInstancesSuggestedIndexesResponse) HasSuggestedIndexes() bool { + if o != nil && !IsNil(o.SuggestedIndexes) { + return true + } + + return false +} + +// SetSuggestedIndexes gets a reference to the given []SuggestedIndex and assigns it to the SuggestedIndexes field. +func (o *HandlersInstancesSuggestedIndexesResponse) SetSuggestedIndexes(v []SuggestedIndex) { + o.SuggestedIndexes = v +} + +func (o HandlersInstancesSuggestedIndexesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HandlersInstancesSuggestedIndexesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Shapes) { + toSerialize["shapes"] = o.Shapes + } + if !IsNil(o.SuggestedIndexes) { + toSerialize["suggestedIndexes"] = o.SuggestedIndexes + } + return toSerialize, nil +} + +type NullableHandlersInstancesSuggestedIndexesResponse struct { + value *HandlersInstancesSuggestedIndexesResponse + isSet bool +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) Get() *HandlersInstancesSuggestedIndexesResponse { + return v.value +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) Set(val *HandlersInstancesSuggestedIndexesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHandlersInstancesSuggestedIndexesResponse(val *HandlersInstancesSuggestedIndexesResponse) *NullableHandlersInstancesSuggestedIndexesResponse { + return &NullableHandlersInstancesSuggestedIndexesResponse{value: val, isSet: true} +} + +func (v NullableHandlersInstancesSuggestedIndexesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHandlersInstancesSuggestedIndexesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_host.go b/services/mongodbflex/v2api/model_host.go new file mode 100644 index 000000000..00bd6bbd7 --- /dev/null +++ b/services/mongodbflex/v2api/model_host.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Host type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Host{} + +// Host struct for Host +type Host struct { + HostMetrics []HostMetric `json:"hostMetrics,omitempty"` + Id *string `json:"id,omitempty"` +} + +// NewHost instantiates a new Host 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 NewHost() *Host { + this := Host{} + return &this +} + +// NewHostWithDefaults instantiates a new Host object +// This 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 NewHostWithDefaults() *Host { + this := Host{} + return &this +} + +// GetHostMetrics returns the HostMetrics field value if set, zero value otherwise. +func (o *Host) GetHostMetrics() []HostMetric { + if o == nil || IsNil(o.HostMetrics) { + var ret []HostMetric + return ret + } + return o.HostMetrics +} + +// GetHostMetricsOk returns a tuple with the HostMetrics field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Host) GetHostMetricsOk() ([]HostMetric, bool) { + if o == nil || IsNil(o.HostMetrics) { + return nil, false + } + return o.HostMetrics, true +} + +// HasHostMetrics returns a boolean if a field has been set. +func (o *Host) HasHostMetrics() bool { + if o != nil && !IsNil(o.HostMetrics) { + return true + } + + return false +} + +// SetHostMetrics gets a reference to the given []HostMetric and assigns it to the HostMetrics field. +func (o *Host) SetHostMetrics(v []HostMetric) { + o.HostMetrics = v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Host) 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 *Host) 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 *Host) 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 *Host) SetId(v string) { + o.Id = &v +} + +func (o Host) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Host) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.HostMetrics) { + toSerialize["hostMetrics"] = o.HostMetrics + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + return toSerialize, nil +} + +type NullableHost struct { + value *Host + isSet bool +} + +func (v NullableHost) Get() *Host { + return v.value +} + +func (v *NullableHost) Set(val *Host) { + v.value = val + v.isSet = true +} + +func (v NullableHost) IsSet() bool { + return v.isSet +} + +func (v *NullableHost) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHost(val *Host) *NullableHost { + return &NullableHost{value: val, isSet: true} +} + +func (v NullableHost) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHost) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_host_metric.go b/services/mongodbflex/v2api/model_host_metric.go new file mode 100644 index 000000000..7e6af46ef --- /dev/null +++ b/services/mongodbflex/v2api/model_host_metric.go @@ -0,0 +1,197 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the HostMetric type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &HostMetric{} + +// HostMetric struct for HostMetric +type HostMetric struct { + Datapoints []DataPoint `json:"datapoints,omitempty"` + Name *string `json:"name,omitempty"` + Units *string `json:"units,omitempty"` +} + +// NewHostMetric instantiates a new HostMetric 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 NewHostMetric() *HostMetric { + this := HostMetric{} + return &this +} + +// NewHostMetricWithDefaults instantiates a new HostMetric object +// This 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 NewHostMetricWithDefaults() *HostMetric { + this := HostMetric{} + return &this +} + +// GetDatapoints returns the Datapoints field value if set, zero value otherwise. +func (o *HostMetric) GetDatapoints() []DataPoint { + if o == nil || IsNil(o.Datapoints) { + var ret []DataPoint + return ret + } + return o.Datapoints +} + +// GetDatapointsOk returns a tuple with the Datapoints field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostMetric) GetDatapointsOk() ([]DataPoint, bool) { + if o == nil || IsNil(o.Datapoints) { + return nil, false + } + return o.Datapoints, true +} + +// HasDatapoints returns a boolean if a field has been set. +func (o *HostMetric) HasDatapoints() bool { + if o != nil && !IsNil(o.Datapoints) { + return true + } + + return false +} + +// SetDatapoints gets a reference to the given []DataPoint and assigns it to the Datapoints field. +func (o *HostMetric) SetDatapoints(v []DataPoint) { + o.Datapoints = v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *HostMetric) 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 *HostMetric) 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 *HostMetric) 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 *HostMetric) SetName(v string) { + o.Name = &v +} + +// GetUnits returns the Units field value if set, zero value otherwise. +func (o *HostMetric) GetUnits() string { + if o == nil || IsNil(o.Units) { + var ret string + return ret + } + return *o.Units +} + +// GetUnitsOk returns a tuple with the Units field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *HostMetric) GetUnitsOk() (*string, bool) { + if o == nil || IsNil(o.Units) { + return nil, false + } + return o.Units, true +} + +// HasUnits returns a boolean if a field has been set. +func (o *HostMetric) HasUnits() bool { + if o != nil && !IsNil(o.Units) { + return true + } + + return false +} + +// SetUnits gets a reference to the given string and assigns it to the Units field. +func (o *HostMetric) SetUnits(v string) { + o.Units = &v +} + +func (o HostMetric) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o HostMetric) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Datapoints) { + toSerialize["datapoints"] = o.Datapoints + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Units) { + toSerialize["units"] = o.Units + } + return toSerialize, nil +} + +type NullableHostMetric struct { + value *HostMetric + isSet bool +} + +func (v NullableHostMetric) Get() *HostMetric { + return v.value +} + +func (v *NullableHostMetric) Set(val *HostMetric) { + v.value = val + v.isSet = true +} + +func (v NullableHostMetric) IsSet() bool { + return v.isSet +} + +func (v *NullableHostMetric) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHostMetric(val *HostMetric) *NullableHostMetric { + return &NullableHostMetric{value: val, isSet: true} +} + +func (v NullableHostMetric) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHostMetric) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_instance.go b/services/mongodbflex/v2api/model_instance.go new file mode 100644 index 000000000..3716c60c8 --- /dev/null +++ b/services/mongodbflex/v2api/model_instance.go @@ -0,0 +1,450 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Instance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Instance{} + +// Instance struct for Instance +type Instance struct { + Acl *ACL `json:"acl,omitempty"` + BackupSchedule *string `json:"backupSchedule,omitempty"` + Flavor *Flavor `json:"flavor,omitempty"` + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + // The current status of the instance. + Status *string `json:"status,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` +} + +// NewInstance instantiates a new Instance 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 NewInstance() *Instance { + this := Instance{} + return &this +} + +// NewInstanceWithDefaults instantiates a new Instance object +// This 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 NewInstanceWithDefaults() *Instance { + this := Instance{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *Instance) GetAcl() ACL { + if o == nil || IsNil(o.Acl) { + var ret ACL + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *Instance) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *Instance) SetAcl(v ACL) { + o.Acl = &v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *Instance) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *Instance) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *Instance) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetFlavor returns the Flavor field value if set, zero value otherwise. +func (o *Instance) GetFlavor() Flavor { + if o == nil || IsNil(o.Flavor) { + var ret Flavor + return ret + } + return *o.Flavor +} + +// GetFlavorOk returns a tuple with the Flavor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetFlavorOk() (*Flavor, bool) { + if o == nil || IsNil(o.Flavor) { + return nil, false + } + return o.Flavor, true +} + +// HasFlavor returns a boolean if a field has been set. +func (o *Instance) HasFlavor() bool { + if o != nil && !IsNil(o.Flavor) { + return true + } + + return false +} + +// SetFlavor gets a reference to the given Flavor and assigns it to the Flavor field. +func (o *Instance) SetFlavor(v Flavor) { + o.Flavor = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Instance) 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 *Instance) 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 *Instance) 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 *Instance) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *Instance) 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 *Instance) 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 *Instance) 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 *Instance) SetName(v string) { + o.Name = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *Instance) GetOptions() map[string]string { + if o == nil || IsNil(o.Options) { + var ret map[string]string + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *Instance) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *Instance) SetOptions(v map[string]string) { + o.Options = &v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *Instance) GetReplicas() int32 { + if o == nil || IsNil(o.Replicas) { + var ret int32 + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetReplicasOk() (*int32, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *Instance) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int32 and assigns it to the Replicas field. +func (o *Instance) SetReplicas(v int32) { + o.Replicas = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *Instance) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *Instance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *Instance) SetStatus(v string) { + o.Status = &v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *Instance) GetStorage() Storage { + if o == nil || IsNil(o.Storage) { + var ret Storage + return ret + } + return *o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *Instance) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *Instance) SetStorage(v Storage) { + o.Storage = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *Instance) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Instance) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *Instance) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *Instance) SetVersion(v string) { + o.Version = &v +} + +func (o Instance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Instance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.Flavor) { + toSerialize["flavor"] = o.Flavor + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullableInstance struct { + value *Instance + isSet bool +} + +func (v NullableInstance) Get() *Instance { + return v.value +} + +func (v *NullableInstance) Set(val *Instance) { + v.value = val + v.isSet = true +} + +func (v NullableInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstance(val *Instance) *NullableInstance { + return &NullableInstance{value: val, isSet: true} +} + +func (v NullableInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_instance_flavor.go b/services/mongodbflex/v2api/model_instance_flavor.go new file mode 100644 index 000000000..57e169c0f --- /dev/null +++ b/services/mongodbflex/v2api/model_instance_flavor.go @@ -0,0 +1,269 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the InstanceFlavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceFlavor{} + +// InstanceFlavor struct for InstanceFlavor +type InstanceFlavor struct { + Categories []string `json:"categories,omitempty"` + Cpu *int32 `json:"cpu,omitempty"` + Description *string `json:"description,omitempty"` + Id *string `json:"id,omitempty"` + Memory *int32 `json:"memory,omitempty"` +} + +// NewInstanceFlavor instantiates a new InstanceFlavor 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 NewInstanceFlavor() *InstanceFlavor { + this := InstanceFlavor{} + return &this +} + +// NewInstanceFlavorWithDefaults instantiates a new InstanceFlavor object +// This 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 NewInstanceFlavorWithDefaults() *InstanceFlavor { + this := InstanceFlavor{} + return &this +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *InstanceFlavor) GetCategories() []string { + if o == nil || IsNil(o.Categories) { + var ret []string + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavor) GetCategoriesOk() ([]string, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *InstanceFlavor) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []string and assigns it to the Categories field. +func (o *InstanceFlavor) SetCategories(v []string) { + o.Categories = v +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *InstanceFlavor) GetCpu() int32 { + if o == nil || IsNil(o.Cpu) { + var ret int32 + return ret + } + return *o.Cpu +} + +// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavor) GetCpuOk() (*int32, bool) { + if o == nil || IsNil(o.Cpu) { + return nil, false + } + return o.Cpu, true +} + +// HasCpu returns a boolean if a field has been set. +func (o *InstanceFlavor) HasCpu() bool { + if o != nil && !IsNil(o.Cpu) { + return true + } + + return false +} + +// SetCpu gets a reference to the given int32 and assigns it to the Cpu field. +func (o *InstanceFlavor) SetCpu(v int32) { + o.Cpu = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *InstanceFlavor) GetDescription() string { + if o == nil || IsNil(o.Description) { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavor) GetDescriptionOk() (*string, bool) { + if o == nil || IsNil(o.Description) { + return nil, false + } + return o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *InstanceFlavor) HasDescription() bool { + if o != nil && !IsNil(o.Description) { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *InstanceFlavor) SetDescription(v string) { + o.Description = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceFlavor) 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 *InstanceFlavor) 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 *InstanceFlavor) 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 *InstanceFlavor) SetId(v string) { + o.Id = &v +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *InstanceFlavor) GetMemory() int32 { + if o == nil || IsNil(o.Memory) { + var ret int32 + return ret + } + return *o.Memory +} + +// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavor) GetMemoryOk() (*int32, bool) { + if o == nil || IsNil(o.Memory) { + return nil, false + } + return o.Memory, true +} + +// HasMemory returns a boolean if a field has been set. +func (o *InstanceFlavor) HasMemory() bool { + if o != nil && !IsNil(o.Memory) { + return true + } + + return false +} + +// SetMemory gets a reference to the given int32 and assigns it to the Memory field. +func (o *InstanceFlavor) SetMemory(v int32) { + o.Memory = &v +} + +func (o InstanceFlavor) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceFlavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.Cpu) { + toSerialize["cpu"] = o.Cpu + } + if !IsNil(o.Description) { + toSerialize["description"] = o.Description + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Memory) { + toSerialize["memory"] = o.Memory + } + return toSerialize, nil +} + +type NullableInstanceFlavor struct { + value *InstanceFlavor + isSet bool +} + +func (v NullableInstanceFlavor) Get() *InstanceFlavor { + return v.value +} + +func (v *NullableInstanceFlavor) Set(val *InstanceFlavor) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceFlavor) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceFlavor) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceFlavor(val *InstanceFlavor) *NullableInstanceFlavor { + return &NullableInstanceFlavor{value: val, isSet: true} +} + +func (v NullableInstanceFlavor) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceFlavor) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_instance_list_instance.go b/services/mongodbflex/v2api/model_instance_list_instance.go new file mode 100644 index 000000000..75db76de9 --- /dev/null +++ b/services/mongodbflex/v2api/model_instance_list_instance.go @@ -0,0 +1,198 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the InstanceListInstance type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceListInstance{} + +// InstanceListInstance struct for InstanceListInstance +type InstanceListInstance struct { + Id *string `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + // The current status of the instance. + Status *string `json:"status,omitempty"` +} + +// NewInstanceListInstance instantiates a new InstanceListInstance 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 NewInstanceListInstance() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// NewInstanceListInstanceWithDefaults instantiates a new InstanceListInstance object +// This 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 NewInstanceListInstanceWithDefaults() *InstanceListInstance { + this := InstanceListInstance{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) 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 *InstanceListInstance) SetName(v string) { + o.Name = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *InstanceListInstance) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceListInstance) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *InstanceListInstance) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *InstanceListInstance) SetStatus(v string) { + o.Status = &v +} + +func (o InstanceListInstance) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceListInstance) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableInstanceListInstance struct { + value *InstanceListInstance + isSet bool +} + +func (v NullableInstanceListInstance) Get() *InstanceListInstance { + return v.value +} + +func (v *NullableInstanceListInstance) Set(val *InstanceListInstance) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceListInstance) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceListInstance) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceListInstance(val *InstanceListInstance) *NullableInstanceListInstance { + return &NullableInstanceListInstance{value: val, isSet: true} +} + +func (v NullableInstanceListInstance) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceListInstance) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_instance_response.go b/services/mongodbflex/v2api/model_instance_response.go new file mode 100644 index 000000000..44c507f2b --- /dev/null +++ b/services/mongodbflex/v2api/model_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the InstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceResponse{} + +// InstanceResponse struct for InstanceResponse +type InstanceResponse struct { + Item *Instance `json:"item,omitempty"` +} + +// NewInstanceResponse instantiates a new InstanceResponse 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 NewInstanceResponse() *InstanceResponse { + this := InstanceResponse{} + return &this +} + +// NewInstanceResponseWithDefaults instantiates a new InstanceResponse object +// This 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 NewInstanceResponseWithDefaults() *InstanceResponse { + this := InstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *InstanceResponse) GetItem() Instance { + if o == nil || IsNil(o.Item) { + var ret Instance + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *InstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *InstanceResponse) SetItem(v Instance) { + o.Item = &v +} + +func (o InstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableInstanceResponse struct { + value *InstanceResponse + isSet bool +} + +func (v NullableInstanceResponse) Get() *InstanceResponse { + return v.value +} + +func (v *NullableInstanceResponse) Set(val *InstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceResponse(val *InstanceResponse) *NullableInstanceResponse { + return &NullableInstanceResponse{value: val, isSet: true} +} + +func (v NullableInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_instance_response_user.go b/services/mongodbflex/v2api/model_instance_response_user.go new file mode 100644 index 000000000..624cf45e6 --- /dev/null +++ b/services/mongodbflex/v2api/model_instance_response_user.go @@ -0,0 +1,306 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the InstanceResponseUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceResponseUser{} + +// InstanceResponseUser struct for InstanceResponseUser +type InstanceResponseUser struct { + Database *string `json:"database,omitempty"` + Host *string `json:"host,omitempty"` + Id *string `json:"id,omitempty"` + Port *int64 `json:"port,omitempty"` + // The roles defined for a user. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewInstanceResponseUser instantiates a new InstanceResponseUser 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 NewInstanceResponseUser() *InstanceResponseUser { + this := InstanceResponseUser{} + return &this +} + +// NewInstanceResponseUserWithDefaults instantiates a new InstanceResponseUser object +// This 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 NewInstanceResponseUserWithDefaults() *InstanceResponseUser { + this := InstanceResponseUser{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetDatabase() string { + if o == nil || IsNil(o.Database) { + var ret string + return ret + } + return *o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *InstanceResponseUser) SetDatabase(v string) { + o.Database = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *InstanceResponseUser) SetHost(v string) { + o.Host = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) 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 *InstanceResponseUser) SetId(v string) { + o.Id = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetPort() int64 { + if o == nil || IsNil(o.Port) { + var ret int64 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *InstanceResponseUser) SetPort(v int64) { + o.Port = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *InstanceResponseUser) SetRoles(v []string) { + o.Roles = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *InstanceResponseUser) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceResponseUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *InstanceResponseUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *InstanceResponseUser) SetUsername(v string) { + o.Username = &v +} + +func (o InstanceResponseUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o InstanceResponseUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableInstanceResponseUser struct { + value *InstanceResponseUser + isSet bool +} + +func (v NullableInstanceResponseUser) Get() *InstanceResponseUser { + return v.value +} + +func (v *NullableInstanceResponseUser) Set(val *InstanceResponseUser) { + v.value = val + v.isSet = true +} + +func (v NullableInstanceResponseUser) IsSet() bool { + return v.isSet +} + +func (v *NullableInstanceResponseUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableInstanceResponseUser(val *InstanceResponseUser) *NullableInstanceResponseUser { + return &NullableInstanceResponseUser{value: val, isSet: true} +} + +func (v NullableInstanceResponseUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableInstanceResponseUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_backups_response.go b/services/mongodbflex/v2api/model_list_backups_response.go new file mode 100644 index 000000000..f8a59ea34 --- /dev/null +++ b/services/mongodbflex/v2api/model_list_backups_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListBackupsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListBackupsResponse{} + +// ListBackupsResponse struct for ListBackupsResponse +type ListBackupsResponse struct { + Count *int64 `json:"count,omitempty"` + Items []Backup `json:"items,omitempty"` +} + +// NewListBackupsResponse instantiates a new ListBackupsResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListBackupsResponse() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// NewListBackupsResponseWithDefaults instantiates a new ListBackupsResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListBackupsResponseWithDefaults() *ListBackupsResponse { + this := ListBackupsResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListBackupsResponse) SetCount(v int64) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListBackupsResponse) GetItems() []Backup { + if o == nil || IsNil(o.Items) { + var ret []Backup + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListBackupsResponse) GetItemsOk() ([]Backup, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListBackupsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []Backup and assigns it to the Items field. +func (o *ListBackupsResponse) SetItems(v []Backup) { + o.Items = v +} + +func (o ListBackupsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListBackupsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListBackupsResponse struct { + value *ListBackupsResponse + isSet bool +} + +func (v NullableListBackupsResponse) Get() *ListBackupsResponse { + return v.value +} + +func (v *NullableListBackupsResponse) Set(val *ListBackupsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListBackupsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListBackupsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListBackupsResponse(val *ListBackupsResponse) *NullableListBackupsResponse { + return &NullableListBackupsResponse{value: val, isSet: true} +} + +func (v NullableListBackupsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListBackupsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_flavors_response.go b/services/mongodbflex/v2api/model_list_flavors_response.go new file mode 100644 index 000000000..023b4440a --- /dev/null +++ b/services/mongodbflex/v2api/model_list_flavors_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListFlavorsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListFlavorsResponse{} + +// ListFlavorsResponse struct for ListFlavorsResponse +type ListFlavorsResponse struct { + Flavors []InstanceFlavor `json:"flavors,omitempty"` +} + +// NewListFlavorsResponse instantiates a new ListFlavorsResponse 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 NewListFlavorsResponse() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// NewListFlavorsResponseWithDefaults instantiates a new ListFlavorsResponse object +// This 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 NewListFlavorsResponseWithDefaults() *ListFlavorsResponse { + this := ListFlavorsResponse{} + return &this +} + +// GetFlavors returns the Flavors field value if set, zero value otherwise. +func (o *ListFlavorsResponse) GetFlavors() []InstanceFlavor { + if o == nil || IsNil(o.Flavors) { + var ret []InstanceFlavor + return ret + } + return o.Flavors +} + +// GetFlavorsOk returns a tuple with the Flavors field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListFlavorsResponse) GetFlavorsOk() ([]InstanceFlavor, bool) { + if o == nil || IsNil(o.Flavors) { + return nil, false + } + return o.Flavors, true +} + +// HasFlavors returns a boolean if a field has been set. +func (o *ListFlavorsResponse) HasFlavors() bool { + if o != nil && !IsNil(o.Flavors) { + return true + } + + return false +} + +// SetFlavors gets a reference to the given []InstanceFlavor and assigns it to the Flavors field. +func (o *ListFlavorsResponse) SetFlavors(v []InstanceFlavor) { + o.Flavors = v +} + +func (o ListFlavorsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListFlavorsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Flavors) { + toSerialize["flavors"] = o.Flavors + } + return toSerialize, nil +} + +type NullableListFlavorsResponse struct { + value *ListFlavorsResponse + isSet bool +} + +func (v NullableListFlavorsResponse) Get() *ListFlavorsResponse { + return v.value +} + +func (v *NullableListFlavorsResponse) Set(val *ListFlavorsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListFlavorsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListFlavorsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListFlavorsResponse(val *ListFlavorsResponse) *NullableListFlavorsResponse { + return &NullableListFlavorsResponse{value: val, isSet: true} +} + +func (v NullableListFlavorsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListFlavorsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_instances_response.go b/services/mongodbflex/v2api/model_list_instances_response.go new file mode 100644 index 000000000..34faf7998 --- /dev/null +++ b/services/mongodbflex/v2api/model_list_instances_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListInstancesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListInstancesResponse{} + +// ListInstancesResponse struct for ListInstancesResponse +type ListInstancesResponse struct { + Count *int64 `json:"count,omitempty"` + Items []InstanceListInstance `json:"items,omitempty"` +} + +// NewListInstancesResponse instantiates a new ListInstancesResponse object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListInstancesResponse() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// NewListInstancesResponseWithDefaults instantiates a new ListInstancesResponse object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListInstancesResponseWithDefaults() *ListInstancesResponse { + this := ListInstancesResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListInstancesResponse) SetCount(v int64) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListInstancesResponse) GetItems() []InstanceListInstance { + if o == nil || IsNil(o.Items) { + var ret []InstanceListInstance + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListInstancesResponse) GetItemsOk() ([]InstanceListInstance, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListInstancesResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []InstanceListInstance and assigns it to the Items field. +func (o *ListInstancesResponse) SetItems(v []InstanceListInstance) { + o.Items = v +} + +func (o ListInstancesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListInstancesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListInstancesResponse struct { + value *ListInstancesResponse + isSet bool +} + +func (v NullableListInstancesResponse) Get() *ListInstancesResponse { + return v.value +} + +func (v *NullableListInstancesResponse) Set(val *ListInstancesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListInstancesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListInstancesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListInstancesResponse(val *ListInstancesResponse) *NullableListInstancesResponse { + return &NullableListInstancesResponse{value: val, isSet: true} +} + +func (v NullableListInstancesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListInstancesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_metrics_response.go b/services/mongodbflex/v2api/model_list_metrics_response.go new file mode 100644 index 000000000..e023beed1 --- /dev/null +++ b/services/mongodbflex/v2api/model_list_metrics_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListMetricsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListMetricsResponse{} + +// ListMetricsResponse struct for ListMetricsResponse +type ListMetricsResponse struct { + Hosts []Host `json:"hosts,omitempty"` +} + +// NewListMetricsResponse instantiates a new ListMetricsResponse 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 NewListMetricsResponse() *ListMetricsResponse { + this := ListMetricsResponse{} + return &this +} + +// NewListMetricsResponseWithDefaults instantiates a new ListMetricsResponse object +// This 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 NewListMetricsResponseWithDefaults() *ListMetricsResponse { + this := ListMetricsResponse{} + return &this +} + +// GetHosts returns the Hosts field value if set, zero value otherwise. +func (o *ListMetricsResponse) GetHosts() []Host { + if o == nil || IsNil(o.Hosts) { + var ret []Host + return ret + } + return o.Hosts +} + +// GetHostsOk returns a tuple with the Hosts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListMetricsResponse) GetHostsOk() ([]Host, bool) { + if o == nil || IsNil(o.Hosts) { + return nil, false + } + return o.Hosts, true +} + +// HasHosts returns a boolean if a field has been set. +func (o *ListMetricsResponse) HasHosts() bool { + if o != nil && !IsNil(o.Hosts) { + return true + } + + return false +} + +// SetHosts gets a reference to the given []Host and assigns it to the Hosts field. +func (o *ListMetricsResponse) SetHosts(v []Host) { + o.Hosts = v +} + +func (o ListMetricsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListMetricsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Hosts) { + toSerialize["hosts"] = o.Hosts + } + return toSerialize, nil +} + +type NullableListMetricsResponse struct { + value *ListMetricsResponse + isSet bool +} + +func (v NullableListMetricsResponse) Get() *ListMetricsResponse { + return v.value +} + +func (v *NullableListMetricsResponse) Set(val *ListMetricsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListMetricsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListMetricsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListMetricsResponse(val *ListMetricsResponse) *NullableListMetricsResponse { + return &NullableListMetricsResponse{value: val, isSet: true} +} + +func (v NullableListMetricsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListMetricsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_restore_jobs_response.go b/services/mongodbflex/v2api/model_list_restore_jobs_response.go new file mode 100644 index 000000000..995d190e8 --- /dev/null +++ b/services/mongodbflex/v2api/model_list_restore_jobs_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListRestoreJobsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListRestoreJobsResponse{} + +// ListRestoreJobsResponse struct for ListRestoreJobsResponse +type ListRestoreJobsResponse struct { + Items []RestoreInstanceStatus `json:"items,omitempty"` +} + +// NewListRestoreJobsResponse instantiates a new ListRestoreJobsResponse 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 NewListRestoreJobsResponse() *ListRestoreJobsResponse { + this := ListRestoreJobsResponse{} + return &this +} + +// NewListRestoreJobsResponseWithDefaults instantiates a new ListRestoreJobsResponse object +// This 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 NewListRestoreJobsResponseWithDefaults() *ListRestoreJobsResponse { + this := ListRestoreJobsResponse{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListRestoreJobsResponse) GetItems() []RestoreInstanceStatus { + if o == nil || IsNil(o.Items) { + var ret []RestoreInstanceStatus + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListRestoreJobsResponse) GetItemsOk() ([]RestoreInstanceStatus, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListRestoreJobsResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []RestoreInstanceStatus and assigns it to the Items field. +func (o *ListRestoreJobsResponse) SetItems(v []RestoreInstanceStatus) { + o.Items = v +} + +func (o ListRestoreJobsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListRestoreJobsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListRestoreJobsResponse struct { + value *ListRestoreJobsResponse + isSet bool +} + +func (v NullableListRestoreJobsResponse) Get() *ListRestoreJobsResponse { + return v.value +} + +func (v *NullableListRestoreJobsResponse) Set(val *ListRestoreJobsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListRestoreJobsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListRestoreJobsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListRestoreJobsResponse(val *ListRestoreJobsResponse) *NullableListRestoreJobsResponse { + return &NullableListRestoreJobsResponse{value: val, isSet: true} +} + +func (v NullableListRestoreJobsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListRestoreJobsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_storages_response.go b/services/mongodbflex/v2api/model_list_storages_response.go new file mode 100644 index 000000000..b4ce611b1 --- /dev/null +++ b/services/mongodbflex/v2api/model_list_storages_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListStoragesResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListStoragesResponse{} + +// ListStoragesResponse struct for ListStoragesResponse +type ListStoragesResponse struct { + StorageClasses []string `json:"storageClasses,omitempty"` + StorageRange *StorageRange `json:"storageRange,omitempty"` +} + +// NewListStoragesResponse instantiates a new ListStoragesResponse 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 NewListStoragesResponse() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// NewListStoragesResponseWithDefaults instantiates a new ListStoragesResponse object +// This 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 NewListStoragesResponseWithDefaults() *ListStoragesResponse { + this := ListStoragesResponse{} + return &this +} + +// GetStorageClasses returns the StorageClasses field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageClasses() []string { + if o == nil || IsNil(o.StorageClasses) { + var ret []string + return ret + } + return o.StorageClasses +} + +// GetStorageClassesOk returns a tuple with the StorageClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageClassesOk() ([]string, bool) { + if o == nil || IsNil(o.StorageClasses) { + return nil, false + } + return o.StorageClasses, true +} + +// HasStorageClasses returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageClasses() bool { + if o != nil && !IsNil(o.StorageClasses) { + return true + } + + return false +} + +// SetStorageClasses gets a reference to the given []string and assigns it to the StorageClasses field. +func (o *ListStoragesResponse) SetStorageClasses(v []string) { + o.StorageClasses = v +} + +// GetStorageRange returns the StorageRange field value if set, zero value otherwise. +func (o *ListStoragesResponse) GetStorageRange() StorageRange { + if o == nil || IsNil(o.StorageRange) { + var ret StorageRange + return ret + } + return *o.StorageRange +} + +// GetStorageRangeOk returns a tuple with the StorageRange field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListStoragesResponse) GetStorageRangeOk() (*StorageRange, bool) { + if o == nil || IsNil(o.StorageRange) { + return nil, false + } + return o.StorageRange, true +} + +// HasStorageRange returns a boolean if a field has been set. +func (o *ListStoragesResponse) HasStorageRange() bool { + if o != nil && !IsNil(o.StorageRange) { + return true + } + + return false +} + +// SetStorageRange gets a reference to the given StorageRange and assigns it to the StorageRange field. +func (o *ListStoragesResponse) SetStorageRange(v StorageRange) { + o.StorageRange = &v +} + +func (o ListStoragesResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListStoragesResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.StorageClasses) { + toSerialize["storageClasses"] = o.StorageClasses + } + if !IsNil(o.StorageRange) { + toSerialize["storageRange"] = o.StorageRange + } + return toSerialize, nil +} + +type NullableListStoragesResponse struct { + value *ListStoragesResponse + isSet bool +} + +func (v NullableListStoragesResponse) Get() *ListStoragesResponse { + return v.value +} + +func (v *NullableListStoragesResponse) Set(val *ListStoragesResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListStoragesResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListStoragesResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListStoragesResponse(val *ListStoragesResponse) *NullableListStoragesResponse { + return &NullableListStoragesResponse{value: val, isSet: true} +} + +func (v NullableListStoragesResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListStoragesResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_user.go b/services/mongodbflex/v2api/model_list_user.go new file mode 100644 index 000000000..e813c1c6b --- /dev/null +++ b/services/mongodbflex/v2api/model_list_user.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListUser type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUser{} + +// ListUser struct for ListUser +type ListUser struct { + Id *string `json:"id,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewListUser instantiates a new ListUser object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListUser() *ListUser { + this := ListUser{} + return &this +} + +// NewListUserWithDefaults instantiates a new ListUser object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListUserWithDefaults() *ListUser { + this := ListUser{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *ListUser) 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 *ListUser) 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 *ListUser) 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 *ListUser) SetId(v string) { + o.Id = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *ListUser) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUser) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *ListUser) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *ListUser) SetUsername(v string) { + o.Username = &v +} + +func (o ListUser) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUser) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableListUser struct { + value *ListUser + isSet bool +} + +func (v NullableListUser) Get() *ListUser { + return v.value +} + +func (v *NullableListUser) Set(val *ListUser) { + v.value = val + v.isSet = true +} + +func (v NullableListUser) IsSet() bool { + return v.isSet +} + +func (v *NullableListUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUser(val *ListUser) *NullableListUser { + return &NullableListUser{value: val, isSet: true} +} + +func (v NullableListUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_users_response.go b/services/mongodbflex/v2api/model_list_users_response.go new file mode 100644 index 000000000..edaa93118 --- /dev/null +++ b/services/mongodbflex/v2api/model_list_users_response.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListUsersResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListUsersResponse{} + +// ListUsersResponse struct for ListUsersResponse +type ListUsersResponse struct { + Count *int64 `json:"count,omitempty"` + Items []ListUser `json:"items,omitempty"` +} + +// NewListUsersResponse instantiates a new ListUsersResponse 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 NewListUsersResponse() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// NewListUsersResponseWithDefaults instantiates a new ListUsersResponse object +// This 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 NewListUsersResponseWithDefaults() *ListUsersResponse { + this := ListUsersResponse{} + return &this +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *ListUsersResponse) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *ListUsersResponse) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *ListUsersResponse) SetCount(v int64) { + o.Count = &v +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *ListUsersResponse) GetItems() []ListUser { + if o == nil || IsNil(o.Items) { + var ret []ListUser + return ret + } + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListUsersResponse) GetItemsOk() ([]ListUser, bool) { + if o == nil || IsNil(o.Items) { + return nil, false + } + return o.Items, true +} + +// HasItems returns a boolean if a field has been set. +func (o *ListUsersResponse) HasItems() bool { + if o != nil && !IsNil(o.Items) { + return true + } + + return false +} + +// SetItems gets a reference to the given []ListUser and assigns it to the Items field. +func (o *ListUsersResponse) SetItems(v []ListUser) { + o.Items = v +} + +func (o ListUsersResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListUsersResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Items) { + toSerialize["items"] = o.Items + } + return toSerialize, nil +} + +type NullableListUsersResponse struct { + value *ListUsersResponse + isSet bool +} + +func (v NullableListUsersResponse) Get() *ListUsersResponse { + return v.value +} + +func (v *NullableListUsersResponse) Set(val *ListUsersResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListUsersResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListUsersResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListUsersResponse(val *ListUsersResponse) *NullableListUsersResponse { + return &NullableListUsersResponse{value: val, isSet: true} +} + +func (v NullableListUsersResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListUsersResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_list_versions_response.go b/services/mongodbflex/v2api/model_list_versions_response.go new file mode 100644 index 000000000..87ce36a0e --- /dev/null +++ b/services/mongodbflex/v2api/model_list_versions_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the ListVersionsResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListVersionsResponse{} + +// ListVersionsResponse struct for ListVersionsResponse +type ListVersionsResponse struct { + Versions []string `json:"versions,omitempty"` +} + +// NewListVersionsResponse instantiates a new ListVersionsResponse 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 NewListVersionsResponse() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// NewListVersionsResponseWithDefaults instantiates a new ListVersionsResponse object +// This 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 NewListVersionsResponseWithDefaults() *ListVersionsResponse { + this := ListVersionsResponse{} + return &this +} + +// GetVersions returns the Versions field value if set, zero value otherwise. +func (o *ListVersionsResponse) GetVersions() []string { + if o == nil || IsNil(o.Versions) { + var ret []string + return ret + } + return o.Versions +} + +// GetVersionsOk returns a tuple with the Versions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListVersionsResponse) GetVersionsOk() ([]string, bool) { + if o == nil || IsNil(o.Versions) { + return nil, false + } + return o.Versions, true +} + +// HasVersions returns a boolean if a field has been set. +func (o *ListVersionsResponse) HasVersions() bool { + if o != nil && !IsNil(o.Versions) { + return true + } + + return false +} + +// SetVersions gets a reference to the given []string and assigns it to the Versions field. +func (o *ListVersionsResponse) SetVersions(v []string) { + o.Versions = v +} + +func (o ListVersionsResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListVersionsResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Versions) { + toSerialize["versions"] = o.Versions + } + return toSerialize, nil +} + +type NullableListVersionsResponse struct { + value *ListVersionsResponse + isSet bool +} + +func (v NullableListVersionsResponse) Get() *ListVersionsResponse { + return v.value +} + +func (v *NullableListVersionsResponse) Set(val *ListVersionsResponse) { + v.value = val + v.isSet = true +} + +func (v NullableListVersionsResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableListVersionsResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListVersionsResponse(val *ListVersionsResponse) *NullableListVersionsResponse { + return &NullableListVersionsResponse{value: val, isSet: true} +} + +func (v NullableListVersionsResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListVersionsResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_mongodbatlas_operation.go b/services/mongodbflex/v2api/model_mongodbatlas_operation.go new file mode 100644 index 000000000..38957c70e --- /dev/null +++ b/services/mongodbflex/v2api/model_mongodbatlas_operation.go @@ -0,0 +1,200 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the MongodbatlasOperation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasOperation{} + +// MongodbatlasOperation struct for MongodbatlasOperation +type MongodbatlasOperation struct { + // Documents containing the search criteria used by the query. + Predicates []map[string]interface{} `json:"predicates,omitempty"` + // Raw log line produced by the query. + Raw *string `json:"raw,omitempty"` + // Query statistics. + Stats *MongodbatlasStats `json:"stats,omitempty"` +} + +// NewMongodbatlasOperation instantiates a new MongodbatlasOperation 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 NewMongodbatlasOperation() *MongodbatlasOperation { + this := MongodbatlasOperation{} + return &this +} + +// NewMongodbatlasOperationWithDefaults instantiates a new MongodbatlasOperation object +// This 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 NewMongodbatlasOperationWithDefaults() *MongodbatlasOperation { + this := MongodbatlasOperation{} + return &this +} + +// GetPredicates returns the Predicates field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetPredicates() []map[string]interface{} { + if o == nil || IsNil(o.Predicates) { + var ret []map[string]interface{} + return ret + } + return o.Predicates +} + +// GetPredicatesOk returns a tuple with the Predicates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetPredicatesOk() ([]map[string]interface{}, bool) { + if o == nil || IsNil(o.Predicates) { + return nil, false + } + return o.Predicates, true +} + +// HasPredicates returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasPredicates() bool { + if o != nil && !IsNil(o.Predicates) { + return true + } + + return false +} + +// SetPredicates gets a reference to the given []map[string]interface{} and assigns it to the Predicates field. +func (o *MongodbatlasOperation) SetPredicates(v []map[string]interface{}) { + o.Predicates = v +} + +// GetRaw returns the Raw field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetRaw() string { + if o == nil || IsNil(o.Raw) { + var ret string + return ret + } + return *o.Raw +} + +// GetRawOk returns a tuple with the Raw field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetRawOk() (*string, bool) { + if o == nil || IsNil(o.Raw) { + return nil, false + } + return o.Raw, true +} + +// HasRaw returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasRaw() bool { + if o != nil && !IsNil(o.Raw) { + return true + } + + return false +} + +// SetRaw gets a reference to the given string and assigns it to the Raw field. +func (o *MongodbatlasOperation) SetRaw(v string) { + o.Raw = &v +} + +// GetStats returns the Stats field value if set, zero value otherwise. +func (o *MongodbatlasOperation) GetStats() MongodbatlasStats { + if o == nil || IsNil(o.Stats) { + var ret MongodbatlasStats + return ret + } + return *o.Stats +} + +// GetStatsOk returns a tuple with the Stats field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasOperation) GetStatsOk() (*MongodbatlasStats, bool) { + if o == nil || IsNil(o.Stats) { + return nil, false + } + return o.Stats, true +} + +// HasStats returns a boolean if a field has been set. +func (o *MongodbatlasOperation) HasStats() bool { + if o != nil && !IsNil(o.Stats) { + return true + } + + return false +} + +// SetStats gets a reference to the given MongodbatlasStats and assigns it to the Stats field. +func (o *MongodbatlasOperation) SetStats(v MongodbatlasStats) { + o.Stats = &v +} + +func (o MongodbatlasOperation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MongodbatlasOperation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Predicates) { + toSerialize["predicates"] = o.Predicates + } + if !IsNil(o.Raw) { + toSerialize["raw"] = o.Raw + } + if !IsNil(o.Stats) { + toSerialize["stats"] = o.Stats + } + return toSerialize, nil +} + +type NullableMongodbatlasOperation struct { + value *MongodbatlasOperation + isSet bool +} + +func (v NullableMongodbatlasOperation) Get() *MongodbatlasOperation { + return v.value +} + +func (v *NullableMongodbatlasOperation) Set(val *MongodbatlasOperation) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasOperation) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasOperation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasOperation(val *MongodbatlasOperation) *NullableMongodbatlasOperation { + return &NullableMongodbatlasOperation{value: val, isSet: true} +} + +func (v NullableMongodbatlasOperation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasOperation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_mongodbatlas_stats.go b/services/mongodbflex/v2api/model_mongodbatlas_stats.go new file mode 100644 index 000000000..fad16f7e6 --- /dev/null +++ b/services/mongodbflex/v2api/model_mongodbatlas_stats.go @@ -0,0 +1,237 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the MongodbatlasStats type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &MongodbatlasStats{} + +// MongodbatlasStats struct for MongodbatlasStats +type MongodbatlasStats struct { + // Duration in milliseconds of the query. + Ms *float32 `json:"ms,omitempty"` + // Number of results returned by the query. + NReturned *int64 `json:"nReturned,omitempty"` + // Number of documents read by the query. + NScanned *int64 `json:"nScanned,omitempty"` + // Query timestamp, in seconds since epoch. + Ts *int64 `json:"ts,omitempty"` +} + +// NewMongodbatlasStats instantiates a new MongodbatlasStats 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 NewMongodbatlasStats() *MongodbatlasStats { + this := MongodbatlasStats{} + return &this +} + +// NewMongodbatlasStatsWithDefaults instantiates a new MongodbatlasStats object +// This 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 NewMongodbatlasStatsWithDefaults() *MongodbatlasStats { + this := MongodbatlasStats{} + return &this +} + +// GetMs returns the Ms field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetMs() float32 { + if o == nil || IsNil(o.Ms) { + var ret float32 + return ret + } + return *o.Ms +} + +// GetMsOk returns a tuple with the Ms field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetMsOk() (*float32, bool) { + if o == nil || IsNil(o.Ms) { + return nil, false + } + return o.Ms, true +} + +// HasMs returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasMs() bool { + if o != nil && !IsNil(o.Ms) { + return true + } + + return false +} + +// SetMs gets a reference to the given float32 and assigns it to the Ms field. +func (o *MongodbatlasStats) SetMs(v float32) { + o.Ms = &v +} + +// GetNReturned returns the NReturned field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetNReturned() int64 { + if o == nil || IsNil(o.NReturned) { + var ret int64 + return ret + } + return *o.NReturned +} + +// GetNReturnedOk returns a tuple with the NReturned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetNReturnedOk() (*int64, bool) { + if o == nil || IsNil(o.NReturned) { + return nil, false + } + return o.NReturned, true +} + +// HasNReturned returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasNReturned() bool { + if o != nil && !IsNil(o.NReturned) { + return true + } + + return false +} + +// SetNReturned gets a reference to the given int64 and assigns it to the NReturned field. +func (o *MongodbatlasStats) SetNReturned(v int64) { + o.NReturned = &v +} + +// GetNScanned returns the NScanned field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetNScanned() int64 { + if o == nil || IsNil(o.NScanned) { + var ret int64 + return ret + } + return *o.NScanned +} + +// GetNScannedOk returns a tuple with the NScanned field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetNScannedOk() (*int64, bool) { + if o == nil || IsNil(o.NScanned) { + return nil, false + } + return o.NScanned, true +} + +// HasNScanned returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasNScanned() bool { + if o != nil && !IsNil(o.NScanned) { + return true + } + + return false +} + +// SetNScanned gets a reference to the given int64 and assigns it to the NScanned field. +func (o *MongodbatlasStats) SetNScanned(v int64) { + o.NScanned = &v +} + +// GetTs returns the Ts field value if set, zero value otherwise. +func (o *MongodbatlasStats) GetTs() int64 { + if o == nil || IsNil(o.Ts) { + var ret int64 + return ret + } + return *o.Ts +} + +// GetTsOk returns a tuple with the Ts field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MongodbatlasStats) GetTsOk() (*int64, bool) { + if o == nil || IsNil(o.Ts) { + return nil, false + } + return o.Ts, true +} + +// HasTs returns a boolean if a field has been set. +func (o *MongodbatlasStats) HasTs() bool { + if o != nil && !IsNil(o.Ts) { + return true + } + + return false +} + +// SetTs gets a reference to the given int64 and assigns it to the Ts field. +func (o *MongodbatlasStats) SetTs(v int64) { + o.Ts = &v +} + +func (o MongodbatlasStats) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o MongodbatlasStats) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ms) { + toSerialize["ms"] = o.Ms + } + if !IsNil(o.NReturned) { + toSerialize["nReturned"] = o.NReturned + } + if !IsNil(o.NScanned) { + toSerialize["nScanned"] = o.NScanned + } + if !IsNil(o.Ts) { + toSerialize["ts"] = o.Ts + } + return toSerialize, nil +} + +type NullableMongodbatlasStats struct { + value *MongodbatlasStats + isSet bool +} + +func (v NullableMongodbatlasStats) Get() *MongodbatlasStats { + return v.value +} + +func (v *NullableMongodbatlasStats) Set(val *MongodbatlasStats) { + v.value = val + v.isSet = true +} + +func (v NullableMongodbatlasStats) IsSet() bool { + return v.isSet +} + +func (v *NullableMongodbatlasStats) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableMongodbatlasStats(val *MongodbatlasStats) *NullableMongodbatlasStats { + return &NullableMongodbatlasStats{value: val, isSet: true} +} + +func (v NullableMongodbatlasStats) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableMongodbatlasStats) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_partial_update_instance_payload.go b/services/mongodbflex/v2api/model_partial_update_instance_payload.go new file mode 100644 index 000000000..67b7007fe --- /dev/null +++ b/services/mongodbflex/v2api/model_partial_update_instance_payload.go @@ -0,0 +1,414 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateInstancePayload{} + +// PartialUpdateInstancePayload struct for PartialUpdateInstancePayload +type PartialUpdateInstancePayload struct { + Acl *ACL `json:"acl,omitempty"` + BackupSchedule *string `json:"backupSchedule,omitempty"` + FlavorId *string `json:"flavorId,omitempty"` + // Labels field is not certain/clear + Labels *map[string]string `json:"labels,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + Replicas *int32 `json:"replicas,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` +} + +// NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload 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 NewPartialUpdateInstancePayload() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// NewPartialUpdateInstancePayloadWithDefaults instantiates a new PartialUpdateInstancePayload object +// This 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 NewPartialUpdateInstancePayloadWithDefaults() *PartialUpdateInstancePayload { + this := PartialUpdateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetAcl() ACL { + if o == nil || IsNil(o.Acl) { + var ret ACL + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil || IsNil(o.Acl) { + return nil, false + } + return o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasAcl() bool { + if o != nil && !IsNil(o.Acl) { + return true + } + + return false +} + +// SetAcl gets a reference to the given ACL and assigns it to the Acl field. +func (o *PartialUpdateInstancePayload) SetAcl(v ACL) { + o.Acl = &v +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *PartialUpdateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetFlavorId returns the FlavorId field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetFlavorId() string { + if o == nil || IsNil(o.FlavorId) { + var ret string + return ret + } + return *o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil || IsNil(o.FlavorId) { + return nil, false + } + return o.FlavorId, true +} + +// HasFlavorId returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasFlavorId() bool { + if o != nil && !IsNil(o.FlavorId) { + return true + } + + return false +} + +// SetFlavorId gets a reference to the given string and assigns it to the FlavorId field. +func (o *PartialUpdateInstancePayload) SetFlavorId(v string) { + o.FlavorId = &v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) 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 *PartialUpdateInstancePayload) SetName(v string) { + o.Name = &v +} + +// GetOptions returns the Options field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetOptions() map[string]string { + if o == nil || IsNil(o.Options) { + var ret map[string]string + return ret + } + return *o.Options +} + +// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil || IsNil(o.Options) { + return nil, false + } + return o.Options, true +} + +// HasOptions returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasOptions() bool { + if o != nil && !IsNil(o.Options) { + return true + } + + return false +} + +// SetOptions gets a reference to the given map[string]string and assigns it to the Options field. +func (o *PartialUpdateInstancePayload) SetOptions(v map[string]string) { + o.Options = &v +} + +// GetReplicas returns the Replicas field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetReplicas() int32 { + if o == nil || IsNil(o.Replicas) { + var ret int32 + return ret + } + return *o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetReplicasOk() (*int32, bool) { + if o == nil || IsNil(o.Replicas) { + return nil, false + } + return o.Replicas, true +} + +// HasReplicas returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasReplicas() bool { + if o != nil && !IsNil(o.Replicas) { + return true + } + + return false +} + +// SetReplicas gets a reference to the given int32 and assigns it to the Replicas field. +func (o *PartialUpdateInstancePayload) SetReplicas(v int32) { + o.Replicas = &v +} + +// GetStorage returns the Storage field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetStorage() Storage { + if o == nil || IsNil(o.Storage) { + var ret Storage + return ret + } + return *o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil || IsNil(o.Storage) { + return nil, false + } + return o.Storage, true +} + +// HasStorage returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasStorage() bool { + if o != nil && !IsNil(o.Storage) { + return true + } + + return false +} + +// SetStorage gets a reference to the given Storage and assigns it to the Storage field. +func (o *PartialUpdateInstancePayload) SetStorage(v Storage) { + o.Storage = &v +} + +// GetVersion returns the Version field value if set, zero value otherwise. +func (o *PartialUpdateInstancePayload) GetVersion() string { + if o == nil || IsNil(o.Version) { + var ret string + return ret + } + return *o.Version +} + +// GetVersionOk returns a tuple with the Version field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil || IsNil(o.Version) { + return nil, false + } + return o.Version, true +} + +// HasVersion returns a boolean if a field has been set. +func (o *PartialUpdateInstancePayload) HasVersion() bool { + if o != nil && !IsNil(o.Version) { + return true + } + + return false +} + +// SetVersion gets a reference to the given string and assigns it to the Version field. +func (o *PartialUpdateInstancePayload) SetVersion(v string) { + o.Version = &v +} + +func (o PartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Acl) { + toSerialize["acl"] = o.Acl + } + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.FlavorId) { + toSerialize["flavorId"] = o.FlavorId + } + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Options) { + toSerialize["options"] = o.Options + } + if !IsNil(o.Replicas) { + toSerialize["replicas"] = o.Replicas + } + if !IsNil(o.Storage) { + toSerialize["storage"] = o.Storage + } + if !IsNil(o.Version) { + toSerialize["version"] = o.Version + } + return toSerialize, nil +} + +type NullablePartialUpdateInstancePayload struct { + value *PartialUpdateInstancePayload + isSet bool +} + +func (v NullablePartialUpdateInstancePayload) Get() *PartialUpdateInstancePayload { + return v.value +} + +func (v *NullablePartialUpdateInstancePayload) Set(val *PartialUpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateInstancePayload(val *PartialUpdateInstancePayload) *NullablePartialUpdateInstancePayload { + return &NullablePartialUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_partial_update_user_payload.go b/services/mongodbflex/v2api/model_partial_update_user_payload.go new file mode 100644 index 000000000..e26e84f9a --- /dev/null +++ b/services/mongodbflex/v2api/model_partial_update_user_payload.go @@ -0,0 +1,162 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the PartialUpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &PartialUpdateUserPayload{} + +// PartialUpdateUserPayload struct for PartialUpdateUserPayload +type PartialUpdateUserPayload struct { + Database *string `json:"database,omitempty"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles,omitempty"` +} + +// NewPartialUpdateUserPayload instantiates a new PartialUpdateUserPayload 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 NewPartialUpdateUserPayload() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// NewPartialUpdateUserPayloadWithDefaults instantiates a new PartialUpdateUserPayload object +// This 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 NewPartialUpdateUserPayloadWithDefaults() *PartialUpdateUserPayload { + this := PartialUpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) GetDatabase() string { + if o == nil || IsNil(o.Database) { + var ret string + return ret + } + return *o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *PartialUpdateUserPayload) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *PartialUpdateUserPayload) SetDatabase(v string) { + o.Database = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *PartialUpdateUserPayload) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *PartialUpdateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *PartialUpdateUserPayload) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *PartialUpdateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +func (o PartialUpdateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o PartialUpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + return toSerialize, nil +} + +type NullablePartialUpdateUserPayload struct { + value *PartialUpdateUserPayload + isSet bool +} + +func (v NullablePartialUpdateUserPayload) Get() *PartialUpdateUserPayload { + return v.value +} + +func (v *NullablePartialUpdateUserPayload) Set(val *PartialUpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullablePartialUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullablePartialUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullablePartialUpdateUserPayload(val *PartialUpdateUserPayload) *NullablePartialUpdateUserPayload { + return &NullablePartialUpdateUserPayload{value: val, isSet: true} +} + +func (v NullablePartialUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullablePartialUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_restore_instance_payload.go b/services/mongodbflex/v2api/model_restore_instance_payload.go new file mode 100644 index 000000000..24e8e1bee --- /dev/null +++ b/services/mongodbflex/v2api/model_restore_instance_payload.go @@ -0,0 +1,185 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the RestoreInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstancePayload{} + +// RestoreInstancePayload struct for RestoreInstancePayload +type RestoreInstancePayload struct { + BackupId string `json:"backupId"` + InstanceId string `json:"instanceId"` +} + +type _RestoreInstancePayload RestoreInstancePayload + +// NewRestoreInstancePayload instantiates a new RestoreInstancePayload 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 NewRestoreInstancePayload(backupId string, instanceId string) *RestoreInstancePayload { + this := RestoreInstancePayload{} + this.BackupId = backupId + this.InstanceId = instanceId + return &this +} + +// NewRestoreInstancePayloadWithDefaults instantiates a new RestoreInstancePayload object +// This 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 NewRestoreInstancePayloadWithDefaults() *RestoreInstancePayload { + this := RestoreInstancePayload{} + return &this +} + +// GetBackupId returns the BackupId field value +func (o *RestoreInstancePayload) GetBackupId() string { + if o == nil { + var ret string + return ret + } + + return o.BackupId +} + +// GetBackupIdOk returns a tuple with the BackupId field value +// and a boolean to check if the value has been set. +func (o *RestoreInstancePayload) GetBackupIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupId, true +} + +// SetBackupId sets field value +func (o *RestoreInstancePayload) SetBackupId(v string) { + o.BackupId = v +} + +// GetInstanceId returns the InstanceId field value +func (o *RestoreInstancePayload) GetInstanceId() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value +// and a boolean to check if the value has been set. +func (o *RestoreInstancePayload) GetInstanceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceId, true +} + +// SetInstanceId sets field value +func (o *RestoreInstancePayload) SetInstanceId(v string) { + o.InstanceId = v +} + +func (o RestoreInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["backupId"] = o.BackupId + toSerialize["instanceId"] = o.InstanceId + return toSerialize, nil +} + +func (o *RestoreInstancePayload) 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{ + "backupId", + "instanceId", + } + + 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) + } + } + + varRestoreInstancePayload := _RestoreInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varRestoreInstancePayload) + + if err != nil { + return err + } + + *o = RestoreInstancePayload(varRestoreInstancePayload) + + return err +} + +type NullableRestoreInstancePayload struct { + value *RestoreInstancePayload + isSet bool +} + +func (v NullableRestoreInstancePayload) Get() *RestoreInstancePayload { + return v.value +} + +func (v *NullableRestoreInstancePayload) Set(val *RestoreInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstancePayload(val *RestoreInstancePayload) *NullableRestoreInstancePayload { + return &NullableRestoreInstancePayload{value: val, isSet: true} +} + +func (v NullableRestoreInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_restore_instance_response.go b/services/mongodbflex/v2api/model_restore_instance_response.go new file mode 100644 index 000000000..8089e6479 --- /dev/null +++ b/services/mongodbflex/v2api/model_restore_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the RestoreInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstanceResponse{} + +// RestoreInstanceResponse struct for RestoreInstanceResponse +type RestoreInstanceResponse struct { + Item *RestoreInstanceStatus `json:"item,omitempty"` +} + +// NewRestoreInstanceResponse instantiates a new RestoreInstanceResponse 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 NewRestoreInstanceResponse() *RestoreInstanceResponse { + this := RestoreInstanceResponse{} + return &this +} + +// NewRestoreInstanceResponseWithDefaults instantiates a new RestoreInstanceResponse object +// This 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 NewRestoreInstanceResponseWithDefaults() *RestoreInstanceResponse { + this := RestoreInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *RestoreInstanceResponse) GetItem() RestoreInstanceStatus { + if o == nil || IsNil(o.Item) { + var ret RestoreInstanceStatus + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceResponse) GetItemOk() (*RestoreInstanceStatus, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *RestoreInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given RestoreInstanceStatus and assigns it to the Item field. +func (o *RestoreInstanceResponse) SetItem(v RestoreInstanceStatus) { + o.Item = &v +} + +func (o RestoreInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableRestoreInstanceResponse struct { + value *RestoreInstanceResponse + isSet bool +} + +func (v NullableRestoreInstanceResponse) Get() *RestoreInstanceResponse { + return v.value +} + +func (v *NullableRestoreInstanceResponse) Set(val *RestoreInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstanceResponse(val *RestoreInstanceResponse) *NullableRestoreInstanceResponse { + return &NullableRestoreInstanceResponse{value: val, isSet: true} +} + +func (v NullableRestoreInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_restore_instance_status.go b/services/mongodbflex/v2api/model_restore_instance_status.go new file mode 100644 index 000000000..037b6561a --- /dev/null +++ b/services/mongodbflex/v2api/model_restore_instance_status.go @@ -0,0 +1,269 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the RestoreInstanceStatus type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RestoreInstanceStatus{} + +// RestoreInstanceStatus struct for RestoreInstanceStatus +type RestoreInstanceStatus struct { + BackupID *string `json:"backupID,omitempty"` + Date *string `json:"date,omitempty"` + Id *string `json:"id,omitempty"` + InstanceId *string `json:"instanceId,omitempty"` + Status *string `json:"status,omitempty"` +} + +// NewRestoreInstanceStatus instantiates a new RestoreInstanceStatus 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 NewRestoreInstanceStatus() *RestoreInstanceStatus { + this := RestoreInstanceStatus{} + return &this +} + +// NewRestoreInstanceStatusWithDefaults instantiates a new RestoreInstanceStatus object +// This 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 NewRestoreInstanceStatusWithDefaults() *RestoreInstanceStatus { + this := RestoreInstanceStatus{} + return &this +} + +// GetBackupID returns the BackupID field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetBackupID() string { + if o == nil || IsNil(o.BackupID) { + var ret string + return ret + } + return *o.BackupID +} + +// GetBackupIDOk returns a tuple with the BackupID field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetBackupIDOk() (*string, bool) { + if o == nil || IsNil(o.BackupID) { + return nil, false + } + return o.BackupID, true +} + +// HasBackupID returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasBackupID() bool { + if o != nil && !IsNil(o.BackupID) { + return true + } + + return false +} + +// SetBackupID gets a reference to the given string and assigns it to the BackupID field. +func (o *RestoreInstanceStatus) SetBackupID(v string) { + o.BackupID = &v +} + +// GetDate returns the Date field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetDate() string { + if o == nil || IsNil(o.Date) { + var ret string + return ret + } + return *o.Date +} + +// GetDateOk returns a tuple with the Date field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetDateOk() (*string, bool) { + if o == nil || IsNil(o.Date) { + return nil, false + } + return o.Date, true +} + +// HasDate returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasDate() bool { + if o != nil && !IsNil(o.Date) { + return true + } + + return false +} + +// SetDate gets a reference to the given string and assigns it to the Date field. +func (o *RestoreInstanceStatus) SetDate(v string) { + o.Date = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) 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 *RestoreInstanceStatus) SetId(v string) { + o.Id = &v +} + +// GetInstanceId returns the InstanceId field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetInstanceId() string { + if o == nil || IsNil(o.InstanceId) { + var ret string + return ret + } + return *o.InstanceId +} + +// GetInstanceIdOk returns a tuple with the InstanceId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetInstanceIdOk() (*string, bool) { + if o == nil || IsNil(o.InstanceId) { + return nil, false + } + return o.InstanceId, true +} + +// HasInstanceId returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasInstanceId() bool { + if o != nil && !IsNil(o.InstanceId) { + return true + } + + return false +} + +// SetInstanceId gets a reference to the given string and assigns it to the InstanceId field. +func (o *RestoreInstanceStatus) SetInstanceId(v string) { + o.InstanceId = &v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *RestoreInstanceStatus) GetStatus() string { + if o == nil || IsNil(o.Status) { + var ret string + return ret + } + return *o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RestoreInstanceStatus) GetStatusOk() (*string, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *RestoreInstanceStatus) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *RestoreInstanceStatus) SetStatus(v string) { + o.Status = &v +} + +func (o RestoreInstanceStatus) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RestoreInstanceStatus) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupID) { + toSerialize["backupID"] = o.BackupID + } + if !IsNil(o.Date) { + toSerialize["date"] = o.Date + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InstanceId) { + toSerialize["instanceId"] = o.InstanceId + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + return toSerialize, nil +} + +type NullableRestoreInstanceStatus struct { + value *RestoreInstanceStatus + isSet bool +} + +func (v NullableRestoreInstanceStatus) Get() *RestoreInstanceStatus { + return v.value +} + +func (v *NullableRestoreInstanceStatus) Set(val *RestoreInstanceStatus) { + v.value = val + v.isSet = true +} + +func (v NullableRestoreInstanceStatus) IsSet() bool { + return v.isSet +} + +func (v *NullableRestoreInstanceStatus) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRestoreInstanceStatus(val *RestoreInstanceStatus) *NullableRestoreInstanceStatus { + return &NullableRestoreInstanceStatus{value: val, isSet: true} +} + +func (v NullableRestoreInstanceStatus) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRestoreInstanceStatus) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_shape.go b/services/mongodbflex/v2api/model_shape.go new file mode 100644 index 000000000..a876756f2 --- /dev/null +++ b/services/mongodbflex/v2api/model_shape.go @@ -0,0 +1,311 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Shape type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Shape{} + +// Shape struct for Shape +type Shape struct { + // Average duration in milliseconds for the queries examined that match this shape. + AvgMs *float32 `json:"avgMs,omitempty"` + // Number of queries examined that match this shape. + Count *int64 `json:"count,omitempty"` + // Unique id for this shape. Exists only for the duration of the API request. + Id *string `json:"id,omitempty"` + // Average number of documents read for every document returned by the query. + InefficiencyScore *int64 `json:"inefficiencyScore,omitempty"` + // The namespace in which the slow query ran. + Namespace *string `json:"namespace,omitempty"` + // It represents documents with specific information and log lines for individual queries. + Operations []MongodbatlasOperation `json:"operations,omitempty"` +} + +// NewShape instantiates a new Shape 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 NewShape() *Shape { + this := Shape{} + return &this +} + +// NewShapeWithDefaults instantiates a new Shape object +// This 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 NewShapeWithDefaults() *Shape { + this := Shape{} + return &this +} + +// GetAvgMs returns the AvgMs field value if set, zero value otherwise. +func (o *Shape) GetAvgMs() float32 { + if o == nil || IsNil(o.AvgMs) { + var ret float32 + return ret + } + return *o.AvgMs +} + +// GetAvgMsOk returns a tuple with the AvgMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetAvgMsOk() (*float32, bool) { + if o == nil || IsNil(o.AvgMs) { + return nil, false + } + return o.AvgMs, true +} + +// HasAvgMs returns a boolean if a field has been set. +func (o *Shape) HasAvgMs() bool { + if o != nil && !IsNil(o.AvgMs) { + return true + } + + return false +} + +// SetAvgMs gets a reference to the given float32 and assigns it to the AvgMs field. +func (o *Shape) SetAvgMs(v float32) { + o.AvgMs = &v +} + +// GetCount returns the Count field value if set, zero value otherwise. +func (o *Shape) GetCount() int64 { + if o == nil || IsNil(o.Count) { + var ret int64 + return ret + } + return *o.Count +} + +// GetCountOk returns a tuple with the Count field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetCountOk() (*int64, bool) { + if o == nil || IsNil(o.Count) { + return nil, false + } + return o.Count, true +} + +// HasCount returns a boolean if a field has been set. +func (o *Shape) HasCount() bool { + if o != nil && !IsNil(o.Count) { + return true + } + + return false +} + +// SetCount gets a reference to the given int64 and assigns it to the Count field. +func (o *Shape) SetCount(v int64) { + o.Count = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *Shape) 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 *Shape) 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 *Shape) 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 *Shape) SetId(v string) { + o.Id = &v +} + +// GetInefficiencyScore returns the InefficiencyScore field value if set, zero value otherwise. +func (o *Shape) GetInefficiencyScore() int64 { + if o == nil || IsNil(o.InefficiencyScore) { + var ret int64 + return ret + } + return *o.InefficiencyScore +} + +// GetInefficiencyScoreOk returns a tuple with the InefficiencyScore field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetInefficiencyScoreOk() (*int64, bool) { + if o == nil || IsNil(o.InefficiencyScore) { + return nil, false + } + return o.InefficiencyScore, true +} + +// HasInefficiencyScore returns a boolean if a field has been set. +func (o *Shape) HasInefficiencyScore() bool { + if o != nil && !IsNil(o.InefficiencyScore) { + return true + } + + return false +} + +// SetInefficiencyScore gets a reference to the given int64 and assigns it to the InefficiencyScore field. +func (o *Shape) SetInefficiencyScore(v int64) { + o.InefficiencyScore = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *Shape) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *Shape) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *Shape) SetNamespace(v string) { + o.Namespace = &v +} + +// GetOperations returns the Operations field value if set, zero value otherwise. +func (o *Shape) GetOperations() []MongodbatlasOperation { + if o == nil || IsNil(o.Operations) { + var ret []MongodbatlasOperation + return ret + } + return o.Operations +} + +// GetOperationsOk returns a tuple with the Operations field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Shape) GetOperationsOk() ([]MongodbatlasOperation, bool) { + if o == nil || IsNil(o.Operations) { + return nil, false + } + return o.Operations, true +} + +// HasOperations returns a boolean if a field has been set. +func (o *Shape) HasOperations() bool { + if o != nil && !IsNil(o.Operations) { + return true + } + + return false +} + +// SetOperations gets a reference to the given []MongodbatlasOperation and assigns it to the Operations field. +func (o *Shape) SetOperations(v []MongodbatlasOperation) { + o.Operations = v +} + +func (o Shape) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Shape) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.AvgMs) { + toSerialize["avgMs"] = o.AvgMs + } + if !IsNil(o.Count) { + toSerialize["count"] = o.Count + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.InefficiencyScore) { + toSerialize["inefficiencyScore"] = o.InefficiencyScore + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Operations) { + toSerialize["operations"] = o.Operations + } + return toSerialize, nil +} + +type NullableShape struct { + value *Shape + isSet bool +} + +func (v NullableShape) Get() *Shape { + return v.value +} + +func (v *NullableShape) Set(val *Shape) { + v.value = val + v.isSet = true +} + +func (v NullableShape) IsSet() bool { + return v.isSet +} + +func (v *NullableShape) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShape(val *Shape) *NullableShape { + return &NullableShape{value: val, isSet: true} +} + +func (v NullableShape) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShape) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_slow_query.go b/services/mongodbflex/v2api/model_slow_query.go new file mode 100644 index 000000000..ac3ba93d0 --- /dev/null +++ b/services/mongodbflex/v2api/model_slow_query.go @@ -0,0 +1,163 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the SlowQuery type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SlowQuery{} + +// SlowQuery struct for SlowQuery +type SlowQuery struct { + // The raw log line pertaining to the slow query. + Line *string `json:"line,omitempty"` + // The namespace in which the slow query ran. + Namespace *string `json:"namespace,omitempty"` +} + +// NewSlowQuery instantiates a new SlowQuery 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 NewSlowQuery() *SlowQuery { + this := SlowQuery{} + return &this +} + +// NewSlowQueryWithDefaults instantiates a new SlowQuery object +// This 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 NewSlowQueryWithDefaults() *SlowQuery { + this := SlowQuery{} + return &this +} + +// GetLine returns the Line field value if set, zero value otherwise. +func (o *SlowQuery) GetLine() string { + if o == nil || IsNil(o.Line) { + var ret string + return ret + } + return *o.Line +} + +// GetLineOk returns a tuple with the Line field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SlowQuery) GetLineOk() (*string, bool) { + if o == nil || IsNil(o.Line) { + return nil, false + } + return o.Line, true +} + +// HasLine returns a boolean if a field has been set. +func (o *SlowQuery) HasLine() bool { + if o != nil && !IsNil(o.Line) { + return true + } + + return false +} + +// SetLine gets a reference to the given string and assigns it to the Line field. +func (o *SlowQuery) SetLine(v string) { + o.Line = &v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SlowQuery) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SlowQuery) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SlowQuery) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SlowQuery) SetNamespace(v string) { + o.Namespace = &v +} + +func (o SlowQuery) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SlowQuery) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Line) { + toSerialize["line"] = o.Line + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + return toSerialize, nil +} + +type NullableSlowQuery struct { + value *SlowQuery + isSet bool +} + +func (v NullableSlowQuery) Get() *SlowQuery { + return v.value +} + +func (v *NullableSlowQuery) Set(val *SlowQuery) { + v.value = val + v.isSet = true +} + +func (v NullableSlowQuery) IsSet() bool { + return v.isSet +} + +func (v *NullableSlowQuery) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSlowQuery(val *SlowQuery) *NullableSlowQuery { + return &NullableSlowQuery{value: val, isSet: true} +} + +func (v NullableSlowQuery) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSlowQuery) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_storage.go b/services/mongodbflex/v2api/model_storage.go new file mode 100644 index 000000000..dc295f01f --- /dev/null +++ b/services/mongodbflex/v2api/model_storage.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the Storage type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &Storage{} + +// Storage struct for Storage +type Storage struct { + Class *string `json:"class,omitempty"` + Size *int64 `json:"size,omitempty"` +} + +// NewStorage instantiates a new Storage object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewStorage() *Storage { + this := Storage{} + return &this +} + +// NewStorageWithDefaults instantiates a new Storage object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewStorageWithDefaults() *Storage { + this := Storage{} + return &this +} + +// GetClass returns the Class field value if set, zero value otherwise. +func (o *Storage) GetClass() string { + if o == nil || IsNil(o.Class) { + var ret string + return ret + } + return *o.Class +} + +// GetClassOk returns a tuple with the Class field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetClassOk() (*string, bool) { + if o == nil || IsNil(o.Class) { + return nil, false + } + return o.Class, true +} + +// HasClass returns a boolean if a field has been set. +func (o *Storage) HasClass() bool { + if o != nil && !IsNil(o.Class) { + return true + } + + return false +} + +// SetClass gets a reference to the given string and assigns it to the Class field. +func (o *Storage) SetClass(v string) { + o.Class = &v +} + +// GetSize returns the Size field value if set, zero value otherwise. +func (o *Storage) GetSize() int64 { + if o == nil || IsNil(o.Size) { + var ret int64 + return ret + } + return *o.Size +} + +// GetSizeOk returns a tuple with the Size field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Storage) GetSizeOk() (*int64, bool) { + if o == nil || IsNil(o.Size) { + return nil, false + } + return o.Size, true +} + +// HasSize returns a boolean if a field has been set. +func (o *Storage) HasSize() bool { + if o != nil && !IsNil(o.Size) { + return true + } + + return false +} + +// SetSize gets a reference to the given int64 and assigns it to the Size field. +func (o *Storage) SetSize(v int64) { + o.Size = &v +} + +func (o Storage) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o Storage) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Class) { + toSerialize["class"] = o.Class + } + if !IsNil(o.Size) { + toSerialize["size"] = o.Size + } + return toSerialize, nil +} + +type NullableStorage struct { + value *Storage + isSet bool +} + +func (v NullableStorage) Get() *Storage { + return v.value +} + +func (v *NullableStorage) Set(val *Storage) { + v.value = val + v.isSet = true +} + +func (v NullableStorage) IsSet() bool { + return v.isSet +} + +func (v *NullableStorage) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorage(val *Storage) *NullableStorage { + return &NullableStorage{value: val, isSet: true} +} + +func (v NullableStorage) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorage) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_storage_range.go b/services/mongodbflex/v2api/model_storage_range.go new file mode 100644 index 000000000..2b09266b1 --- /dev/null +++ b/services/mongodbflex/v2api/model_storage_range.go @@ -0,0 +1,161 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the StorageRange type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &StorageRange{} + +// StorageRange struct for StorageRange +type StorageRange struct { + Max *int64 `json:"max,omitempty"` + Min *int64 `json:"min,omitempty"` +} + +// NewStorageRange instantiates a new StorageRange 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 NewStorageRange() *StorageRange { + this := StorageRange{} + return &this +} + +// NewStorageRangeWithDefaults instantiates a new StorageRange object +// This 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 NewStorageRangeWithDefaults() *StorageRange { + this := StorageRange{} + return &this +} + +// GetMax returns the Max field value if set, zero value otherwise. +func (o *StorageRange) GetMax() int64 { + if o == nil || IsNil(o.Max) { + var ret int64 + return ret + } + return *o.Max +} + +// GetMaxOk returns a tuple with the Max field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMaxOk() (*int64, bool) { + if o == nil || IsNil(o.Max) { + return nil, false + } + return o.Max, true +} + +// HasMax returns a boolean if a field has been set. +func (o *StorageRange) HasMax() bool { + if o != nil && !IsNil(o.Max) { + return true + } + + return false +} + +// SetMax gets a reference to the given int64 and assigns it to the Max field. +func (o *StorageRange) SetMax(v int64) { + o.Max = &v +} + +// GetMin returns the Min field value if set, zero value otherwise. +func (o *StorageRange) GetMin() int64 { + if o == nil || IsNil(o.Min) { + var ret int64 + return ret + } + return *o.Min +} + +// GetMinOk returns a tuple with the Min field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *StorageRange) GetMinOk() (*int64, bool) { + if o == nil || IsNil(o.Min) { + return nil, false + } + return o.Min, true +} + +// HasMin returns a boolean if a field has been set. +func (o *StorageRange) HasMin() bool { + if o != nil && !IsNil(o.Min) { + return true + } + + return false +} + +// SetMin gets a reference to the given int64 and assigns it to the Min field. +func (o *StorageRange) SetMin(v int64) { + o.Min = &v +} + +func (o StorageRange) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o StorageRange) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Max) { + toSerialize["max"] = o.Max + } + if !IsNil(o.Min) { + toSerialize["min"] = o.Min + } + return toSerialize, nil +} + +type NullableStorageRange struct { + value *StorageRange + isSet bool +} + +func (v NullableStorageRange) Get() *StorageRange { + return v.value +} + +func (v *NullableStorageRange) Set(val *StorageRange) { + v.value = val + v.isSet = true +} + +func (v NullableStorageRange) IsSet() bool { + return v.isSet +} + +func (v *NullableStorageRange) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableStorageRange(val *StorageRange) *NullableStorageRange { + return &NullableStorageRange{value: val, isSet: true} +} + +func (v NullableStorageRange) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableStorageRange) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_suggested_index.go b/services/mongodbflex/v2api/model_suggested_index.go new file mode 100644 index 000000000..8fb2dbd0f --- /dev/null +++ b/services/mongodbflex/v2api/model_suggested_index.go @@ -0,0 +1,274 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the SuggestedIndex type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SuggestedIndex{} + +// SuggestedIndex struct for SuggestedIndex +type SuggestedIndex struct { + // Unique id for this suggested index. + Id *string `json:"id,omitempty"` + // List of unique identifiers which correspond the query shapes in this response which pertain to this suggested index. + Impact []string `json:"impact,omitempty"` + // Array of documents that specifies a key in the index and its sort order, ascending or descending. + Index []map[string]int32 `json:"index,omitempty"` + // Namespace of the suggested index. + Namespace *string `json:"namespace,omitempty"` + // Estimated percentage performance improvement that the suggested index would provide. + Weight *float32 `json:"weight,omitempty"` +} + +// NewSuggestedIndex instantiates a new SuggestedIndex 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 NewSuggestedIndex() *SuggestedIndex { + this := SuggestedIndex{} + return &this +} + +// NewSuggestedIndexWithDefaults instantiates a new SuggestedIndex object +// This 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 NewSuggestedIndexWithDefaults() *SuggestedIndex { + this := SuggestedIndex{} + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *SuggestedIndex) 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 *SuggestedIndex) 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 *SuggestedIndex) 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 *SuggestedIndex) SetId(v string) { + o.Id = &v +} + +// GetImpact returns the Impact field value if set, zero value otherwise. +func (o *SuggestedIndex) GetImpact() []string { + if o == nil || IsNil(o.Impact) { + var ret []string + return ret + } + return o.Impact +} + +// GetImpactOk returns a tuple with the Impact field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetImpactOk() ([]string, bool) { + if o == nil || IsNil(o.Impact) { + return nil, false + } + return o.Impact, true +} + +// HasImpact returns a boolean if a field has been set. +func (o *SuggestedIndex) HasImpact() bool { + if o != nil && !IsNil(o.Impact) { + return true + } + + return false +} + +// SetImpact gets a reference to the given []string and assigns it to the Impact field. +func (o *SuggestedIndex) SetImpact(v []string) { + o.Impact = v +} + +// GetIndex returns the Index field value if set, zero value otherwise. +func (o *SuggestedIndex) GetIndex() []map[string]int32 { + if o == nil || IsNil(o.Index) { + var ret []map[string]int32 + return ret + } + return o.Index +} + +// GetIndexOk returns a tuple with the Index field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetIndexOk() ([]map[string]int32, bool) { + if o == nil || IsNil(o.Index) { + return nil, false + } + return o.Index, true +} + +// HasIndex returns a boolean if a field has been set. +func (o *SuggestedIndex) HasIndex() bool { + if o != nil && !IsNil(o.Index) { + return true + } + + return false +} + +// SetIndex gets a reference to the given []map[string]int32 and assigns it to the Index field. +func (o *SuggestedIndex) SetIndex(v []map[string]int32) { + o.Index = v +} + +// GetNamespace returns the Namespace field value if set, zero value otherwise. +func (o *SuggestedIndex) GetNamespace() string { + if o == nil || IsNil(o.Namespace) { + var ret string + return ret + } + return *o.Namespace +} + +// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetNamespaceOk() (*string, bool) { + if o == nil || IsNil(o.Namespace) { + return nil, false + } + return o.Namespace, true +} + +// HasNamespace returns a boolean if a field has been set. +func (o *SuggestedIndex) HasNamespace() bool { + if o != nil && !IsNil(o.Namespace) { + return true + } + + return false +} + +// SetNamespace gets a reference to the given string and assigns it to the Namespace field. +func (o *SuggestedIndex) SetNamespace(v string) { + o.Namespace = &v +} + +// GetWeight returns the Weight field value if set, zero value otherwise. +func (o *SuggestedIndex) GetWeight() float32 { + if o == nil || IsNil(o.Weight) { + var ret float32 + return ret + } + return *o.Weight +} + +// GetWeightOk returns a tuple with the Weight field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *SuggestedIndex) GetWeightOk() (*float32, bool) { + if o == nil || IsNil(o.Weight) { + return nil, false + } + return o.Weight, true +} + +// HasWeight returns a boolean if a field has been set. +func (o *SuggestedIndex) HasWeight() bool { + if o != nil && !IsNil(o.Weight) { + return true + } + + return false +} + +// SetWeight gets a reference to the given float32 and assigns it to the Weight field. +func (o *SuggestedIndex) SetWeight(v float32) { + o.Weight = &v +} + +func (o SuggestedIndex) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SuggestedIndex) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Impact) { + toSerialize["impact"] = o.Impact + } + if !IsNil(o.Index) { + toSerialize["index"] = o.Index + } + if !IsNil(o.Namespace) { + toSerialize["namespace"] = o.Namespace + } + if !IsNil(o.Weight) { + toSerialize["weight"] = o.Weight + } + return toSerialize, nil +} + +type NullableSuggestedIndex struct { + value *SuggestedIndex + isSet bool +} + +func (v NullableSuggestedIndex) Get() *SuggestedIndex { + return v.value +} + +func (v *NullableSuggestedIndex) Set(val *SuggestedIndex) { + v.value = val + v.isSet = true +} + +func (v NullableSuggestedIndex) IsSet() bool { + return v.isSet +} + +func (v *NullableSuggestedIndex) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSuggestedIndex(val *SuggestedIndex) *NullableSuggestedIndex { + return &NullableSuggestedIndex{value: val, isSet: true} +} + +func (v NullableSuggestedIndex) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSuggestedIndex) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_update_backup_schedule_payload.go b/services/mongodbflex/v2api/model_update_backup_schedule_payload.go new file mode 100644 index 000000000..eae8a5330 --- /dev/null +++ b/services/mongodbflex/v2api/model_update_backup_schedule_payload.go @@ -0,0 +1,305 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the UpdateBackupSchedulePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateBackupSchedulePayload{} + +// UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload +type UpdateBackupSchedulePayload struct { + BackupSchedule *string `json:"backupSchedule,omitempty"` + DailySnapshotRetentionDays *int32 `json:"dailySnapshotRetentionDays,omitempty"` + MonthlySnapshotRetentionMonths *int32 `json:"monthlySnapshotRetentionMonths,omitempty"` + PointInTimeWindowHours *int32 `json:"pointInTimeWindowHours,omitempty"` + SnapshotRetentionDays *int32 `json:"snapshotRetentionDays,omitempty"` + WeeklySnapshotRetentionWeeks *int32 `json:"weeklySnapshotRetentionWeeks,omitempty"` +} + +// NewUpdateBackupSchedulePayload instantiates a new UpdateBackupSchedulePayload 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 NewUpdateBackupSchedulePayload() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// NewUpdateBackupSchedulePayloadWithDefaults instantiates a new UpdateBackupSchedulePayload object +// This 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 NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { + this := UpdateBackupSchedulePayload{} + return &this +} + +// GetBackupSchedule returns the BackupSchedule field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetBackupSchedule() string { + if o == nil || IsNil(o.BackupSchedule) { + var ret string + return ret + } + return *o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil || IsNil(o.BackupSchedule) { + return nil, false + } + return o.BackupSchedule, true +} + +// HasBackupSchedule returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasBackupSchedule() bool { + if o != nil && !IsNil(o.BackupSchedule) { + return true + } + + return false +} + +// SetBackupSchedule gets a reference to the given string and assigns it to the BackupSchedule field. +func (o *UpdateBackupSchedulePayload) SetBackupSchedule(v string) { + o.BackupSchedule = &v +} + +// GetDailySnapshotRetentionDays returns the DailySnapshotRetentionDays field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDays() int32 { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.DailySnapshotRetentionDays +} + +// GetDailySnapshotRetentionDaysOk returns a tuple with the DailySnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetDailySnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.DailySnapshotRetentionDays) { + return nil, false + } + return o.DailySnapshotRetentionDays, true +} + +// HasDailySnapshotRetentionDays returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasDailySnapshotRetentionDays() bool { + if o != nil && !IsNil(o.DailySnapshotRetentionDays) { + return true + } + + return false +} + +// SetDailySnapshotRetentionDays gets a reference to the given int32 and assigns it to the DailySnapshotRetentionDays field. +func (o *UpdateBackupSchedulePayload) SetDailySnapshotRetentionDays(v int32) { + o.DailySnapshotRetentionDays = &v +} + +// GetMonthlySnapshotRetentionMonths returns the MonthlySnapshotRetentionMonths field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonths() int32 { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + var ret int32 + return ret + } + return *o.MonthlySnapshotRetentionMonths +} + +// GetMonthlySnapshotRetentionMonthsOk returns a tuple with the MonthlySnapshotRetentionMonths field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetMonthlySnapshotRetentionMonthsOk() (*int32, bool) { + if o == nil || IsNil(o.MonthlySnapshotRetentionMonths) { + return nil, false + } + return o.MonthlySnapshotRetentionMonths, true +} + +// HasMonthlySnapshotRetentionMonths returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasMonthlySnapshotRetentionMonths() bool { + if o != nil && !IsNil(o.MonthlySnapshotRetentionMonths) { + return true + } + + return false +} + +// SetMonthlySnapshotRetentionMonths gets a reference to the given int32 and assigns it to the MonthlySnapshotRetentionMonths field. +func (o *UpdateBackupSchedulePayload) SetMonthlySnapshotRetentionMonths(v int32) { + o.MonthlySnapshotRetentionMonths = &v +} + +// GetPointInTimeWindowHours returns the PointInTimeWindowHours field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHours() int32 { + if o == nil || IsNil(o.PointInTimeWindowHours) { + var ret int32 + return ret + } + return *o.PointInTimeWindowHours +} + +// GetPointInTimeWindowHoursOk returns a tuple with the PointInTimeWindowHours field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetPointInTimeWindowHoursOk() (*int32, bool) { + if o == nil || IsNil(o.PointInTimeWindowHours) { + return nil, false + } + return o.PointInTimeWindowHours, true +} + +// HasPointInTimeWindowHours returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasPointInTimeWindowHours() bool { + if o != nil && !IsNil(o.PointInTimeWindowHours) { + return true + } + + return false +} + +// SetPointInTimeWindowHours gets a reference to the given int32 and assigns it to the PointInTimeWindowHours field. +func (o *UpdateBackupSchedulePayload) SetPointInTimeWindowHours(v int32) { + o.PointInTimeWindowHours = &v +} + +// GetSnapshotRetentionDays returns the SnapshotRetentionDays field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDays() int32 { + if o == nil || IsNil(o.SnapshotRetentionDays) { + var ret int32 + return ret + } + return *o.SnapshotRetentionDays +} + +// GetSnapshotRetentionDaysOk returns a tuple with the SnapshotRetentionDays field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetSnapshotRetentionDaysOk() (*int32, bool) { + if o == nil || IsNil(o.SnapshotRetentionDays) { + return nil, false + } + return o.SnapshotRetentionDays, true +} + +// HasSnapshotRetentionDays returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasSnapshotRetentionDays() bool { + if o != nil && !IsNil(o.SnapshotRetentionDays) { + return true + } + + return false +} + +// SetSnapshotRetentionDays gets a reference to the given int32 and assigns it to the SnapshotRetentionDays field. +func (o *UpdateBackupSchedulePayload) SetSnapshotRetentionDays(v int32) { + o.SnapshotRetentionDays = &v +} + +// GetWeeklySnapshotRetentionWeeks returns the WeeklySnapshotRetentionWeeks field value if set, zero value otherwise. +func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeks() int32 { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + var ret int32 + return ret + } + return *o.WeeklySnapshotRetentionWeeks +} + +// GetWeeklySnapshotRetentionWeeksOk returns a tuple with the WeeklySnapshotRetentionWeeks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateBackupSchedulePayload) GetWeeklySnapshotRetentionWeeksOk() (*int32, bool) { + if o == nil || IsNil(o.WeeklySnapshotRetentionWeeks) { + return nil, false + } + return o.WeeklySnapshotRetentionWeeks, true +} + +// HasWeeklySnapshotRetentionWeeks returns a boolean if a field has been set. +func (o *UpdateBackupSchedulePayload) HasWeeklySnapshotRetentionWeeks() bool { + if o != nil && !IsNil(o.WeeklySnapshotRetentionWeeks) { + return true + } + + return false +} + +// SetWeeklySnapshotRetentionWeeks gets a reference to the given int32 and assigns it to the WeeklySnapshotRetentionWeeks field. +func (o *UpdateBackupSchedulePayload) SetWeeklySnapshotRetentionWeeks(v int32) { + o.WeeklySnapshotRetentionWeeks = &v +} + +func (o UpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateBackupSchedulePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.BackupSchedule) { + toSerialize["backupSchedule"] = o.BackupSchedule + } + if !IsNil(o.DailySnapshotRetentionDays) { + toSerialize["dailySnapshotRetentionDays"] = o.DailySnapshotRetentionDays + } + if !IsNil(o.MonthlySnapshotRetentionMonths) { + toSerialize["monthlySnapshotRetentionMonths"] = o.MonthlySnapshotRetentionMonths + } + if !IsNil(o.PointInTimeWindowHours) { + toSerialize["pointInTimeWindowHours"] = o.PointInTimeWindowHours + } + if !IsNil(o.SnapshotRetentionDays) { + toSerialize["snapshotRetentionDays"] = o.SnapshotRetentionDays + } + if !IsNil(o.WeeklySnapshotRetentionWeeks) { + toSerialize["weeklySnapshotRetentionWeeks"] = o.WeeklySnapshotRetentionWeeks + } + return toSerialize, nil +} + +type NullableUpdateBackupSchedulePayload struct { + value *UpdateBackupSchedulePayload + isSet bool +} + +func (v NullableUpdateBackupSchedulePayload) Get() *UpdateBackupSchedulePayload { + return v.value +} + +func (v *NullableUpdateBackupSchedulePayload) Set(val *UpdateBackupSchedulePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateBackupSchedulePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateBackupSchedulePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateBackupSchedulePayload(val *UpdateBackupSchedulePayload) *NullableUpdateBackupSchedulePayload { + return &NullableUpdateBackupSchedulePayload{value: val, isSet: true} +} + +func (v NullableUpdateBackupSchedulePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateBackupSchedulePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_update_instance_payload.go b/services/mongodbflex/v2api/model_update_instance_payload.go new file mode 100644 index 000000000..3698fe234 --- /dev/null +++ b/services/mongodbflex/v2api/model_update_instance_payload.go @@ -0,0 +1,390 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateInstancePayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstancePayload{} + +// UpdateInstancePayload struct for UpdateInstancePayload +type UpdateInstancePayload struct { + Acl ACL `json:"acl"` + BackupSchedule string `json:"backupSchedule"` + FlavorId string `json:"flavorId"` + // Labels field is not certain/clear + Labels *map[string]string `json:"labels,omitempty"` + Name string `json:"name"` + Options map[string]string `json:"options"` + Replicas int64 `json:"replicas"` + Storage Storage `json:"storage"` + Version string `json:"version"` +} + +type _UpdateInstancePayload UpdateInstancePayload + +// NewUpdateInstancePayload instantiates a new UpdateInstancePayload 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 NewUpdateInstancePayload(acl ACL, backupSchedule string, flavorId string, name string, options map[string]string, replicas int64, storage Storage, version string) *UpdateInstancePayload { + this := UpdateInstancePayload{} + this.Acl = acl + this.BackupSchedule = backupSchedule + this.FlavorId = flavorId + this.Name = name + this.Options = options + this.Replicas = replicas + this.Storage = storage + this.Version = version + return &this +} + +// NewUpdateInstancePayloadWithDefaults instantiates a new UpdateInstancePayload object +// This 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 NewUpdateInstancePayloadWithDefaults() *UpdateInstancePayload { + this := UpdateInstancePayload{} + return &this +} + +// GetAcl returns the Acl field value +func (o *UpdateInstancePayload) GetAcl() ACL { + if o == nil { + var ret ACL + return ret + } + + return o.Acl +} + +// GetAclOk returns a tuple with the Acl field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetAclOk() (*ACL, bool) { + if o == nil { + return nil, false + } + return &o.Acl, true +} + +// SetAcl sets field value +func (o *UpdateInstancePayload) SetAcl(v ACL) { + o.Acl = v +} + +// GetBackupSchedule returns the BackupSchedule field value +func (o *UpdateInstancePayload) GetBackupSchedule() string { + if o == nil { + var ret string + return ret + } + + return o.BackupSchedule +} + +// GetBackupScheduleOk returns a tuple with the BackupSchedule field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetBackupScheduleOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.BackupSchedule, true +} + +// SetBackupSchedule sets field value +func (o *UpdateInstancePayload) SetBackupSchedule(v string) { + o.BackupSchedule = v +} + +// GetFlavorId returns the FlavorId field value +func (o *UpdateInstancePayload) GetFlavorId() string { + if o == nil { + var ret string + return ret + } + + return o.FlavorId +} + +// GetFlavorIdOk returns a tuple with the FlavorId field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetFlavorIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.FlavorId, true +} + +// SetFlavorId sets field value +func (o *UpdateInstancePayload) SetFlavorId(v string) { + o.FlavorId = v +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *UpdateInstancePayload) 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 *UpdateInstancePayload) 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 *UpdateInstancePayload) 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 *UpdateInstancePayload) SetLabels(v map[string]string) { + o.Labels = &v +} + +// GetName returns the Name field value +func (o *UpdateInstancePayload) 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 *UpdateInstancePayload) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdateInstancePayload) SetName(v string) { + o.Name = v +} + +// GetOptions returns the Options field value +func (o *UpdateInstancePayload) GetOptions() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + + return o.Options +} + +// GetOptionsOk returns a tuple with the Options field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetOptionsOk() (*map[string]string, bool) { + if o == nil { + return nil, false + } + return &o.Options, true +} + +// SetOptions sets field value +func (o *UpdateInstancePayload) SetOptions(v map[string]string) { + o.Options = v +} + +// GetReplicas returns the Replicas field value +func (o *UpdateInstancePayload) GetReplicas() int64 { + if o == nil { + var ret int64 + return ret + } + + return o.Replicas +} + +// GetReplicasOk returns a tuple with the Replicas field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetReplicasOk() (*int64, bool) { + if o == nil { + return nil, false + } + return &o.Replicas, true +} + +// SetReplicas sets field value +func (o *UpdateInstancePayload) SetReplicas(v int64) { + o.Replicas = v +} + +// GetStorage returns the Storage field value +func (o *UpdateInstancePayload) GetStorage() Storage { + if o == nil { + var ret Storage + return ret + } + + return o.Storage +} + +// GetStorageOk returns a tuple with the Storage field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetStorageOk() (*Storage, bool) { + if o == nil { + return nil, false + } + return &o.Storage, true +} + +// SetStorage sets field value +func (o *UpdateInstancePayload) SetStorage(v Storage) { + o.Storage = v +} + +// GetVersion returns the Version field value +func (o *UpdateInstancePayload) GetVersion() string { + if o == nil { + var ret string + return ret + } + + return o.Version +} + +// GetVersionOk returns a tuple with the Version field value +// and a boolean to check if the value has been set. +func (o *UpdateInstancePayload) GetVersionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Version, true +} + +// SetVersion sets field value +func (o *UpdateInstancePayload) SetVersion(v string) { + o.Version = v +} + +func (o UpdateInstancePayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstancePayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["acl"] = o.Acl + toSerialize["backupSchedule"] = o.BackupSchedule + toSerialize["flavorId"] = o.FlavorId + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + toSerialize["name"] = o.Name + toSerialize["options"] = o.Options + toSerialize["replicas"] = o.Replicas + toSerialize["storage"] = o.Storage + toSerialize["version"] = o.Version + return toSerialize, nil +} + +func (o *UpdateInstancePayload) 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{ + "acl", + "backupSchedule", + "flavorId", + "name", + "options", + "replicas", + "storage", + "version", + } + + 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) + } + } + + varUpdateInstancePayload := _UpdateInstancePayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateInstancePayload) + + if err != nil { + return err + } + + *o = UpdateInstancePayload(varUpdateInstancePayload) + + return err +} + +type NullableUpdateInstancePayload struct { + value *UpdateInstancePayload + isSet bool +} + +func (v NullableUpdateInstancePayload) Get() *UpdateInstancePayload { + return v.value +} + +func (v *NullableUpdateInstancePayload) Set(val *UpdateInstancePayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstancePayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstancePayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstancePayload(val *UpdateInstancePayload) *NullableUpdateInstancePayload { + return &NullableUpdateInstancePayload{value: val, isSet: true} +} + +func (v NullableUpdateInstancePayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstancePayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_update_instance_response.go b/services/mongodbflex/v2api/model_update_instance_response.go new file mode 100644 index 000000000..4f6e0edf9 --- /dev/null +++ b/services/mongodbflex/v2api/model_update_instance_response.go @@ -0,0 +1,125 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the UpdateInstanceResponse type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateInstanceResponse{} + +// UpdateInstanceResponse struct for UpdateInstanceResponse +type UpdateInstanceResponse struct { + Item *Instance `json:"item,omitempty"` +} + +// NewUpdateInstanceResponse instantiates a new UpdateInstanceResponse 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 NewUpdateInstanceResponse() *UpdateInstanceResponse { + this := UpdateInstanceResponse{} + return &this +} + +// NewUpdateInstanceResponseWithDefaults instantiates a new UpdateInstanceResponse object +// This 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 NewUpdateInstanceResponseWithDefaults() *UpdateInstanceResponse { + this := UpdateInstanceResponse{} + return &this +} + +// GetItem returns the Item field value if set, zero value otherwise. +func (o *UpdateInstanceResponse) GetItem() Instance { + if o == nil || IsNil(o.Item) { + var ret Instance + return ret + } + return *o.Item +} + +// GetItemOk returns a tuple with the Item field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateInstanceResponse) GetItemOk() (*Instance, bool) { + if o == nil || IsNil(o.Item) { + return nil, false + } + return o.Item, true +} + +// HasItem returns a boolean if a field has been set. +func (o *UpdateInstanceResponse) HasItem() bool { + if o != nil && !IsNil(o.Item) { + return true + } + + return false +} + +// SetItem gets a reference to the given Instance and assigns it to the Item field. +func (o *UpdateInstanceResponse) SetItem(v Instance) { + o.Item = &v +} + +func (o UpdateInstanceResponse) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateInstanceResponse) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Item) { + toSerialize["item"] = o.Item + } + return toSerialize, nil +} + +type NullableUpdateInstanceResponse struct { + value *UpdateInstanceResponse + isSet bool +} + +func (v NullableUpdateInstanceResponse) Get() *UpdateInstanceResponse { + return v.value +} + +func (v *NullableUpdateInstanceResponse) Set(val *UpdateInstanceResponse) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateInstanceResponse) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateInstanceResponse) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateInstanceResponse(val *UpdateInstanceResponse) *NullableUpdateInstanceResponse { + return &NullableUpdateInstanceResponse{value: val, isSet: true} +} + +func (v NullableUpdateInstanceResponse) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateInstanceResponse) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_update_user_payload.go b/services/mongodbflex/v2api/model_update_user_payload.go new file mode 100644 index 000000000..a7d8ec2ee --- /dev/null +++ b/services/mongodbflex/v2api/model_update_user_payload.go @@ -0,0 +1,186 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "bytes" + "encoding/json" + "fmt" +) + +// checks if the UpdateUserPayload type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateUserPayload{} + +// UpdateUserPayload struct for UpdateUserPayload +type UpdateUserPayload struct { + Database string `json:"database"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles"` +} + +type _UpdateUserPayload UpdateUserPayload + +// NewUpdateUserPayload instantiates a new UpdateUserPayload 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 NewUpdateUserPayload(database string, roles []string) *UpdateUserPayload { + this := UpdateUserPayload{} + this.Database = database + this.Roles = roles + return &this +} + +// NewUpdateUserPayloadWithDefaults instantiates a new UpdateUserPayload object +// This 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 NewUpdateUserPayloadWithDefaults() *UpdateUserPayload { + this := UpdateUserPayload{} + return &this +} + +// GetDatabase returns the Database field value +func (o *UpdateUserPayload) GetDatabase() string { + if o == nil { + var ret string + return ret + } + + return o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetDatabaseOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Database, true +} + +// SetDatabase sets field value +func (o *UpdateUserPayload) SetDatabase(v string) { + o.Database = v +} + +// GetRoles returns the Roles field value +func (o *UpdateUserPayload) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *UpdateUserPayload) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *UpdateUserPayload) SetRoles(v []string) { + o.Roles = v +} + +func (o UpdateUserPayload) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateUserPayload) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["database"] = o.Database + toSerialize["roles"] = o.Roles + return toSerialize, nil +} + +func (o *UpdateUserPayload) 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{ + "database", + "roles", + } + + 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) + } + } + + varUpdateUserPayload := _UpdateUserPayload{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varUpdateUserPayload) + + if err != nil { + return err + } + + *o = UpdateUserPayload(varUpdateUserPayload) + + return err +} + +type NullableUpdateUserPayload struct { + value *UpdateUserPayload + isSet bool +} + +func (v NullableUpdateUserPayload) Get() *UpdateUserPayload { + return v.value +} + +func (v *NullableUpdateUserPayload) Set(val *UpdateUserPayload) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateUserPayload) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateUserPayload) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateUserPayload(val *UpdateUserPayload) *NullableUpdateUserPayload { + return &NullableUpdateUserPayload{value: val, isSet: true} +} + +func (v NullableUpdateUserPayload) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateUserPayload) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/model_user.go b/services/mongodbflex/v2api/model_user.go new file mode 100644 index 000000000..360efe2e8 --- /dev/null +++ b/services/mongodbflex/v2api/model_user.go @@ -0,0 +1,378 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +import ( + "encoding/json" +) + +// checks if the User type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &User{} + +// User struct for User +type User struct { + Database *string `json:"database,omitempty"` + Host *string `json:"host,omitempty"` + Id *string `json:"id,omitempty"` + Password *string `json:"password,omitempty"` + Port *int64 `json:"port,omitempty"` + // The roles defined for a user. Currently only one role in the list is supported, therefore only the first role from this list is used. The *roles* attribute can contain the following values: 'read', 'readWrite', 'readAnyDatabase', 'readWriteAnyDatabase', 'stackitAdmin'. **The 'readAnyDatabase', 'readWriteAnyDatabase' and 'stackitAdmin' roles will always be created in the admin database.** + Roles []string `json:"roles,omitempty"` + Uri *string `json:"uri,omitempty"` + Username *string `json:"username,omitempty"` +} + +// NewUser instantiates a new User 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 NewUser() *User { + this := User{} + return &this +} + +// NewUserWithDefaults instantiates a new User object +// This 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 NewUserWithDefaults() *User { + this := User{} + return &this +} + +// GetDatabase returns the Database field value if set, zero value otherwise. +func (o *User) GetDatabase() string { + if o == nil || IsNil(o.Database) { + var ret string + return ret + } + return *o.Database +} + +// GetDatabaseOk returns a tuple with the Database field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetDatabaseOk() (*string, bool) { + if o == nil || IsNil(o.Database) { + return nil, false + } + return o.Database, true +} + +// HasDatabase returns a boolean if a field has been set. +func (o *User) HasDatabase() bool { + if o != nil && !IsNil(o.Database) { + return true + } + + return false +} + +// SetDatabase gets a reference to the given string and assigns it to the Database field. +func (o *User) SetDatabase(v string) { + o.Database = &v +} + +// GetHost returns the Host field value if set, zero value otherwise. +func (o *User) GetHost() string { + if o == nil || IsNil(o.Host) { + var ret string + return ret + } + return *o.Host +} + +// GetHostOk returns a tuple with the Host field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetHostOk() (*string, bool) { + if o == nil || IsNil(o.Host) { + return nil, false + } + return o.Host, true +} + +// HasHost returns a boolean if a field has been set. +func (o *User) HasHost() bool { + if o != nil && !IsNil(o.Host) { + return true + } + + return false +} + +// SetHost gets a reference to the given string and assigns it to the Host field. +func (o *User) SetHost(v string) { + o.Host = &v +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *User) 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 *User) 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 *User) 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 *User) SetId(v string) { + o.Id = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *User) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *User) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *User) SetPassword(v string) { + o.Password = &v +} + +// GetPort returns the Port field value if set, zero value otherwise. +func (o *User) GetPort() int64 { + if o == nil || IsNil(o.Port) { + var ret int64 + return ret + } + return *o.Port +} + +// GetPortOk returns a tuple with the Port field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetPortOk() (*int64, bool) { + if o == nil || IsNil(o.Port) { + return nil, false + } + return o.Port, true +} + +// HasPort returns a boolean if a field has been set. +func (o *User) HasPort() bool { + if o != nil && !IsNil(o.Port) { + return true + } + + return false +} + +// SetPort gets a reference to the given int64 and assigns it to the Port field. +func (o *User) SetPort(v int64) { + o.Port = &v +} + +// GetRoles returns the Roles field value if set, zero value otherwise. +func (o *User) GetRoles() []string { + if o == nil || IsNil(o.Roles) { + var ret []string + return ret + } + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetRolesOk() ([]string, bool) { + if o == nil || IsNil(o.Roles) { + return nil, false + } + return o.Roles, true +} + +// HasRoles returns a boolean if a field has been set. +func (o *User) HasRoles() bool { + if o != nil && !IsNil(o.Roles) { + return true + } + + return false +} + +// SetRoles gets a reference to the given []string and assigns it to the Roles field. +func (o *User) SetRoles(v []string) { + o.Roles = v +} + +// GetUri returns the Uri field value if set, zero value otherwise. +func (o *User) GetUri() string { + if o == nil || IsNil(o.Uri) { + var ret string + return ret + } + return *o.Uri +} + +// GetUriOk returns a tuple with the Uri field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUriOk() (*string, bool) { + if o == nil || IsNil(o.Uri) { + return nil, false + } + return o.Uri, true +} + +// HasUri returns a boolean if a field has been set. +func (o *User) HasUri() bool { + if o != nil && !IsNil(o.Uri) { + return true + } + + return false +} + +// SetUri gets a reference to the given string and assigns it to the Uri field. +func (o *User) SetUri(v string) { + o.Uri = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *User) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *User) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *User) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *User) SetUsername(v string) { + o.Username = &v +} + +func (o User) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o User) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Database) { + toSerialize["database"] = o.Database + } + if !IsNil(o.Host) { + toSerialize["host"] = o.Host + } + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.Port) { + toSerialize["port"] = o.Port + } + if !IsNil(o.Roles) { + toSerialize["roles"] = o.Roles + } + if !IsNil(o.Uri) { + toSerialize["uri"] = o.Uri + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + return toSerialize, nil +} + +type NullableUser struct { + value *User + isSet bool +} + +func (v NullableUser) Get() *User { + return v.value +} + +func (v *NullableUser) Set(val *User) { + v.value = val + v.isSet = true +} + +func (v NullableUser) IsSet() bool { + return v.isSet +} + +func (v *NullableUser) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUser(val *User) *NullableUser { + return &NullableUser{value: val, isSet: true} +} + +func (v NullableUser) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUser) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/v2api/response.go b/services/mongodbflex/v2api/response.go new file mode 100644 index 000000000..4c8d7c980 --- /dev/null +++ b/services/mongodbflex/v2api/response.go @@ -0,0 +1,48 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +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/mongodbflex/v2api/utils.go b/services/mongodbflex/v2api/utils.go new file mode 100644 index 000000000..ec08c4467 --- /dev/null +++ b/services/mongodbflex/v2api/utils.go @@ -0,0 +1,362 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +Contact: support@stackit.cloud +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v2api + +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/mongodbflex/wait/deprecation.go b/services/mongodbflex/wait/deprecation.go new file mode 100644 index 000000000..58f184c09 --- /dev/null +++ b/services/mongodbflex/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