diff --git a/CHANGELOG.md b/CHANGELOG.md index 575059cad..e6986fb3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Release (2025-XX-XX) +- `mongodbflex`: [v1.4.0](services/mongodbflex/CHANGELOG.md#v140) + - **Breaking Change:** The region is no longer specified within the client configuration. Instead, the region must be passed as a parameter to any region-specific request. + ## Release (2025-07-07) - `ske`: [v1.0.0](services/ske/CHANGELOG.md#v100) diff --git a/examples/mongodbflex/mongodbflex.go b/examples/mongodbflex/mongodbflex.go index 7f7e01deb..057fa0598 100644 --- a/examples/mongodbflex/mongodbflex.go +++ b/examples/mongodbflex/mongodbflex.go @@ -5,7 +5,6 @@ import ( "fmt" "os" - "github.com/stackitcloud/stackit-sdk-go/core/config" "github.com/stackitcloud/stackit-sdk-go/core/utils" "github.com/stackitcloud/stackit-sdk-go/services/mongodbflex" "github.com/stackitcloud/stackit-sdk-go/services/mongodbflex/wait" @@ -15,17 +14,18 @@ func main() { // Specify the project ID projectId := "PROJECT_ID" + // Specify the region + region := "REGION" + // Create a new API client, that uses default authentication and configuration - mongodbflexClient, err := mongodbflex.NewAPIClient( - config.WithRegion("eu01"), - ) + mongodbflexClient, err := mongodbflex.NewAPIClient() if err != nil { fmt.Fprintf(os.Stderr, "Creating API client: %v\n", err) os.Exit(1) } // Get the MongoDB Flex instances for your project - getInstancesResp, err := mongodbflexClient.ListInstances(context.Background(), projectId).Tag("tag").Execute() + getInstancesResp, err := mongodbflexClient.ListInstances(context.Background(), projectId, region).Tag("tag").Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ListInstances`: %v\n", err) os.Exit(1) @@ -46,7 +46,7 @@ func main() { Database: utils.Ptr("default"), Roles: &[]string{"read"}, } - _, err = mongodbflexClient.CreateUser(context.Background(), projectId, instanceId).CreateUserPayload(createUserPayload).Execute() + _, err = mongodbflexClient.CreateUser(context.Background(), projectId, instanceId, region).CreateUserPayload(createUserPayload).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `CreateUser`: %v\n", err) os.Exit(1) @@ -59,7 +59,7 @@ func main() { BackupId: utils.Ptr("BACKUP_ID"), InstanceId: &instanceId, } - _, err = mongodbflexClient.RestoreInstance(context.Background(), projectId, instanceId).RestoreInstancePayload(restoreInstancePayload).Execute() + _, err = mongodbflexClient.RestoreInstance(context.Background(), projectId, instanceId, region).RestoreInstancePayload(restoreInstancePayload).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `RestoreInstance`: %v\n", err) os.Exit(1) @@ -67,7 +67,7 @@ func main() { fmt.Printf("Restoring instance \"%s\" from backup \"%s\".\n", instanceId, "BACKUP_ID") - _, err = wait.RestoreInstanceWaitHandler(context.Background(), mongodbflexClient, projectId, instanceId, "BACKUP_ID").WaitWithContext(context.Background()) + _, err = wait.RestoreInstanceWaitHandler(context.Background(), mongodbflexClient, projectId, instanceId, "BACKUP_ID", region).WaitWithContext(context.Background()) if err != nil { fmt.Fprintf(os.Stderr, "Error when waiting for restore to finish: %v\n", err) os.Exit(1) diff --git a/services/mongodbflex/CHANGELOG.md b/services/mongodbflex/CHANGELOG.md index 585011ef6..5b08d9ffd 100644 --- a/services/mongodbflex/CHANGELOG.md +++ b/services/mongodbflex/CHANGELOG.md @@ -1,3 +1,6 @@ +## v1.4.0 +- **Breaking Change:** The region is no longer specified within the client configuration. Instead, the region must be passed as a parameter to any region-specific request. + ## v1.3.0 - Add `required:"true"` tags to model structs diff --git a/services/mongodbflex/VERSION b/services/mongodbflex/VERSION index 8b3a0227b..ec7b96782 100644 --- a/services/mongodbflex/VERSION +++ b/services/mongodbflex/VERSION @@ -1 +1 @@ -v1.3.0 \ No newline at end of file +v1.4.0 \ No newline at end of file diff --git a/services/mongodbflex/api_default.go b/services/mongodbflex/api_default.go index 6098451c8..a1430c4e2 100644 --- a/services/mongodbflex/api_default.go +++ b/services/mongodbflex/api_default.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -32,37 +32,41 @@ type DefaultApi interface { @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) ApiCloneInstanceRequest + CloneInstance(ctx context.Context, projectId string, instanceId string, region string) ApiCloneInstanceRequest /* CloneInstanceExecute executes the request @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 CloneInstanceResponse */ - CloneInstanceExecute(ctx context.Context, projectId string, instanceId string) (*CloneInstanceResponse, error) + CloneInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*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) ApiCreateInstanceRequest + CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest /* CreateInstanceExecute executes the request @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 CreateInstanceResponse */ - CreateInstanceExecute(ctx context.Context, projectId string) (*CreateInstanceResponse, error) + CreateInstanceExecute(ctx context.Context, projectId string, region string) (*CreateInstanceResponse, error) /* CreateUser Create User create a new user for a mongodb instance @@ -70,19 +74,21 @@ type DefaultApi interface { @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) ApiCreateUserRequest + CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest /* CreateUserExecute executes the request @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 CreateUserResponse */ - CreateUserExecute(ctx context.Context, projectId string, instanceId string) (*CreateUserResponse, error) + CreateUserExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateUserResponse, error) /* DeleteInstance Delete instance removes an instance @@ -90,14 +96,15 @@ type DefaultApi interface { @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) ApiDeleteInstanceRequest + DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest /* DeleteInstanceExecute executes the request */ - DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error + DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) error /* DeleteUser Delete User delete mongodb user @@ -106,14 +113,15 @@ type DefaultApi interface { @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) ApiDeleteUserRequest + DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest /* DeleteUserExecute executes the request */ - DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error + DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error /* GetBackup Get backup Get details about a specific backup @@ -122,9 +130,10 @@ type DefaultApi interface { @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) ApiGetBackupRequest + GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest /* GetBackupExecute executes the request @@ -132,10 +141,11 @@ type DefaultApi interface { @param projectId project id @param instanceId instance id @param backupId backup id + @param region The region which should be addressed @return GetBackupResponse */ - GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string) (*GetBackupResponse, error) + GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string, region string) (*GetBackupResponse, error) /* GetInstance Get instance gets information of an instance @@ -143,19 +153,21 @@ type DefaultApi interface { @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) ApiGetInstanceRequest + GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest /* GetInstanceExecute executes the request @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 GetInstanceResponse */ - GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*GetInstanceResponse, error) + GetInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*GetInstanceResponse, error) /* GetUser Get User get detailed information of a user of a mongodb instance @@ -164,9 +176,10 @@ type DefaultApi interface { @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) ApiGetUserRequest + GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest /* GetUserExecute executes the request @@ -174,10 +187,11 @@ type DefaultApi interface { @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return GetUserResponse */ - GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*GetUserResponse, error) + GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*GetUserResponse, error) /* ListAdvisorSlowQueries Get slow queries gets slow queries from the Opsmanager performance advisor @@ -185,19 +199,21 @@ type DefaultApi interface { @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) ApiListAdvisorSlowQueriesRequest + ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string, region string) ApiListAdvisorSlowQueriesRequest /* ListAdvisorSlowQueriesExecute executes the request @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 HandlersInstancesSlowQueriesResponse */ - ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string) (*HandlersInstancesSlowQueriesResponse, error) + ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSlowQueriesResponse, error) /* ListBackups List backup List backups of an instance @@ -205,55 +221,61 @@ type DefaultApi interface { @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) ApiListBackupsRequest + ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest /* ListBackupsExecute executes the request @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 ListBackupsResponse */ - ListBackupsExecute(ctx context.Context, projectId string, instanceId string) (*ListBackupsResponse, error) + ListBackupsExecute(ctx context.Context, projectId string, instanceId string, region string) (*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) ApiListFlavorsRequest + ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest /* ListFlavorsExecute executes the request @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 ListFlavorsResponse */ - ListFlavorsExecute(ctx context.Context, projectId string) (*ListFlavorsResponse, error) + ListFlavorsExecute(ctx context.Context, projectId string, region string) (*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) ApiListInstancesRequest + ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest /* ListInstancesExecute executes the request @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 ListInstancesResponse */ - ListInstancesExecute(ctx context.Context, projectId string) (*ListInstancesResponse, error) + ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) /* ListMetrics Metrics returns metrics for an instance @@ -262,9 +284,10 @@ type DefaultApi interface { @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) ApiListMetricsRequest + ListMetrics(ctx context.Context, projectId string, instanceId string, metric string, region string) ApiListMetricsRequest /* ListMetricsExecute executes the request @@ -272,10 +295,11 @@ type DefaultApi interface { @param projectId project id @param instanceId instance id @param metric metric type + @param region The region which should be addressed @return ListMetricsResponse */ - ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string) (*ListMetricsResponse, error) + ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string, region string) (*ListMetricsResponse, error) /* ListRestoreJobs List restore jobs List restore jobs of an instance @@ -283,19 +307,21 @@ type DefaultApi interface { @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) ApiListRestoreJobsRequest + ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest /* ListRestoreJobsExecute executes the request @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 ListRestoreJobsResponse */ - ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string) (*ListRestoreJobsResponse, error) + ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRestoreJobsResponse, error) /* ListStorages Get storage returns the storage for a certain flavor @@ -303,19 +329,21 @@ type DefaultApi interface { @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) ApiListStoragesRequest + ListStorages(ctx context.Context, projectId string, flavor string, region string) ApiListStoragesRequest /* ListStoragesExecute executes the request @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 ListStoragesResponse */ - ListStoragesExecute(ctx context.Context, projectId string, flavor string) (*ListStoragesResponse, error) + ListStoragesExecute(ctx context.Context, projectId string, flavor string, region string) (*ListStoragesResponse, error) /* ListSuggestedIndexes Get suggested indexes gets suggested indexes from the Opsmanager performance advisor @@ -323,19 +351,21 @@ type DefaultApi interface { @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) ApiListSuggestedIndexesRequest + ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string, region string) ApiListSuggestedIndexesRequest /* ListSuggestedIndexesExecute executes the request @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 HandlersInstancesSuggestedIndexesResponse */ - ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string) (*HandlersInstancesSuggestedIndexesResponse, error) + ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSuggestedIndexesResponse, error) /* ListUsers List Users list all users for a mongodb instance @@ -343,37 +373,41 @@ type DefaultApi interface { @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) ApiListUsersRequest + ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest /* ListUsersExecute executes the request @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 ListUsersResponse */ - ListUsersExecute(ctx context.Context, projectId string, instanceId string) (*ListUsersResponse, error) + ListUsersExecute(ctx context.Context, projectId string, instanceId string, region string) (*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) ApiListVersionsRequest + ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest /* ListVersionsExecute executes the request @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 ListVersionsResponse */ - ListVersionsExecute(ctx context.Context, projectId string) (*ListVersionsResponse, error) + ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) /* PartialUpdateInstance Patch endpoint Updates a deployment plan
Note that the time format for the backupSchedule is in UTC @@ -381,19 +415,21 @@ type DefaultApi interface { @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) ApiPartialUpdateInstanceRequest + PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest /* PartialUpdateInstanceExecute executes the request @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 UpdateInstanceResponse */ - PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) (*UpdateInstanceResponse, error) + PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) /* PartialUpdateUser Update User updates user for a mongodb instance @@ -402,14 +438,15 @@ type DefaultApi interface { @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) ApiPartialUpdateUserRequest + PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiPartialUpdateUserRequest /* PartialUpdateUserExecute executes the request */ - PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error + PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error /* ResetUser Reset User resets mongodb user's password @@ -418,9 +455,10 @@ type DefaultApi interface { @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) ApiResetUserRequest + ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest /* ResetUserExecute executes the request @@ -428,10 +466,11 @@ type DefaultApi interface { @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return User */ - ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*User, error) + ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*User, error) /* RestoreInstance Restore instance Restore an instance based on snapshot @@ -439,19 +478,21 @@ type DefaultApi interface { @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) ApiRestoreInstanceRequest + RestoreInstance(ctx context.Context, projectId string, instanceId string, region string) ApiRestoreInstanceRequest /* RestoreInstanceExecute executes the request @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 RestoreInstanceResponse */ - RestoreInstanceExecute(ctx context.Context, projectId string, instanceId string) (*RestoreInstanceResponse, error) + RestoreInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*RestoreInstanceResponse, error) /* UpdateBackupSchedule Update schedule Updates a backup schedule
Note that the time format is in UTC @@ -459,19 +500,21 @@ type DefaultApi interface { @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) ApiUpdateBackupScheduleRequest + UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateBackupScheduleRequest /* UpdateBackupScheduleExecute executes the request @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 BackupSchedule */ - UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string) (*BackupSchedule, error) + UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string, region string) (*BackupSchedule, error) /* UpdateInstance Put endpoint Updates a deployment plan
Note that the time format for the backupSchedule is in UTC @@ -479,19 +522,21 @@ type DefaultApi interface { @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) ApiUpdateInstanceRequest + UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest /* UpdateInstanceExecute executes the request @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 UpdateInstanceResponse */ - UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) (*UpdateInstanceResponse, error) + UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) /* UpdateUser Update User updates user for a mongodb instance @@ -500,14 +545,15 @@ type DefaultApi interface { @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) ApiUpdateUserRequest + UpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiUpdateUserRequest /* UpdateUserExecute executes the request */ - UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error + UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error } type ApiCloneInstanceRequest interface { @@ -646,6 +692,7 @@ type CloneInstanceRequest struct { apiService *DefaultApiService projectId string instanceId string + region string cloneInstancePayload *CloneInstancePayload } @@ -673,9 +720,10 @@ func (r CloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/clone" + 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{} @@ -746,6 +794,17 @@ func (r CloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -781,23 +840,26 @@ 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 *APIClient) CloneInstance(ctx context.Context, projectId string, instanceId string) ApiCloneInstanceRequest { +func (a *APIClient) CloneInstance(ctx context.Context, projectId string, instanceId string, region string) ApiCloneInstanceRequest { return CloneInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) CloneInstanceExecute(ctx context.Context, projectId string, instanceId string) (*CloneInstanceResponse, error) { +func (a *APIClient) CloneInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*CloneInstanceResponse, error) { r := CloneInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -806,6 +868,7 @@ type CreateInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string createInstancePayload *CreateInstancePayload } @@ -833,8 +896,9 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances" + 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{} @@ -905,6 +969,17 @@ func (r CreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -949,21 +1024,24 @@ Create and deploys an instance
Note that the time format for the backupSche @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 *APIClient) CreateInstance(ctx context.Context, projectId string) ApiCreateInstanceRequest { +func (a *APIClient) CreateInstance(ctx context.Context, projectId string, region string) ApiCreateInstanceRequest { return CreateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } } -func (a *APIClient) CreateInstanceExecute(ctx context.Context, projectId string) (*CreateInstanceResponse, error) { +func (a *APIClient) CreateInstanceExecute(ctx context.Context, projectId string, region string) (*CreateInstanceResponse, error) { r := CreateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -973,6 +1051,7 @@ type CreateUserRequest struct { apiService *DefaultApiService projectId string instanceId string + region string createUserPayload *CreateUserPayload } @@ -1000,9 +1079,10 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users" + 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{} @@ -1073,6 +1153,17 @@ func (r CreateUserRequest) Execute() (*CreateUserResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1129,23 +1220,26 @@ 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 *APIClient) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { +func (a *APIClient) CreateUser(ctx context.Context, projectId string, instanceId string, region string) ApiCreateUserRequest { return CreateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, instanceId string) (*CreateUserResponse, error) { +func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, instanceId string, region string) (*CreateUserResponse, error) { r := CreateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -1155,6 +1249,7 @@ type DeleteInstanceRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r DeleteInstanceRequest) Execute() error { @@ -1173,9 +1268,10 @@ func (r DeleteInstanceRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + 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{} @@ -1191,7 +1287,7 @@ func (r DeleteInstanceRequest) Execute() error { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"*/*"} + localVarHTTPHeaderAccepts := []string{"*/*", "application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -1241,6 +1337,17 @@ func (r DeleteInstanceRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1276,23 +1383,26 @@ 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 *APIClient) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { +func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instanceId string, region string) ApiDeleteInstanceRequest { return DeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error { +func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) error { r := DeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -1303,6 +1413,7 @@ type DeleteUserRequest struct { projectId string instanceId string userId string + region string } func (r DeleteUserRequest) Execute() error { @@ -1321,10 +1432,11 @@ func (r DeleteUserRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + 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{} @@ -1379,6 +1491,28 @@ func (r DeleteUserRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = 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 + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1415,25 +1549,28 @@ delete mongodb user @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return ApiDeleteUserRequest */ -func (a *APIClient) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string) ApiDeleteUserRequest { +func (a *APIClient) DeleteUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiDeleteUserRequest { return DeleteUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } } -func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { +func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { r := DeleteUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } return r.Execute() } @@ -1444,6 +1581,7 @@ type GetBackupRequest struct { projectId string instanceId string backupId string + region string } func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { @@ -1463,10 +1601,11 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}" + 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{} @@ -1532,6 +1671,17 @@ func (r GetBackupRequest) Execute() (*GetBackupResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1567,25 +1717,28 @@ Get details about a specific backup @param projectId project id @param instanceId instance id @param backupId backup id + @param region The region which should be addressed @return ApiGetBackupRequest */ -func (a *APIClient) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string) ApiGetBackupRequest { +func (a *APIClient) GetBackup(ctx context.Context, projectId string, instanceId string, backupId string, region string) ApiGetBackupRequest { return GetBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, backupId: backupId, + region: region, } } -func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string) (*GetBackupResponse, error) { +func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string, region string) (*GetBackupResponse, error) { r := GetBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, backupId: backupId, + region: region, } return r.Execute() } @@ -1595,6 +1748,7 @@ type GetInstanceRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { @@ -1614,9 +1768,10 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + 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{} @@ -1682,6 +1837,17 @@ func (r GetInstanceRequest) Execute() (*GetInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 500 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1716,23 +1882,26 @@ 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 *APIClient) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { +func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceId string, region string) ApiGetInstanceRequest { return GetInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*GetInstanceResponse, error) { +func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*GetInstanceResponse, error) { r := GetInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -1743,6 +1912,7 @@ type GetUserRequest struct { projectId string instanceId string userId string + region string } func (r GetUserRequest) Execute() (*GetUserResponse, error) { @@ -1762,10 +1932,11 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + 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{} @@ -1820,6 +1991,28 @@ func (r GetUserRequest) Execute() (*GetUserResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = 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 + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1866,25 +2059,28 @@ get detailed information of a user of a mongodb instance @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return ApiGetUserRequest */ -func (a *APIClient) GetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiGetUserRequest { +func (a *APIClient) GetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiGetUserRequest { return GetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } } -func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*GetUserResponse, error) { +func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*GetUserResponse, error) { r := GetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } return r.Execute() } @@ -1894,6 +2090,7 @@ type ListAdvisorSlowQueriesRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r ListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesResponse, error) { @@ -1913,9 +2110,10 @@ func (r ListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesR return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/advisor/slow-queries" + 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{} @@ -1981,6 +2179,17 @@ func (r ListAdvisorSlowQueriesRequest) Execute() (*HandlersInstancesSlowQueriesR newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2026,23 +2235,26 @@ 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 *APIClient) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string) ApiListAdvisorSlowQueriesRequest { +func (a *APIClient) ListAdvisorSlowQueries(ctx context.Context, projectId string, instanceId string, region string) ApiListAdvisorSlowQueriesRequest { return ListAdvisorSlowQueriesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string) (*HandlersInstancesSlowQueriesResponse, error) { +func (a *APIClient) ListAdvisorSlowQueriesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSlowQueriesResponse, error) { r := ListAdvisorSlowQueriesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -2052,6 +2264,7 @@ type ListBackupsRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { @@ -2071,9 +2284,10 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/backups" + 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{} @@ -2139,6 +2353,17 @@ func (r ListBackupsRequest) Execute() (*ListBackupsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2173,23 +2398,26 @@ 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 *APIClient) ListBackups(ctx context.Context, projectId string, instanceId string) ApiListBackupsRequest { +func (a *APIClient) ListBackups(ctx context.Context, projectId string, instanceId string, region string) ApiListBackupsRequest { return ListBackupsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, instanceId string) (*ListBackupsResponse, error) { +func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListBackupsResponse, error) { r := ListBackupsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -2198,6 +2426,7 @@ type ListFlavorsRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string } func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { @@ -2217,8 +2446,9 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/flavors" + 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{} @@ -2284,6 +2514,17 @@ func (r ListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 500 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2317,21 +2558,24 @@ 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 *APIClient) ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest { +func (a *APIClient) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { return ListFlavorsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } } -func (a *APIClient) ListFlavorsExecute(ctx context.Context, projectId string) (*ListFlavorsResponse, error) { +func (a *APIClient) ListFlavorsExecute(ctx context.Context, projectId string, region string) (*ListFlavorsResponse, error) { r := ListFlavorsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -2341,6 +2585,7 @@ type ListInstancesRequest struct { apiService *DefaultApiService projectId string tag *string + region string } // instance tag @@ -2367,8 +2612,9 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances" + 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{} @@ -2438,6 +2684,17 @@ func (r ListInstancesRequest) Execute() (*ListInstancesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 500 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2471,21 +2728,24 @@ 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 *APIClient) ListInstances(ctx context.Context, projectId string) ApiListInstancesRequest { +func (a *APIClient) ListInstances(ctx context.Context, projectId string, region string) ApiListInstancesRequest { return ListInstancesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } } -func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string) (*ListInstancesResponse, error) { +func (a *APIClient) ListInstancesExecute(ctx context.Context, projectId string, region string) (*ListInstancesResponse, error) { r := ListInstancesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -2497,6 +2757,7 @@ type ListMetricsRequest struct { instanceId string metric string granularity *string + region string period *string start *string end *string @@ -2547,10 +2808,11 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/metrics/{metric}" + 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{} @@ -2629,6 +2891,17 @@ func (r ListMetricsRequest) Execute() (*ListMetricsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2675,25 +2948,28 @@ returns metrics for an instance @param projectId project id @param instanceId instance id @param metric metric type + @param region The region which should be addressed @return ApiListMetricsRequest */ -func (a *APIClient) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string) ApiListMetricsRequest { +func (a *APIClient) ListMetrics(ctx context.Context, projectId string, instanceId string, metric string, region string) ApiListMetricsRequest { return ListMetricsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, metric: metric, + region: region, } } -func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string) (*ListMetricsResponse, error) { +func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string, region string) (*ListMetricsResponse, error) { r := ListMetricsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, metric: metric, + region: region, } return r.Execute() } @@ -2703,6 +2979,7 @@ type ListRestoreJobsRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { @@ -2722,9 +2999,10 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/restores" + 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{} @@ -2790,6 +3068,17 @@ func (r ListRestoreJobsRequest) Execute() (*ListRestoreJobsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2824,23 +3113,26 @@ 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 *APIClient) ListRestoreJobs(ctx context.Context, projectId string, instanceId string) ApiListRestoreJobsRequest { +func (a *APIClient) ListRestoreJobs(ctx context.Context, projectId string, instanceId string, region string) ApiListRestoreJobsRequest { return ListRestoreJobsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string) (*ListRestoreJobsResponse, error) { +func (a *APIClient) ListRestoreJobsExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListRestoreJobsResponse, error) { r := ListRestoreJobsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -2850,6 +3142,7 @@ type ListStoragesRequest struct { apiService *DefaultApiService projectId string flavor string + region string } func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { @@ -2869,9 +3162,10 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/storages/{flavor}" + 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{} @@ -2937,6 +3231,17 @@ func (r ListStoragesRequest) Execute() (*ListStoragesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2971,23 +3276,26 @@ 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 *APIClient) ListStorages(ctx context.Context, projectId string, flavor string) ApiListStoragesRequest { +func (a *APIClient) ListStorages(ctx context.Context, projectId string, flavor string, region string) ApiListStoragesRequest { return ListStoragesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, flavor: flavor, + region: region, } } -func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, flavor string) (*ListStoragesResponse, error) { +func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, flavor string, region string) (*ListStoragesResponse, error) { r := ListStoragesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, flavor: flavor, + region: region, } return r.Execute() } @@ -2997,6 +3305,7 @@ type ListSuggestedIndexesRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r ListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndexesResponse, error) { @@ -3016,9 +3325,10 @@ func (r ListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndex return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/advisor/suggested-indexes" + 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{} @@ -3084,6 +3394,17 @@ func (r ListSuggestedIndexesRequest) Execute() (*HandlersInstancesSuggestedIndex newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3129,23 +3450,26 @@ 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 *APIClient) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string) ApiListSuggestedIndexesRequest { +func (a *APIClient) ListSuggestedIndexes(ctx context.Context, projectId string, instanceId string, region string) ApiListSuggestedIndexesRequest { return ListSuggestedIndexesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string) (*HandlersInstancesSuggestedIndexesResponse, error) { +func (a *APIClient) ListSuggestedIndexesExecute(ctx context.Context, projectId string, instanceId string, region string) (*HandlersInstancesSuggestedIndexesResponse, error) { r := ListSuggestedIndexesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -3155,6 +3479,7 @@ type ListUsersRequest struct { apiService *DefaultApiService projectId string instanceId string + region string } func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { @@ -3174,9 +3499,10 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users" + 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{} @@ -3231,6 +3557,28 @@ func (r ListUsersRequest) Execute() (*ListUsersResponse, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = 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 + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3276,23 +3624,26 @@ 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 *APIClient) ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest { +func (a *APIClient) ListUsers(ctx context.Context, projectId string, instanceId string, region string) ApiListUsersRequest { return ListUsersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, instanceId string) (*ListUsersResponse, error) { +func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, instanceId string, region string) (*ListUsersResponse, error) { r := ListUsersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -3301,6 +3652,7 @@ type ListVersionsRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string } func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { @@ -3320,8 +3672,9 @@ func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/versions" + 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{} @@ -3385,6 +3738,17 @@ func (r ListVersionsRequest) Execute() (*ListVersionsResponse, error) { } newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) newErr.Model = v + return localVarReturnValue, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 } @@ -3409,21 +3773,24 @@ 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 *APIClient) ListVersions(ctx context.Context, projectId string) ApiListVersionsRequest { +func (a *APIClient) ListVersions(ctx context.Context, projectId string, region string) ApiListVersionsRequest { return ListVersionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } } -func (a *APIClient) ListVersionsExecute(ctx context.Context, projectId string) (*ListVersionsResponse, error) { +func (a *APIClient) ListVersionsExecute(ctx context.Context, projectId string, region string) (*ListVersionsResponse, error) { r := ListVersionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -3433,6 +3800,7 @@ type PartialUpdateInstanceRequest struct { apiService *DefaultApiService projectId string instanceId string + region string partialUpdateInstancePayload *PartialUpdateInstancePayload } @@ -3460,9 +3828,10 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + 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{} @@ -3533,6 +3902,17 @@ func (r PartialUpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3589,23 +3969,26 @@ Updates a deployment plan
Note that the time format for the backupSchedule @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 *APIClient) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string) ApiPartialUpdateInstanceRequest { +func (a *APIClient) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiPartialUpdateInstanceRequest { return PartialUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) (*UpdateInstanceResponse, error) { +func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) { r := PartialUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -3616,6 +3999,7 @@ type PartialUpdateUserRequest struct { projectId string instanceId string userId string + region string partialUpdateUserPayload *PartialUpdateUserPayload } @@ -3642,10 +4026,11 @@ func (r PartialUpdateUserRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + 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{} @@ -3716,6 +4101,17 @@ func (r PartialUpdateUserRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3752,25 +4148,28 @@ updates user for a mongodb instance @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return ApiPartialUpdateUserRequest */ -func (a *APIClient) PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiPartialUpdateUserRequest { +func (a *APIClient) PartialUpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiPartialUpdateUserRequest { return PartialUpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } } -func (a *APIClient) PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { +func (a *APIClient) PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { r := PartialUpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } return r.Execute() } @@ -3781,6 +4180,7 @@ type ResetUserRequest struct { projectId string instanceId string userId string + region string } func (r ResetUserRequest) Execute() (*User, error) { @@ -3800,10 +4200,11 @@ func (r ResetUserRequest) Execute() (*User, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}/reset" + 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{} @@ -3858,6 +4259,28 @@ func (r ResetUserRequest) Execute() (*User, error) { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = 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 + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3904,25 +4327,28 @@ resets mongodb user's password @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return ApiResetUserRequest */ -func (a *APIClient) ResetUser(ctx context.Context, projectId string, instanceId string, userId string) ApiResetUserRequest { +func (a *APIClient) ResetUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiResetUserRequest { return ResetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } } -func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*User, error) { +func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) (*User, error) { r := ResetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } return r.Execute() } @@ -3932,6 +4358,7 @@ type RestoreInstanceRequest struct { apiService *DefaultApiService projectId string instanceId string + region string restoreInstancePayload *RestoreInstancePayload } @@ -3959,9 +4386,10 @@ func (r RestoreInstanceRequest) Execute() (*RestoreInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/restores" + 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{} @@ -4032,6 +4460,17 @@ func (r RestoreInstanceRequest) Execute() (*RestoreInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4066,23 +4505,26 @@ 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 *APIClient) RestoreInstance(ctx context.Context, projectId string, instanceId string) ApiRestoreInstanceRequest { +func (a *APIClient) RestoreInstance(ctx context.Context, projectId string, instanceId string, region string) ApiRestoreInstanceRequest { return RestoreInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) RestoreInstanceExecute(ctx context.Context, projectId string, instanceId string) (*RestoreInstanceResponse, error) { +func (a *APIClient) RestoreInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*RestoreInstanceResponse, error) { r := RestoreInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -4092,6 +4534,7 @@ type UpdateBackupScheduleRequest struct { apiService *DefaultApiService projectId string instanceId string + region string updateBackupSchedulePayload *UpdateBackupSchedulePayload } @@ -4119,9 +4562,10 @@ func (r UpdateBackupScheduleRequest) Execute() (*BackupSchedule, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/backups" + 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{} @@ -4192,6 +4636,17 @@ func (r UpdateBackupScheduleRequest) Execute() (*BackupSchedule, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4226,23 +4681,26 @@ 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 *APIClient) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string) ApiUpdateBackupScheduleRequest { +func (a *APIClient) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateBackupScheduleRequest { return UpdateBackupScheduleRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string) (*BackupSchedule, error) { +func (a *APIClient) UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string, region string) (*BackupSchedule, error) { r := UpdateBackupScheduleRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -4252,6 +4710,7 @@ type UpdateInstanceRequest struct { apiService *DefaultApiService projectId string instanceId string + region string updateInstancePayload *UpdateInstancePayload } @@ -4279,9 +4738,10 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}" + 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{} @@ -4352,6 +4812,17 @@ func (r UpdateInstanceRequest) Execute() (*UpdateInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4408,23 +4879,26 @@ Updates a deployment plan
Note that the time format for the backupSchedule @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 *APIClient) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { +func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, instanceId string, region string) ApiUpdateInstanceRequest { return UpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } } -func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) (*UpdateInstanceResponse, error) { +func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string, region string) (*UpdateInstanceResponse, error) { r := UpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, + region: region, } return r.Execute() } @@ -4435,6 +4909,7 @@ type UpdateUserRequest struct { projectId string instanceId string userId string + region string updateUserPayload *UpdateUserPayload } @@ -4461,10 +4936,11 @@ func (r UpdateUserRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + 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{} @@ -4535,6 +5011,17 @@ func (r UpdateUserRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = 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 + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -4571,25 +5058,28 @@ updates user for a mongodb instance @param projectId project id @param instanceId instance id @param userId user id + @param region The region which should be addressed @return ApiUpdateUserRequest */ -func (a *APIClient) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string) ApiUpdateUserRequest { +func (a *APIClient) UpdateUser(ctx context.Context, projectId string, instanceId string, userId string, region string) ApiUpdateUserRequest { return UpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } } -func (a *APIClient) UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { +func (a *APIClient) UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string, region string) error { r := UpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, instanceId: instanceId, userId: userId, + region: region, } return r.Execute() } diff --git a/services/mongodbflex/api_default_test.go b/services/mongodbflex/api_default_test.go index 9ca97a3e1..c20149257 100644 --- a/services/mongodbflex/api_default_test.go +++ b/services/mongodbflex/api_default_test.go @@ -24,11 +24,13 @@ import ( func Test_mongodbflex_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CloneInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/clone" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/clone" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -67,9 +69,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue cloneInstancePayload := CloneInstancePayload{} - resp, reqErr := apiClient.CloneInstance(context.Background(), projectId, instanceId).CloneInstancePayload(cloneInstancePayload).Execute() + resp, reqErr := apiClient.CloneInstance(context.Background(), projectId, instanceId, region).CloneInstancePayload(cloneInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -80,9 +83,11 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService CreateInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -120,9 +125,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { } projectId := projectIdValue + region := regionValue createInstancePayload := CreateInstancePayload{} - resp, reqErr := apiClient.CreateInstance(context.Background(), projectId).CreateInstancePayload(createInstancePayload).Execute() + resp, reqErr := apiClient.CreateInstance(context.Background(), projectId, region).CreateInstancePayload(createInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -133,11 +139,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService CreateUser", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -176,9 +184,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue createUserPayload := CreateUserPayload{} - resp, reqErr := apiClient.CreateUser(context.Background(), projectId, instanceId).CreateUserPayload(createUserPayload).Execute() + resp, reqErr := apiClient.CreateUser(context.Background(), projectId, instanceId, region).CreateUserPayload(createUserPayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -189,11 +198,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -229,8 +240,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - reqErr := apiClient.DeleteInstance(context.Background(), projectId, instanceId).Execute() + reqErr := apiClient.DeleteInstance(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -238,13 +250,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteUser", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(userIdValue, "userId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -281,8 +295,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue userId := userIdValue + region := regionValue - reqErr := apiClient.DeleteUser(context.Background(), projectId, instanceId, userId).Execute() + reqErr := apiClient.DeleteUser(context.Background(), projectId, instanceId, userId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -290,13 +305,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetBackup", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) backupIdValue := "backupId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"backupId"+"}", url.PathEscape(ParameterValueToString(backupIdValue, "backupId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -336,8 +353,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue backupId := backupIdValue + region := regionValue - resp, reqErr := apiClient.GetBackup(context.Background(), projectId, instanceId, backupId).Execute() + resp, reqErr := apiClient.GetBackup(context.Background(), projectId, instanceId, backupId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -348,11 +366,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -391,8 +411,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - resp, reqErr := apiClient.GetInstance(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.GetInstance(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -403,13 +424,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetUser", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(userIdValue, "userId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -449,8 +472,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue userId := userIdValue + region := regionValue - resp, reqErr := apiClient.GetUser(context.Background(), projectId, instanceId, userId).Execute() + resp, reqErr := apiClient.GetUser(context.Background(), projectId, instanceId, userId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -461,11 +485,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListAdvisorSlowQueries", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/advisor/slow-queries" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/advisor/slow-queries" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -504,8 +530,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - resp, reqErr := apiClient.ListAdvisorSlowQueries(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListAdvisorSlowQueries(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -516,11 +543,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListBackups", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -559,8 +588,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - resp, reqErr := apiClient.ListBackups(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListBackups(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -571,9 +601,11 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListFlavors", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/flavors" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/flavors" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -611,8 +643,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { } projectId := projectIdValue + region := regionValue - resp, reqErr := apiClient.ListFlavors(context.Background(), projectId).Execute() + resp, reqErr := apiClient.ListFlavors(context.Background(), projectId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -623,9 +656,11 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListInstances", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -664,8 +699,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue var tag string + region := regionValue - resp, reqErr := apiClient.ListInstances(context.Background(), projectId).Tag(tag).Execute() + resp, reqErr := apiClient.ListInstances(context.Background(), projectId, region).Tag(tag).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -676,13 +712,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListMetrics", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/metrics/{metric}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) metricValue := "metric-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"metric"+"}", url.PathEscape(ParameterValueToString(metricValue, "metric")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -723,8 +761,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { instanceId := instanceIdValue metric := metricValue var granularity string + region := regionValue - resp, reqErr := apiClient.ListMetrics(context.Background(), projectId, instanceId, metric).Granularity(granularity).Execute() + resp, reqErr := apiClient.ListMetrics(context.Background(), projectId, instanceId, metric, region).Granularity(granularity).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -735,11 +774,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListRestoreJobs", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/restores" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -778,8 +819,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - resp, reqErr := apiClient.ListRestoreJobs(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListRestoreJobs(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -790,11 +832,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListStorages", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/storages/{flavor}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/storages/{flavor}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) flavorValue := "flavor-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"flavor"+"}", url.PathEscape(ParameterValueToString(flavorValue, "flavor")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -833,8 +877,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue flavor := flavorValue + region := regionValue - resp, reqErr := apiClient.ListStorages(context.Background(), projectId, flavor).Execute() + resp, reqErr := apiClient.ListStorages(context.Background(), projectId, flavor, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -845,11 +890,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListSuggestedIndexes", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/advisor/suggested-indexes" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/advisor/suggested-indexes" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -888,8 +935,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - resp, reqErr := apiClient.ListSuggestedIndexes(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListSuggestedIndexes(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -900,11 +948,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListUsers", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -943,8 +993,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue - resp, reqErr := apiClient.ListUsers(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListUsers(context.Background(), projectId, instanceId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -955,9 +1006,11 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListVersions", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/versions" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/versions" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -995,8 +1048,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { } projectId := projectIdValue + region := regionValue - resp, reqErr := apiClient.ListVersions(context.Background(), projectId).Execute() + resp, reqErr := apiClient.ListVersions(context.Background(), projectId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1007,11 +1061,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PartialUpdateInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1050,9 +1106,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue partialUpdateInstancePayload := PartialUpdateInstancePayload{} - resp, reqErr := apiClient.PartialUpdateInstance(context.Background(), projectId, instanceId).PartialUpdateInstancePayload(partialUpdateInstancePayload).Execute() + resp, reqErr := apiClient.PartialUpdateInstance(context.Background(), projectId, instanceId, region).PartialUpdateInstancePayload(partialUpdateInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1063,13 +1120,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PartialUpdateUser", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(userIdValue, "userId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1106,9 +1165,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue userId := userIdValue + region := regionValue partialUpdateUserPayload := PartialUpdateUserPayload{} - reqErr := apiClient.PartialUpdateUser(context.Background(), projectId, instanceId, userId).PartialUpdateUserPayload(partialUpdateUserPayload).Execute() + reqErr := apiClient.PartialUpdateUser(context.Background(), projectId, instanceId, userId, region).PartialUpdateUserPayload(partialUpdateUserPayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1116,13 +1176,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ResetUser", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}/reset" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(userIdValue, "userId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1162,8 +1224,9 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue userId := userIdValue + region := regionValue - resp, reqErr := apiClient.ResetUser(context.Background(), projectId, instanceId, userId).Execute() + resp, reqErr := apiClient.ResetUser(context.Background(), projectId, instanceId, userId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1174,11 +1237,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService RestoreInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/restores" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/restores" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1217,9 +1282,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue restoreInstancePayload := RestoreInstancePayload{} - resp, reqErr := apiClient.RestoreInstance(context.Background(), projectId, instanceId).RestoreInstancePayload(restoreInstancePayload).Execute() + resp, reqErr := apiClient.RestoreInstance(context.Background(), projectId, instanceId, region).RestoreInstancePayload(restoreInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1230,11 +1296,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService UpdateBackupSchedule", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/backups" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1273,9 +1341,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue updateBackupSchedulePayload := UpdateBackupSchedulePayload{} - resp, reqErr := apiClient.UpdateBackupSchedule(context.Background(), projectId, instanceId).UpdateBackupSchedulePayload(updateBackupSchedulePayload).Execute() + resp, reqErr := apiClient.UpdateBackupSchedule(context.Background(), projectId, instanceId, region).UpdateBackupSchedulePayload(updateBackupSchedulePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1286,11 +1355,13 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService UpdateInstance", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1329,9 +1400,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue + region := regionValue updateInstancePayload := UpdateInstancePayload{} - resp, reqErr := apiClient.UpdateInstance(context.Background(), projectId, instanceId).UpdateInstancePayload(updateInstancePayload).Execute() + resp, reqErr := apiClient.UpdateInstance(context.Background(), projectId, instanceId, region).UpdateInstancePayload(updateInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1342,13 +1414,15 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService UpdateUser", func(t *testing.T) { - _apiUrlPath := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + _apiUrlPath := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) instanceIdValue := "instanceId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId-value" _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"userId"+"}", url.PathEscape(ParameterValueToString(userIdValue, "userId")), -1) + regionValue := "region-value" + _apiUrlPath = strings.Replace(_apiUrlPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(_apiUrlPath, func(w http.ResponseWriter, req *http.Request) { @@ -1385,9 +1459,10 @@ func Test_mongodbflex_DefaultApiService(t *testing.T) { projectId := projectIdValue instanceId := instanceIdValue userId := userIdValue + region := regionValue updateUserPayload := UpdateUserPayload{} - reqErr := apiClient.UpdateUser(context.Background(), projectId, instanceId, userId).UpdateUserPayload(updateUserPayload).Execute() + reqErr := apiClient.UpdateUser(context.Background(), projectId, instanceId, userId, region).UpdateUserPayload(updateUserPayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) diff --git a/services/mongodbflex/client.go b/services/mongodbflex/client.go index 3f70febc7..1bbf546a9 100644 --- a/services/mongodbflex/client.go +++ b/services/mongodbflex/client.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -42,7 +42,7 @@ var ( queryDescape = strings.NewReplacer("%5B", "[", "%5D", "]") ) -// APIClient manages communication with the STACKIT MongoDB Service API API v1.0.0 +// 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 diff --git a/services/mongodbflex/configuration.go b/services/mongodbflex/configuration.go index 07f1423ae..078cdeaeb 100644 --- a/services/mongodbflex/configuration.go +++ b/services/mongodbflex/configuration.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -22,15 +22,12 @@ func NewConfiguration() *config.Configuration { Debug: false, Servers: config.ServerConfigurations{ { - URL: "https://mongodb-flex-service.api.{region}stackit.cloud", + URL: "https://mongodb-flex-service.api.stackit.cloud", Description: "No description provided", Variables: map[string]config.ServerVariable{ "region": { Description: "No description provided", - DefaultValue: "eu01.", - EnumValues: []string{ - "eu01.", - }, + DefaultValue: "global", }, }, }, diff --git a/services/mongodbflex/model_acl.go b/services/mongodbflex/model_acl.go index 531a358af..246d3755b 100644 --- a/services/mongodbflex/model_acl.go +++ b/services/mongodbflex/model_acl.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_acl_test.go b/services/mongodbflex/model_acl_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_acl_test.go +++ b/services/mongodbflex/model_acl_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_backup.go b/services/mongodbflex/model_backup.go index 570086f06..2c82d2d72 100644 --- a/services/mongodbflex/model_backup.go +++ b/services/mongodbflex/model_backup.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -145,7 +145,7 @@ func setBackupGetOptionsAttributeType(arg *BackupGetOptionsAttributeType, val Ba types and functions for size */ -// isInteger +// isLong type BackupGetSizeAttributeType = *int64 type BackupGetSizeArgType = int64 type BackupGetSizeRetType = int64 diff --git a/services/mongodbflex/model_backup_schedule.go b/services/mongodbflex/model_backup_schedule.go index 7e572a7ec..1fa663c42 100644 --- a/services/mongodbflex/model_backup_schedule.go +++ b/services/mongodbflex/model_backup_schedule.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -140,12 +140,17 @@ func setBackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType(arg *BackupSc // BackupSchedule struct for BackupSchedule type BackupSchedule struct { - BackupSchedule BackupScheduleGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` - DailySnapshotRetentionDays BackupScheduleGetDailySnapshotRetentionDaysAttributeType `json:"dailySnapshotRetentionDays,omitempty"` + BackupSchedule BackupScheduleGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` + // Can be cast to int32 without loss of precision. + DailySnapshotRetentionDays BackupScheduleGetDailySnapshotRetentionDaysAttributeType `json:"dailySnapshotRetentionDays,omitempty"` + // Can be cast to int32 without loss of precision. MonthlySnapshotRetentionMonths BackupScheduleGetMonthlySnapshotRetentionMonthsAttributeType `json:"monthlySnapshotRetentionMonths,omitempty"` - PointInTimeWindowHours BackupScheduleGetPointInTimeWindowHoursAttributeType `json:"pointInTimeWindowHours,omitempty"` - SnapshotRetentionDays BackupScheduleGetSnapshotRetentionDaysAttributeType `json:"snapshotRetentionDays,omitempty"` - WeeklySnapshotRetentionWeeks BackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType `json:"weeklySnapshotRetentionWeeks,omitempty"` + // Can be cast to int32 without loss of precision. + PointInTimeWindowHours BackupScheduleGetPointInTimeWindowHoursAttributeType `json:"pointInTimeWindowHours,omitempty"` + // Can be cast to int32 without loss of precision. + SnapshotRetentionDays BackupScheduleGetSnapshotRetentionDaysAttributeType `json:"snapshotRetentionDays,omitempty"` + // Can be cast to int32 without loss of precision. + WeeklySnapshotRetentionWeeks BackupScheduleGetWeeklySnapshotRetentionWeeksAttributeType `json:"weeklySnapshotRetentionWeeks,omitempty"` } // NewBackupSchedule instantiates a new BackupSchedule object diff --git a/services/mongodbflex/model_backup_schedule_test.go b/services/mongodbflex/model_backup_schedule_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_backup_schedule_test.go +++ b/services/mongodbflex/model_backup_schedule_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_backup_test.go b/services/mongodbflex/model_backup_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_backup_test.go +++ b/services/mongodbflex/model_backup_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_clone_instance_payload.go b/services/mongodbflex/model_clone_instance_payload.go index 0d6c32c56..39cc22836 100644 --- a/services/mongodbflex/model_clone_instance_payload.go +++ b/services/mongodbflex/model_clone_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_clone_instance_payload_test.go b/services/mongodbflex/model_clone_instance_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_clone_instance_payload_test.go +++ b/services/mongodbflex/model_clone_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_clone_instance_response.go b/services/mongodbflex/model_clone_instance_response.go index 88b4d8569..c4ad7b09b 100644 --- a/services/mongodbflex/model_clone_instance_response.go +++ b/services/mongodbflex/model_clone_instance_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_clone_instance_response_test.go b/services/mongodbflex/model_clone_instance_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_clone_instance_response_test.go +++ b/services/mongodbflex/model_clone_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_instance_payload.go b/services/mongodbflex/model_create_instance_payload.go index 2a4ce056c..ea514474c 100644 --- a/services/mongodbflex/model_create_instance_payload.go +++ b/services/mongodbflex/model_create_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -22,9 +22,9 @@ var _ MappedNullable = &CreateInstancePayload{} */ // isModel -type CreateInstancePayloadGetAclAttributeType = *ACL -type CreateInstancePayloadGetAclArgType = ACL -type CreateInstancePayloadGetAclRetType = ACL +type CreateInstancePayloadGetAclAttributeType = *CreateInstancePayloadAcl +type CreateInstancePayloadGetAclArgType = CreateInstancePayloadAcl +type CreateInstancePayloadGetAclRetType = CreateInstancePayloadAcl func getCreateInstancePayloadGetAclAttributeTypeOk(arg CreateInstancePayloadGetAclAttributeType) (ret CreateInstancePayloadGetAclRetType, ok bool) { if arg == nil { @@ -215,6 +215,7 @@ type CreateInstancePayload struct { Name CreateInstancePayloadGetNameAttributeType `json:"name" required:"true"` // REQUIRED Options CreateInstancePayloadGetOptionsAttributeType `json:"options" required:"true"` + // Can be cast to int32 without loss of precision. // REQUIRED Replicas CreateInstancePayloadGetReplicasAttributeType `json:"replicas" required:"true"` // REQUIRED diff --git a/services/mongodbflex/model_create_instance_payload_acl.go b/services/mongodbflex/model_create_instance_payload_acl.go new file mode 100644 index 000000000..ddfd27971 --- /dev/null +++ b/services/mongodbflex/model_create_instance_payload_acl.go @@ -0,0 +1,127 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +import ( + "encoding/json" +) + +// checks if the CreateInstancePayloadAcl type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateInstancePayloadAcl{} + +/* + types and functions for items +*/ + +// isArray +type CreateInstancePayloadAclGetItemsAttributeType = *[]string +type CreateInstancePayloadAclGetItemsArgType = []string +type CreateInstancePayloadAclGetItemsRetType = []string + +func getCreateInstancePayloadAclGetItemsAttributeTypeOk(arg CreateInstancePayloadAclGetItemsAttributeType) (ret CreateInstancePayloadAclGetItemsRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +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 +type CreateInstancePayloadAcl struct { + Items CreateInstancePayloadAclGetItemsAttributeType `json:"items,omitempty"` +} + +// NewCreateInstancePayloadAcl instantiates a new CreateInstancePayloadAcl object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateInstancePayloadAcl() *CreateInstancePayloadAcl { + this := CreateInstancePayloadAcl{} + return &this +} + +// 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 +func NewCreateInstancePayloadAclWithDefaults() *CreateInstancePayloadAcl { + this := CreateInstancePayloadAcl{} + return &this +} + +// GetItems returns the Items field value if set, zero value otherwise. +func (o *CreateInstancePayloadAcl) GetItems() (res CreateInstancePayloadAclGetItemsRetType) { + res, _ = o.GetItemsOk() + return +} + +// 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 *CreateInstancePayloadAcl) GetItemsOk() (ret CreateInstancePayloadAclGetItemsRetType, ok bool) { + return getCreateInstancePayloadAclGetItemsAttributeTypeOk(o.Items) +} + +// HasItems returns a boolean if a field has been set. +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. +func (o *CreateInstancePayloadAcl) SetItems(v CreateInstancePayloadAclGetItemsRetType) { + setCreateInstancePayloadAclGetItemsAttributeType(&o.Items, v) +} + +func (o CreateInstancePayloadAcl) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getCreateInstancePayloadAclGetItemsAttributeTypeOk(o.Items); ok { + toSerialize["Items"] = val + } + return toSerialize, nil +} + +type NullableCreateInstancePayloadAcl struct { + value *CreateInstancePayloadAcl + isSet bool +} + +func (v NullableCreateInstancePayloadAcl) Get() *CreateInstancePayloadAcl { + return v.value +} + +func (v *NullableCreateInstancePayloadAcl) Set(val *CreateInstancePayloadAcl) { + v.value = val + v.isSet = true +} + +func (v NullableCreateInstancePayloadAcl) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateInstancePayloadAcl) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateInstancePayloadAcl(val *CreateInstancePayloadAcl) *NullableCreateInstancePayloadAcl { + return &NullableCreateInstancePayloadAcl{value: val, isSet: true} +} + +func (v NullableCreateInstancePayloadAcl) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateInstancePayloadAcl) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/services/mongodbflex/model_handlers_instances_get_instance_response_test.go b/services/mongodbflex/model_create_instance_payload_acl_test.go similarity index 91% rename from services/mongodbflex/model_handlers_instances_get_instance_response_test.go rename to services/mongodbflex/model_create_instance_payload_acl_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_handlers_instances_get_instance_response_test.go +++ b/services/mongodbflex/model_create_instance_payload_acl_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_instance_payload_test.go b/services/mongodbflex/model_create_instance_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_create_instance_payload_test.go +++ b/services/mongodbflex/model_create_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_instance_response.go b/services/mongodbflex/model_create_instance_response.go index b983d05f6..174435e45 100644 --- a/services/mongodbflex/model_create_instance_response.go +++ b/services/mongodbflex/model_create_instance_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_instance_response_test.go b/services/mongodbflex/model_create_instance_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_create_instance_response_test.go +++ b/services/mongodbflex/model_create_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_user_payload.go b/services/mongodbflex/model_create_user_payload.go index 17331c753..3337c5f7c 100644 --- a/services/mongodbflex/model_create_user_payload.go +++ b/services/mongodbflex/model_create_user_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_user_payload_test.go b/services/mongodbflex/model_create_user_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_create_user_payload_test.go +++ b/services/mongodbflex/model_create_user_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_user_response.go b/services/mongodbflex/model_create_user_response.go index b5a9ff5e4..dd2d372db 100644 --- a/services/mongodbflex/model_create_user_response.go +++ b/services/mongodbflex/model_create_user_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_create_user_response_test.go b/services/mongodbflex/model_create_user_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_create_user_response_test.go +++ b/services/mongodbflex/model_create_user_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_data_point.go b/services/mongodbflex/model_data_point.go index ac67593c6..0a80ba019 100644 --- a/services/mongodbflex/model_data_point.go +++ b/services/mongodbflex/model_data_point.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_data_point_test.go b/services/mongodbflex/model_data_point_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_data_point_test.go +++ b/services/mongodbflex/model_data_point_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_error.go b/services/mongodbflex/model_error.go index cefadd8a6..a8e78d18e 100644 --- a/services/mongodbflex/model_error.go +++ b/services/mongodbflex/model_error.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -101,6 +101,7 @@ type ErrorGetTypeRetType = string // Error struct for Error type Error struct { + // Can be cast to int32 without loss of precision. Code ErrorGetCodeAttributeType `json:"code,omitempty"` Fields ErrorGetFieldsAttributeType `json:"fields,omitempty"` Message ErrorGetMessageAttributeType `json:"message,omitempty"` diff --git a/services/mongodbflex/model_error_test.go b/services/mongodbflex/model_error_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_error_test.go +++ b/services/mongodbflex/model_error_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_flavor.go b/services/mongodbflex/model_flavor.go index deda2b15a..74820ae1d 100644 --- a/services/mongodbflex/model_flavor.go +++ b/services/mongodbflex/model_flavor.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -101,10 +101,12 @@ func setFlavorGetMemoryAttributeType(arg *FlavorGetMemoryAttributeType, val Flav // Flavor struct for Flavor type Flavor struct { + // Can be cast to int32 without loss of precision. Cpu FlavorGetCpuAttributeType `json:"cpu,omitempty"` Description FlavorGetDescriptionAttributeType `json:"description,omitempty"` Id FlavorGetIdAttributeType `json:"id,omitempty"` - Memory FlavorGetMemoryAttributeType `json:"memory,omitempty"` + // Can be cast to int32 without loss of precision. + Memory FlavorGetMemoryAttributeType `json:"memory,omitempty"` } // NewFlavor instantiates a new Flavor object diff --git a/services/mongodbflex/model_flavor_test.go b/services/mongodbflex/model_flavor_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_flavor_test.go +++ b/services/mongodbflex/model_flavor_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_get_backup_response.go b/services/mongodbflex/model_get_backup_response.go index 4ea4e7f7a..fa1b42494 100644 --- a/services/mongodbflex/model_get_backup_response.go +++ b/services/mongodbflex/model_get_backup_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_get_backup_response_test.go b/services/mongodbflex/model_get_backup_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_get_backup_response_test.go +++ b/services/mongodbflex/model_get_backup_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_get_instance_response.go b/services/mongodbflex/model_get_instance_response.go index 6626c50d2..0fc443f71 100644 --- a/services/mongodbflex/model_get_instance_response.go +++ b/services/mongodbflex/model_get_instance_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_get_instance_response_test.go b/services/mongodbflex/model_get_instance_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_get_instance_response_test.go +++ b/services/mongodbflex/model_get_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_get_user_response.go b/services/mongodbflex/model_get_user_response.go index 90349fd3a..0754f3fd1 100644 --- a/services/mongodbflex/model_get_user_response.go +++ b/services/mongodbflex/model_get_user_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_get_user_response_test.go b/services/mongodbflex/model_get_user_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_get_user_response_test.go +++ b/services/mongodbflex/model_get_user_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_handlers_infra_flavor.go b/services/mongodbflex/model_handlers_infra_flavor.go deleted file mode 100644 index 17ad69db2..000000000 --- a/services/mongodbflex/model_handlers_infra_flavor.go +++ /dev/null @@ -1,317 +0,0 @@ -/* -STACKIT MongoDB Service API - -This is the documentation for the STACKIT MongoDB Flex Service API - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package mongodbflex - -import ( - "encoding/json" -) - -// checks if the HandlersInfraFlavor type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HandlersInfraFlavor{} - -/* - types and functions for categories -*/ - -// isArray -type HandlersInfraFlavorGetCategoriesAttributeType = *[]string -type HandlersInfraFlavorGetCategoriesArgType = []string -type HandlersInfraFlavorGetCategoriesRetType = []string - -func getHandlersInfraFlavorGetCategoriesAttributeTypeOk(arg HandlersInfraFlavorGetCategoriesAttributeType) (ret HandlersInfraFlavorGetCategoriesRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInfraFlavorGetCategoriesAttributeType(arg *HandlersInfraFlavorGetCategoriesAttributeType, val HandlersInfraFlavorGetCategoriesRetType) { - *arg = &val -} - -/* - types and functions for cpu -*/ - -// isInteger -type HandlersInfraFlavorGetCpuAttributeType = *int64 -type HandlersInfraFlavorGetCpuArgType = int64 -type HandlersInfraFlavorGetCpuRetType = int64 - -func getHandlersInfraFlavorGetCpuAttributeTypeOk(arg HandlersInfraFlavorGetCpuAttributeType) (ret HandlersInfraFlavorGetCpuRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInfraFlavorGetCpuAttributeType(arg *HandlersInfraFlavorGetCpuAttributeType, val HandlersInfraFlavorGetCpuRetType) { - *arg = &val -} - -/* - types and functions for description -*/ - -// isNotNullableString -type HandlersInfraFlavorGetDescriptionAttributeType = *string - -func getHandlersInfraFlavorGetDescriptionAttributeTypeOk(arg HandlersInfraFlavorGetDescriptionAttributeType) (ret HandlersInfraFlavorGetDescriptionRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInfraFlavorGetDescriptionAttributeType(arg *HandlersInfraFlavorGetDescriptionAttributeType, val HandlersInfraFlavorGetDescriptionRetType) { - *arg = &val -} - -type HandlersInfraFlavorGetDescriptionArgType = string -type HandlersInfraFlavorGetDescriptionRetType = string - -/* - types and functions for id -*/ - -// isNotNullableString -type HandlersInfraFlavorGetIdAttributeType = *string - -func getHandlersInfraFlavorGetIdAttributeTypeOk(arg HandlersInfraFlavorGetIdAttributeType) (ret HandlersInfraFlavorGetIdRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInfraFlavorGetIdAttributeType(arg *HandlersInfraFlavorGetIdAttributeType, val HandlersInfraFlavorGetIdRetType) { - *arg = &val -} - -type HandlersInfraFlavorGetIdArgType = string -type HandlersInfraFlavorGetIdRetType = string - -/* - types and functions for memory -*/ - -// isInteger -type HandlersInfraFlavorGetMemoryAttributeType = *int64 -type HandlersInfraFlavorGetMemoryArgType = int64 -type HandlersInfraFlavorGetMemoryRetType = int64 - -func getHandlersInfraFlavorGetMemoryAttributeTypeOk(arg HandlersInfraFlavorGetMemoryAttributeType) (ret HandlersInfraFlavorGetMemoryRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInfraFlavorGetMemoryAttributeType(arg *HandlersInfraFlavorGetMemoryAttributeType, val HandlersInfraFlavorGetMemoryRetType) { - *arg = &val -} - -// HandlersInfraFlavor struct for HandlersInfraFlavor -type HandlersInfraFlavor struct { - Categories HandlersInfraFlavorGetCategoriesAttributeType `json:"categories,omitempty"` - Cpu HandlersInfraFlavorGetCpuAttributeType `json:"cpu,omitempty"` - Description HandlersInfraFlavorGetDescriptionAttributeType `json:"description,omitempty"` - Id HandlersInfraFlavorGetIdAttributeType `json:"id,omitempty"` - Memory HandlersInfraFlavorGetMemoryAttributeType `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() (res HandlersInfraFlavorGetCategoriesRetType) { - res, _ = o.GetCategoriesOk() - return -} - -// 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() (ret HandlersInfraFlavorGetCategoriesRetType, ok bool) { - return getHandlersInfraFlavorGetCategoriesAttributeTypeOk(o.Categories) -} - -// HasCategories returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasCategories() bool { - _, ok := o.GetCategoriesOk() - return ok -} - -// SetCategories gets a reference to the given []string and assigns it to the Categories field. -func (o *HandlersInfraFlavor) SetCategories(v HandlersInfraFlavorGetCategoriesRetType) { - setHandlersInfraFlavorGetCategoriesAttributeType(&o.Categories, v) -} - -// GetCpu returns the Cpu field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetCpu() (res HandlersInfraFlavorGetCpuRetType) { - res, _ = o.GetCpuOk() - return -} - -// 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() (ret HandlersInfraFlavorGetCpuRetType, ok bool) { - return getHandlersInfraFlavorGetCpuAttributeTypeOk(o.Cpu) -} - -// HasCpu returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasCpu() bool { - _, ok := o.GetCpuOk() - return ok -} - -// SetCpu gets a reference to the given int64 and assigns it to the Cpu field. -func (o *HandlersInfraFlavor) SetCpu(v HandlersInfraFlavorGetCpuRetType) { - setHandlersInfraFlavorGetCpuAttributeType(&o.Cpu, v) -} - -// GetDescription returns the Description field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetDescription() (res HandlersInfraFlavorGetDescriptionRetType) { - res, _ = o.GetDescriptionOk() - return -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraFlavor) GetDescriptionOk() (ret HandlersInfraFlavorGetDescriptionRetType, ok bool) { - return getHandlersInfraFlavorGetDescriptionAttributeTypeOk(o.Description) -} - -// HasDescription returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasDescription() bool { - _, ok := o.GetDescriptionOk() - return ok -} - -// SetDescription gets a reference to the given string and assigns it to the Description field. -func (o *HandlersInfraFlavor) SetDescription(v HandlersInfraFlavorGetDescriptionRetType) { - setHandlersInfraFlavorGetDescriptionAttributeType(&o.Description, v) -} - -// GetId returns the Id field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetId() (res HandlersInfraFlavorGetIdRetType) { - res, _ = o.GetIdOk() - return -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *HandlersInfraFlavor) GetIdOk() (ret HandlersInfraFlavorGetIdRetType, ok bool) { - return getHandlersInfraFlavorGetIdAttributeTypeOk(o.Id) -} - -// HasId returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasId() bool { - _, ok := o.GetIdOk() - return ok -} - -// SetId gets a reference to the given string and assigns it to the Id field. -func (o *HandlersInfraFlavor) SetId(v HandlersInfraFlavorGetIdRetType) { - setHandlersInfraFlavorGetIdAttributeType(&o.Id, v) -} - -// GetMemory returns the Memory field value if set, zero value otherwise. -func (o *HandlersInfraFlavor) GetMemory() (res HandlersInfraFlavorGetMemoryRetType) { - res, _ = o.GetMemoryOk() - return -} - -// 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() (ret HandlersInfraFlavorGetMemoryRetType, ok bool) { - return getHandlersInfraFlavorGetMemoryAttributeTypeOk(o.Memory) -} - -// HasMemory returns a boolean if a field has been set. -func (o *HandlersInfraFlavor) HasMemory() bool { - _, ok := o.GetMemoryOk() - return ok -} - -// SetMemory gets a reference to the given int64 and assigns it to the Memory field. -func (o *HandlersInfraFlavor) SetMemory(v HandlersInfraFlavorGetMemoryRetType) { - setHandlersInfraFlavorGetMemoryAttributeType(&o.Memory, v) -} - -func (o HandlersInfraFlavor) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHandlersInfraFlavorGetCategoriesAttributeTypeOk(o.Categories); ok { - toSerialize["Categories"] = val - } - if val, ok := getHandlersInfraFlavorGetCpuAttributeTypeOk(o.Cpu); ok { - toSerialize["Cpu"] = val - } - if val, ok := getHandlersInfraFlavorGetDescriptionAttributeTypeOk(o.Description); ok { - toSerialize["Description"] = val - } - if val, ok := getHandlersInfraFlavorGetIdAttributeTypeOk(o.Id); ok { - toSerialize["Id"] = val - } - if val, ok := getHandlersInfraFlavorGetMemoryAttributeTypeOk(o.Memory); ok { - toSerialize["Memory"] = val - } - 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/model_handlers_infra_get_flavors_response.go b/services/mongodbflex/model_handlers_infra_get_flavors_response.go deleted file mode 100644 index fc22bf045..000000000 --- a/services/mongodbflex/model_handlers_infra_get_flavors_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT MongoDB Service API - -This is the documentation for the STACKIT MongoDB Flex Service API - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package mongodbflex - -import ( - "encoding/json" -) - -// checks if the HandlersInfraGetFlavorsResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HandlersInfraGetFlavorsResponse{} - -/* - types and functions for flavors -*/ - -// isArray -type HandlersInfraGetFlavorsResponseGetFlavorsAttributeType = *[]HandlersInfraFlavor -type HandlersInfraGetFlavorsResponseGetFlavorsArgType = []HandlersInfraFlavor -type HandlersInfraGetFlavorsResponseGetFlavorsRetType = []HandlersInfraFlavor - -func getHandlersInfraGetFlavorsResponseGetFlavorsAttributeTypeOk(arg HandlersInfraGetFlavorsResponseGetFlavorsAttributeType) (ret HandlersInfraGetFlavorsResponseGetFlavorsRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInfraGetFlavorsResponseGetFlavorsAttributeType(arg *HandlersInfraGetFlavorsResponseGetFlavorsAttributeType, val HandlersInfraGetFlavorsResponseGetFlavorsRetType) { - *arg = &val -} - -// HandlersInfraGetFlavorsResponse struct for HandlersInfraGetFlavorsResponse -type HandlersInfraGetFlavorsResponse struct { - Flavors HandlersInfraGetFlavorsResponseGetFlavorsAttributeType `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() (res HandlersInfraGetFlavorsResponseGetFlavorsRetType) { - res, _ = o.GetFlavorsOk() - return -} - -// 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() (ret HandlersInfraGetFlavorsResponseGetFlavorsRetType, ok bool) { - return getHandlersInfraGetFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors) -} - -// HasFlavors returns a boolean if a field has been set. -func (o *HandlersInfraGetFlavorsResponse) HasFlavors() bool { - _, ok := o.GetFlavorsOk() - return ok -} - -// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. -func (o *HandlersInfraGetFlavorsResponse) SetFlavors(v HandlersInfraGetFlavorsResponseGetFlavorsRetType) { - setHandlersInfraGetFlavorsResponseGetFlavorsAttributeType(&o.Flavors, v) -} - -func (o HandlersInfraGetFlavorsResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHandlersInfraGetFlavorsResponseGetFlavorsAttributeTypeOk(o.Flavors); ok { - toSerialize["Flavors"] = val - } - 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/model_handlers_infra_get_flavors_response_test.go b/services/mongodbflex/model_handlers_infra_get_flavors_response_test.go deleted file mode 100644 index 66837611c..000000000 --- a/services/mongodbflex/model_handlers_infra_get_flavors_response_test.go +++ /dev/null @@ -1,11 +0,0 @@ -/* -STACKIT MongoDB Service API - -This is the documentation for the STACKIT MongoDB Flex Service API - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package mongodbflex diff --git a/services/mongodbflex/model_handlers_instances_get_instance_response.go b/services/mongodbflex/model_handlers_instances_get_instance_response.go deleted file mode 100644 index ec96045a3..000000000 --- a/services/mongodbflex/model_handlers_instances_get_instance_response.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -STACKIT MongoDB Service API - -This is the documentation for the STACKIT MongoDB Flex Service API - -API version: 1.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package mongodbflex - -import ( - "encoding/json" -) - -// checks if the HandlersInstancesGetInstanceResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HandlersInstancesGetInstanceResponse{} - -/* - types and functions for item -*/ - -// isModel -type HandlersInstancesGetInstanceResponseGetItemAttributeType = *Instance -type HandlersInstancesGetInstanceResponseGetItemArgType = Instance -type HandlersInstancesGetInstanceResponseGetItemRetType = Instance - -func getHandlersInstancesGetInstanceResponseGetItemAttributeTypeOk(arg HandlersInstancesGetInstanceResponseGetItemAttributeType) (ret HandlersInstancesGetInstanceResponseGetItemRetType, ok bool) { - if arg == nil { - return ret, false - } - return *arg, true -} - -func setHandlersInstancesGetInstanceResponseGetItemAttributeType(arg *HandlersInstancesGetInstanceResponseGetItemAttributeType, val HandlersInstancesGetInstanceResponseGetItemRetType) { - *arg = &val -} - -// HandlersInstancesGetInstanceResponse struct for HandlersInstancesGetInstanceResponse -type HandlersInstancesGetInstanceResponse struct { - Item HandlersInstancesGetInstanceResponseGetItemAttributeType `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() (res HandlersInstancesGetInstanceResponseGetItemRetType) { - res, _ = o.GetItemOk() - return -} - -// 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() (ret HandlersInstancesGetInstanceResponseGetItemRetType, ok bool) { - return getHandlersInstancesGetInstanceResponseGetItemAttributeTypeOk(o.Item) -} - -// HasItem returns a boolean if a field has been set. -func (o *HandlersInstancesGetInstanceResponse) HasItem() bool { - _, ok := o.GetItemOk() - return ok -} - -// SetItem gets a reference to the given Instance and assigns it to the Item field. -func (o *HandlersInstancesGetInstanceResponse) SetItem(v HandlersInstancesGetInstanceResponseGetItemRetType) { - setHandlersInstancesGetInstanceResponseGetItemAttributeType(&o.Item, v) -} - -func (o HandlersInstancesGetInstanceResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if val, ok := getHandlersInstancesGetInstanceResponseGetItemAttributeTypeOk(o.Item); ok { - toSerialize["Item"] = val - } - 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/model_handlers_instances_slow_queries_response.go b/services/mongodbflex/model_handlers_instances_slow_queries_response.go index efed9b46e..1804ea8f4 100644 --- a/services/mongodbflex/model_handlers_instances_slow_queries_response.go +++ b/services/mongodbflex/model_handlers_instances_slow_queries_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_handlers_instances_slow_queries_response_test.go b/services/mongodbflex/model_handlers_instances_slow_queries_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_handlers_instances_slow_queries_response_test.go +++ b/services/mongodbflex/model_handlers_instances_slow_queries_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go index f219f9807..b72fb932b 100644 --- a/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go +++ b/services/mongodbflex/model_handlers_instances_suggested_indexes_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_handlers_instances_suggested_indexes_response_test.go b/services/mongodbflex/model_handlers_instances_suggested_indexes_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_handlers_instances_suggested_indexes_response_test.go +++ b/services/mongodbflex/model_handlers_instances_suggested_indexes_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_host.go b/services/mongodbflex/model_host.go index 2d04b6b14..717c1cb9b 100644 --- a/services/mongodbflex/model_host.go +++ b/services/mongodbflex/model_host.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_host_metric.go b/services/mongodbflex/model_host_metric.go index 301ede680..093522982 100644 --- a/services/mongodbflex/model_host_metric.go +++ b/services/mongodbflex/model_host_metric.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_host_metric_test.go b/services/mongodbflex/model_host_metric_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_host_metric_test.go +++ b/services/mongodbflex/model_host_metric_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_host_test.go b/services/mongodbflex/model_host_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_host_test.go +++ b/services/mongodbflex/model_host_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_instance.go b/services/mongodbflex/model_instance.go index 08f7b008f..b6947f10d 100644 --- a/services/mongodbflex/model_instance.go +++ b/services/mongodbflex/model_instance.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -340,7 +340,8 @@ type Instance struct { Id InstanceGetIdAttributeType `json:"id,omitempty"` Name InstanceGetNameAttributeType `json:"name,omitempty"` Options InstanceGetOptionsAttributeType `json:"options,omitempty"` - Replicas InstanceGetReplicasAttributeType `json:"replicas,omitempty"` + // Can be cast to int32 without loss of precision. + Replicas InstanceGetReplicasAttributeType `json:"replicas,omitempty"` // The current status of the instance. Status InstanceGetStatusAttributeType `json:"status,omitempty"` Storage InstanceGetStorageAttributeType `json:"storage,omitempty"` diff --git a/services/mongodbflex/model_instance_flavor.go b/services/mongodbflex/model_instance_flavor.go new file mode 100644 index 000000000..c6d75156a --- /dev/null +++ b/services/mongodbflex/model_instance_flavor.go @@ -0,0 +1,319 @@ +/* +STACKIT MongoDB Service API + +This is the documentation for the STACKIT MongoDB Flex Service API + +API version: 2.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package mongodbflex + +import ( + "encoding/json" +) + +// checks if the InstanceFlavor type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &InstanceFlavor{} + +/* + types and functions for categories +*/ + +// isArray +type InstanceFlavorGetCategoriesAttributeType = *[]string +type InstanceFlavorGetCategoriesArgType = []string +type InstanceFlavorGetCategoriesRetType = []string + +func getInstanceFlavorGetCategoriesAttributeTypeOk(arg InstanceFlavorGetCategoriesAttributeType) (ret InstanceFlavorGetCategoriesRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceFlavorGetCategoriesAttributeType(arg *InstanceFlavorGetCategoriesAttributeType, val InstanceFlavorGetCategoriesRetType) { + *arg = &val +} + +/* + types and functions for cpu +*/ + +// isInteger +type InstanceFlavorGetCpuAttributeType = *int64 +type InstanceFlavorGetCpuArgType = int64 +type InstanceFlavorGetCpuRetType = int64 + +func getInstanceFlavorGetCpuAttributeTypeOk(arg InstanceFlavorGetCpuAttributeType) (ret InstanceFlavorGetCpuRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceFlavorGetCpuAttributeType(arg *InstanceFlavorGetCpuAttributeType, val InstanceFlavorGetCpuRetType) { + *arg = &val +} + +/* + types and functions for description +*/ + +// isNotNullableString +type InstanceFlavorGetDescriptionAttributeType = *string + +func getInstanceFlavorGetDescriptionAttributeTypeOk(arg InstanceFlavorGetDescriptionAttributeType) (ret InstanceFlavorGetDescriptionRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceFlavorGetDescriptionAttributeType(arg *InstanceFlavorGetDescriptionAttributeType, val InstanceFlavorGetDescriptionRetType) { + *arg = &val +} + +type InstanceFlavorGetDescriptionArgType = string +type InstanceFlavorGetDescriptionRetType = string + +/* + types and functions for id +*/ + +// isNotNullableString +type InstanceFlavorGetIdAttributeType = *string + +func getInstanceFlavorGetIdAttributeTypeOk(arg InstanceFlavorGetIdAttributeType) (ret InstanceFlavorGetIdRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceFlavorGetIdAttributeType(arg *InstanceFlavorGetIdAttributeType, val InstanceFlavorGetIdRetType) { + *arg = &val +} + +type InstanceFlavorGetIdArgType = string +type InstanceFlavorGetIdRetType = string + +/* + types and functions for memory +*/ + +// isInteger +type InstanceFlavorGetMemoryAttributeType = *int64 +type InstanceFlavorGetMemoryArgType = int64 +type InstanceFlavorGetMemoryRetType = int64 + +func getInstanceFlavorGetMemoryAttributeTypeOk(arg InstanceFlavorGetMemoryAttributeType) (ret InstanceFlavorGetMemoryRetType, ok bool) { + if arg == nil { + return ret, false + } + return *arg, true +} + +func setInstanceFlavorGetMemoryAttributeType(arg *InstanceFlavorGetMemoryAttributeType, val InstanceFlavorGetMemoryRetType) { + *arg = &val +} + +// InstanceFlavor struct for InstanceFlavor +type InstanceFlavor struct { + Categories InstanceFlavorGetCategoriesAttributeType `json:"categories,omitempty"` + // Can be cast to int32 without loss of precision. + Cpu InstanceFlavorGetCpuAttributeType `json:"cpu,omitempty"` + Description InstanceFlavorGetDescriptionAttributeType `json:"description,omitempty"` + Id InstanceFlavorGetIdAttributeType `json:"id,omitempty"` + // Can be cast to int32 without loss of precision. + Memory InstanceFlavorGetMemoryAttributeType `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() (res InstanceFlavorGetCategoriesRetType) { + res, _ = o.GetCategoriesOk() + return +} + +// 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() (ret InstanceFlavorGetCategoriesRetType, ok bool) { + return getInstanceFlavorGetCategoriesAttributeTypeOk(o.Categories) +} + +// HasCategories returns a boolean if a field has been set. +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. +func (o *InstanceFlavor) SetCategories(v InstanceFlavorGetCategoriesRetType) { + setInstanceFlavorGetCategoriesAttributeType(&o.Categories, v) +} + +// GetCpu returns the Cpu field value if set, zero value otherwise. +func (o *InstanceFlavor) GetCpu() (res InstanceFlavorGetCpuRetType) { + res, _ = o.GetCpuOk() + return +} + +// 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() (ret InstanceFlavorGetCpuRetType, ok bool) { + return getInstanceFlavorGetCpuAttributeTypeOk(o.Cpu) +} + +// HasCpu returns a boolean if a field has been set. +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. +func (o *InstanceFlavor) SetCpu(v InstanceFlavorGetCpuRetType) { + setInstanceFlavorGetCpuAttributeType(&o.Cpu, v) +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *InstanceFlavor) GetDescription() (res InstanceFlavorGetDescriptionRetType) { + res, _ = o.GetDescriptionOk() + return +} + +// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavor) GetDescriptionOk() (ret InstanceFlavorGetDescriptionRetType, ok bool) { + return getInstanceFlavorGetDescriptionAttributeTypeOk(o.Description) +} + +// HasDescription returns a boolean if a field has been set. +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. +func (o *InstanceFlavor) SetDescription(v InstanceFlavorGetDescriptionRetType) { + setInstanceFlavorGetDescriptionAttributeType(&o.Description, v) +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *InstanceFlavor) GetId() (res InstanceFlavorGetIdRetType) { + res, _ = o.GetIdOk() + return +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *InstanceFlavor) GetIdOk() (ret InstanceFlavorGetIdRetType, ok bool) { + return getInstanceFlavorGetIdAttributeTypeOk(o.Id) +} + +// HasId returns a boolean if a field has been set. +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. +func (o *InstanceFlavor) SetId(v InstanceFlavorGetIdRetType) { + setInstanceFlavorGetIdAttributeType(&o.Id, v) +} + +// GetMemory returns the Memory field value if set, zero value otherwise. +func (o *InstanceFlavor) GetMemory() (res InstanceFlavorGetMemoryRetType) { + res, _ = o.GetMemoryOk() + return +} + +// 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() (ret InstanceFlavorGetMemoryRetType, ok bool) { + return getInstanceFlavorGetMemoryAttributeTypeOk(o.Memory) +} + +// HasMemory returns a boolean if a field has been set. +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. +func (o *InstanceFlavor) SetMemory(v InstanceFlavorGetMemoryRetType) { + setInstanceFlavorGetMemoryAttributeType(&o.Memory, v) +} + +func (o InstanceFlavor) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if val, ok := getInstanceFlavorGetCategoriesAttributeTypeOk(o.Categories); ok { + toSerialize["Categories"] = val + } + if val, ok := getInstanceFlavorGetCpuAttributeTypeOk(o.Cpu); ok { + toSerialize["Cpu"] = val + } + if val, ok := getInstanceFlavorGetDescriptionAttributeTypeOk(o.Description); ok { + toSerialize["Description"] = val + } + if val, ok := getInstanceFlavorGetIdAttributeTypeOk(o.Id); ok { + toSerialize["Id"] = val + } + if val, ok := getInstanceFlavorGetMemoryAttributeTypeOk(o.Memory); ok { + toSerialize["Memory"] = val + } + 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/model_handlers_infra_flavor_test.go b/services/mongodbflex/model_instance_flavor_test.go similarity index 91% rename from services/mongodbflex/model_handlers_infra_flavor_test.go rename to services/mongodbflex/model_instance_flavor_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_handlers_infra_flavor_test.go +++ b/services/mongodbflex/model_instance_flavor_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_instance_list_instance.go b/services/mongodbflex/model_instance_list_instance.go index 83f4df361..5e57079a3 100644 --- a/services/mongodbflex/model_instance_list_instance.go +++ b/services/mongodbflex/model_instance_list_instance.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_instance_list_instance_test.go b/services/mongodbflex/model_instance_list_instance_test.go index 437680066..8c2e51807 100644 --- a/services/mongodbflex/model_instance_list_instance_test.go +++ b/services/mongodbflex/model_instance_list_instance_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_instance_response_user.go b/services/mongodbflex/model_instance_response_user.go index a8abc379d..e6ea414f9 100644 --- a/services/mongodbflex/model_instance_response_user.go +++ b/services/mongodbflex/model_instance_response_user.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -84,7 +84,7 @@ type InstanceResponseUserGetIdRetType = string types and functions for port */ -// isInteger +// isLong type InstanceResponseUserGetPortAttributeType = *int64 type InstanceResponseUserGetPortArgType = int64 type InstanceResponseUserGetPortRetType = int64 diff --git a/services/mongodbflex/model_instance_response_user_test.go b/services/mongodbflex/model_instance_response_user_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_instance_response_user_test.go +++ b/services/mongodbflex/model_instance_response_user_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_instance_test.go b/services/mongodbflex/model_instance_test.go index 674269e46..1408e040e 100644 --- a/services/mongodbflex/model_instance_test.go +++ b/services/mongodbflex/model_instance_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_backups_response.go b/services/mongodbflex/model_list_backups_response.go index d1bef2258..b41b3e009 100644 --- a/services/mongodbflex/model_list_backups_response.go +++ b/services/mongodbflex/model_list_backups_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ MappedNullable = &ListBackupsResponse{} types and functions for count */ -// isInteger +// isLong type ListBackupsResponseGetCountAttributeType = *int64 type ListBackupsResponseGetCountArgType = int64 type ListBackupsResponseGetCountRetType = int64 diff --git a/services/mongodbflex/model_list_backups_response_test.go b/services/mongodbflex/model_list_backups_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_backups_response_test.go +++ b/services/mongodbflex/model_list_backups_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_flavors_response.go b/services/mongodbflex/model_list_flavors_response.go index ae870c6d2..3bf5da661 100644 --- a/services/mongodbflex/model_list_flavors_response.go +++ b/services/mongodbflex/model_list_flavors_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -22,9 +22,9 @@ var _ MappedNullable = &ListFlavorsResponse{} */ // isArray -type ListFlavorsResponseGetFlavorsAttributeType = *[]HandlersInfraFlavor -type ListFlavorsResponseGetFlavorsArgType = []HandlersInfraFlavor -type ListFlavorsResponseGetFlavorsRetType = []HandlersInfraFlavor +type ListFlavorsResponseGetFlavorsAttributeType = *[]InstanceFlavor +type ListFlavorsResponseGetFlavorsArgType = []InstanceFlavor +type ListFlavorsResponseGetFlavorsRetType = []InstanceFlavor func getListFlavorsResponseGetFlavorsAttributeTypeOk(arg ListFlavorsResponseGetFlavorsAttributeType) (ret ListFlavorsResponseGetFlavorsRetType, ok bool) { if arg == nil { @@ -77,7 +77,7 @@ func (o *ListFlavorsResponse) HasFlavors() bool { return ok } -// SetFlavors gets a reference to the given []HandlersInfraFlavor and assigns it to the Flavors field. +// SetFlavors gets a reference to the given []InstanceFlavor and assigns it to the Flavors field. func (o *ListFlavorsResponse) SetFlavors(v ListFlavorsResponseGetFlavorsRetType) { setListFlavorsResponseGetFlavorsAttributeType(&o.Flavors, v) } diff --git a/services/mongodbflex/model_list_flavors_response_test.go b/services/mongodbflex/model_list_flavors_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_flavors_response_test.go +++ b/services/mongodbflex/model_list_flavors_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_instances_response.go b/services/mongodbflex/model_list_instances_response.go index 2453a685d..fb4e184dc 100644 --- a/services/mongodbflex/model_list_instances_response.go +++ b/services/mongodbflex/model_list_instances_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ MappedNullable = &ListInstancesResponse{} types and functions for count */ -// isInteger +// isLong type ListInstancesResponseGetCountAttributeType = *int64 type ListInstancesResponseGetCountArgType = int64 type ListInstancesResponseGetCountRetType = int64 diff --git a/services/mongodbflex/model_list_instances_response_test.go b/services/mongodbflex/model_list_instances_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_instances_response_test.go +++ b/services/mongodbflex/model_list_instances_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_metrics_response.go b/services/mongodbflex/model_list_metrics_response.go index 0232e5539..9a9e4bfdd 100644 --- a/services/mongodbflex/model_list_metrics_response.go +++ b/services/mongodbflex/model_list_metrics_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_metrics_response_test.go b/services/mongodbflex/model_list_metrics_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_metrics_response_test.go +++ b/services/mongodbflex/model_list_metrics_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_restore_jobs_response.go b/services/mongodbflex/model_list_restore_jobs_response.go index dde3b6ae0..9ef6f6723 100644 --- a/services/mongodbflex/model_list_restore_jobs_response.go +++ b/services/mongodbflex/model_list_restore_jobs_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_restore_jobs_response_test.go b/services/mongodbflex/model_list_restore_jobs_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_restore_jobs_response_test.go +++ b/services/mongodbflex/model_list_restore_jobs_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_storages_response.go b/services/mongodbflex/model_list_storages_response.go index acd96ccc6..f240d7772 100644 --- a/services/mongodbflex/model_list_storages_response.go +++ b/services/mongodbflex/model_list_storages_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_storages_response_test.go b/services/mongodbflex/model_list_storages_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_storages_response_test.go +++ b/services/mongodbflex/model_list_storages_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_user.go b/services/mongodbflex/model_list_user.go index 3198ee1b2..0cf476395 100644 --- a/services/mongodbflex/model_list_user.go +++ b/services/mongodbflex/model_list_user.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_user_test.go b/services/mongodbflex/model_list_user_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_user_test.go +++ b/services/mongodbflex/model_list_user_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_users_response.go b/services/mongodbflex/model_list_users_response.go index 268592251..a7308fb48 100644 --- a/services/mongodbflex/model_list_users_response.go +++ b/services/mongodbflex/model_list_users_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ MappedNullable = &ListUsersResponse{} types and functions for count */ -// isInteger +// isLong type ListUsersResponseGetCountAttributeType = *int64 type ListUsersResponseGetCountArgType = int64 type ListUsersResponseGetCountRetType = int64 diff --git a/services/mongodbflex/model_list_users_response_test.go b/services/mongodbflex/model_list_users_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_users_response_test.go +++ b/services/mongodbflex/model_list_users_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_versions_response.go b/services/mongodbflex/model_list_versions_response.go index 816abb806..c75f44db3 100644 --- a/services/mongodbflex/model_list_versions_response.go +++ b/services/mongodbflex/model_list_versions_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_list_versions_response_test.go b/services/mongodbflex/model_list_versions_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_list_versions_response_test.go +++ b/services/mongodbflex/model_list_versions_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_mongodbatlas_operation.go b/services/mongodbflex/model_mongodbatlas_operation.go index 734638df9..2a378bd9b 100644 --- a/services/mongodbflex/model_mongodbatlas_operation.go +++ b/services/mongodbflex/model_mongodbatlas_operation.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_mongodbatlas_operation_stats.go b/services/mongodbflex/model_mongodbatlas_operation_stats.go index 9b7d72e8a..756da2dfd 100644 --- a/services/mongodbflex/model_mongodbatlas_operation_stats.go +++ b/services/mongodbflex/model_mongodbatlas_operation_stats.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -41,7 +41,7 @@ func setMongodbatlasOperationStatsGetMsAttributeType(arg *MongodbatlasOperationS types and functions for nReturned */ -// isInteger +// isLong type MongodbatlasOperationStatsGetNReturnedAttributeType = *int64 type MongodbatlasOperationStatsGetNReturnedArgType = int64 type MongodbatlasOperationStatsGetNReturnedRetType = int64 @@ -61,7 +61,7 @@ func setMongodbatlasOperationStatsGetNReturnedAttributeType(arg *MongodbatlasOpe types and functions for nScanned */ -// isInteger +// isLong type MongodbatlasOperationStatsGetNScannedAttributeType = *int64 type MongodbatlasOperationStatsGetNScannedArgType = int64 type MongodbatlasOperationStatsGetNScannedRetType = int64 @@ -81,7 +81,7 @@ func setMongodbatlasOperationStatsGetNScannedAttributeType(arg *MongodbatlasOper types and functions for ts */ -// isInteger +// isLong type MongodbatlasOperationStatsGetTsAttributeType = *int64 type MongodbatlasOperationStatsGetTsArgType = int64 type MongodbatlasOperationStatsGetTsRetType = int64 diff --git a/services/mongodbflex/model_mongodbatlas_operation_stats_test.go b/services/mongodbflex/model_mongodbatlas_operation_stats_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_mongodbatlas_operation_stats_test.go +++ b/services/mongodbflex/model_mongodbatlas_operation_stats_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_mongodbatlas_operation_test.go b/services/mongodbflex/model_mongodbatlas_operation_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_mongodbatlas_operation_test.go +++ b/services/mongodbflex/model_mongodbatlas_operation_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_mongodbatlas_stats.go b/services/mongodbflex/model_mongodbatlas_stats.go index 3c230260c..e038c111b 100644 --- a/services/mongodbflex/model_mongodbatlas_stats.go +++ b/services/mongodbflex/model_mongodbatlas_stats.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -41,7 +41,7 @@ func setMongodbatlasStatsGetMsAttributeType(arg *MongodbatlasStatsGetMsAttribute types and functions for nReturned */ -// isInteger +// isLong type MongodbatlasStatsGetNReturnedAttributeType = *int64 type MongodbatlasStatsGetNReturnedArgType = int64 type MongodbatlasStatsGetNReturnedRetType = int64 @@ -61,7 +61,7 @@ func setMongodbatlasStatsGetNReturnedAttributeType(arg *MongodbatlasStatsGetNRet types and functions for nScanned */ -// isInteger +// isLong type MongodbatlasStatsGetNScannedAttributeType = *int64 type MongodbatlasStatsGetNScannedArgType = int64 type MongodbatlasStatsGetNScannedRetType = int64 @@ -81,7 +81,7 @@ func setMongodbatlasStatsGetNScannedAttributeType(arg *MongodbatlasStatsGetNScan types and functions for ts */ -// isInteger +// isLong type MongodbatlasStatsGetTsAttributeType = *int64 type MongodbatlasStatsGetTsArgType = int64 type MongodbatlasStatsGetTsRetType = int64 diff --git a/services/mongodbflex/model_mongodbatlas_stats_test.go b/services/mongodbflex/model_mongodbatlas_stats_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_mongodbatlas_stats_test.go +++ b/services/mongodbflex/model_mongodbatlas_stats_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_partial_update_instance_payload.go b/services/mongodbflex/model_partial_update_instance_payload.go index 2decacfaf..70219e857 100644 --- a/services/mongodbflex/model_partial_update_instance_payload.go +++ b/services/mongodbflex/model_partial_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -207,9 +207,10 @@ type PartialUpdateInstancePayload struct { BackupSchedule PartialUpdateInstancePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` FlavorId PartialUpdateInstancePayloadGetFlavorIdAttributeType `json:"flavorId,omitempty"` // Labels field is not certain/clear - Labels PartialUpdateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` - Name PartialUpdateInstancePayloadGetNameAttributeType `json:"name,omitempty"` - Options PartialUpdateInstancePayloadGetOptionsAttributeType `json:"options,omitempty"` + Labels PartialUpdateInstancePayloadGetLabelsAttributeType `json:"labels,omitempty"` + Name PartialUpdateInstancePayloadGetNameAttributeType `json:"name,omitempty"` + Options PartialUpdateInstancePayloadGetOptionsAttributeType `json:"options,omitempty"` + // Can be cast to int32 without loss of precision. Replicas PartialUpdateInstancePayloadGetReplicasAttributeType `json:"replicas,omitempty"` Storage PartialUpdateInstancePayloadGetStorageAttributeType `json:"storage,omitempty"` Version PartialUpdateInstancePayloadGetVersionAttributeType `json:"version,omitempty"` diff --git a/services/mongodbflex/model_partial_update_instance_payload_test.go b/services/mongodbflex/model_partial_update_instance_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_partial_update_instance_payload_test.go +++ b/services/mongodbflex/model_partial_update_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_partial_update_user_payload.go b/services/mongodbflex/model_partial_update_user_payload.go index ec7cb3a25..b756dae87 100644 --- a/services/mongodbflex/model_partial_update_user_payload.go +++ b/services/mongodbflex/model_partial_update_user_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_partial_update_user_payload_test.go b/services/mongodbflex/model_partial_update_user_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_partial_update_user_payload_test.go +++ b/services/mongodbflex/model_partial_update_user_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_restore_instance_payload.go b/services/mongodbflex/model_restore_instance_payload.go index 2d72af9f4..49533f134 100644 --- a/services/mongodbflex/model_restore_instance_payload.go +++ b/services/mongodbflex/model_restore_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_restore_instance_payload_test.go b/services/mongodbflex/model_restore_instance_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_restore_instance_payload_test.go +++ b/services/mongodbflex/model_restore_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_restore_instance_response.go b/services/mongodbflex/model_restore_instance_response.go index 27613d6df..76e35e2de 100644 --- a/services/mongodbflex/model_restore_instance_response.go +++ b/services/mongodbflex/model_restore_instance_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_restore_instance_response_test.go b/services/mongodbflex/model_restore_instance_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_restore_instance_response_test.go +++ b/services/mongodbflex/model_restore_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_restore_instance_status.go b/services/mongodbflex/model_restore_instance_status.go index a5d146604..e3cd237eb 100644 --- a/services/mongodbflex/model_restore_instance_status.go +++ b/services/mongodbflex/model_restore_instance_status.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_restore_instance_status_test.go b/services/mongodbflex/model_restore_instance_status_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_restore_instance_status_test.go +++ b/services/mongodbflex/model_restore_instance_status_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_shape.go b/services/mongodbflex/model_shape.go index 425ebbe82..1e74025ba 100644 --- a/services/mongodbflex/model_shape.go +++ b/services/mongodbflex/model_shape.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -41,7 +41,7 @@ func setShapeGetAvgMsAttributeType(arg *ShapeGetAvgMsAttributeType, val ShapeGet types and functions for count */ -// isInteger +// isLong type ShapeGetCountAttributeType = *int64 type ShapeGetCountArgType = int64 type ShapeGetCountRetType = int64 @@ -82,7 +82,7 @@ type ShapeGetIdRetType = string types and functions for inefficiencyScore */ -// isInteger +// isLong type ShapeGetInefficiencyScoreAttributeType = *int64 type ShapeGetInefficiencyScoreArgType = int64 type ShapeGetInefficiencyScoreRetType = int64 diff --git a/services/mongodbflex/model_shape_test.go b/services/mongodbflex/model_shape_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_shape_test.go +++ b/services/mongodbflex/model_shape_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_slow_query.go b/services/mongodbflex/model_slow_query.go index 903c86c5e..029594e01 100644 --- a/services/mongodbflex/model_slow_query.go +++ b/services/mongodbflex/model_slow_query.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_slow_query_test.go b/services/mongodbflex/model_slow_query_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_slow_query_test.go +++ b/services/mongodbflex/model_slow_query_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_storage.go b/services/mongodbflex/model_storage.go index 0bf46ee89..d62bb0497 100644 --- a/services/mongodbflex/model_storage.go +++ b/services/mongodbflex/model_storage.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -42,7 +42,7 @@ type StorageGetClassRetType = string types and functions for size */ -// isInteger +// isLong type StorageGetSizeAttributeType = *int64 type StorageGetSizeArgType = int64 type StorageGetSizeRetType = int64 diff --git a/services/mongodbflex/model_storage_range.go b/services/mongodbflex/model_storage_range.go index febdf1c9d..598973ccb 100644 --- a/services/mongodbflex/model_storage_range.go +++ b/services/mongodbflex/model_storage_range.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -21,7 +21,7 @@ var _ MappedNullable = &StorageRange{} types and functions for max */ -// isInteger +// isLong type StorageRangeGetMaxAttributeType = *int64 type StorageRangeGetMaxArgType = int64 type StorageRangeGetMaxRetType = int64 @@ -41,7 +41,7 @@ func setStorageRangeGetMaxAttributeType(arg *StorageRangeGetMaxAttributeType, va types and functions for min */ -// isInteger +// isLong type StorageRangeGetMinAttributeType = *int64 type StorageRangeGetMinArgType = int64 type StorageRangeGetMinRetType = int64 diff --git a/services/mongodbflex/model_storage_range_test.go b/services/mongodbflex/model_storage_range_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_storage_range_test.go +++ b/services/mongodbflex/model_storage_range_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_storage_test.go b/services/mongodbflex/model_storage_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_storage_test.go +++ b/services/mongodbflex/model_storage_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_suggested_index.go b/services/mongodbflex/model_suggested_index.go index 2944b3c9b..819b2adcb 100644 --- a/services/mongodbflex/model_suggested_index.go +++ b/services/mongodbflex/model_suggested_index.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_suggested_index_test.go b/services/mongodbflex/model_suggested_index_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_suggested_index_test.go +++ b/services/mongodbflex/model_suggested_index_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_update_backup_schedule_payload.go b/services/mongodbflex/model_update_backup_schedule_payload.go index c182e40d8..52e28c01c 100644 --- a/services/mongodbflex/model_update_backup_schedule_payload.go +++ b/services/mongodbflex/model_update_backup_schedule_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -140,12 +140,17 @@ func setUpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType( // UpdateBackupSchedulePayload struct for UpdateBackupSchedulePayload type UpdateBackupSchedulePayload struct { - BackupSchedule UpdateBackupSchedulePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` - DailySnapshotRetentionDays UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType `json:"dailySnapshotRetentionDays,omitempty"` + BackupSchedule UpdateBackupSchedulePayloadGetBackupScheduleAttributeType `json:"backupSchedule,omitempty"` + // Can be cast to int32 without loss of precision. + DailySnapshotRetentionDays UpdateBackupSchedulePayloadGetDailySnapshotRetentionDaysAttributeType `json:"dailySnapshotRetentionDays,omitempty"` + // Can be cast to int32 without loss of precision. MonthlySnapshotRetentionMonths UpdateBackupSchedulePayloadGetMonthlySnapshotRetentionMonthsAttributeType `json:"monthlySnapshotRetentionMonths,omitempty"` - PointInTimeWindowHours UpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType `json:"pointInTimeWindowHours,omitempty"` - SnapshotRetentionDays UpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType `json:"snapshotRetentionDays,omitempty"` - WeeklySnapshotRetentionWeeks UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType `json:"weeklySnapshotRetentionWeeks,omitempty"` + // Can be cast to int32 without loss of precision. + PointInTimeWindowHours UpdateBackupSchedulePayloadGetPointInTimeWindowHoursAttributeType `json:"pointInTimeWindowHours,omitempty"` + // Can be cast to int32 without loss of precision. + SnapshotRetentionDays UpdateBackupSchedulePayloadGetSnapshotRetentionDaysAttributeType `json:"snapshotRetentionDays,omitempty"` + // Can be cast to int32 without loss of precision. + WeeklySnapshotRetentionWeeks UpdateBackupSchedulePayloadGetWeeklySnapshotRetentionWeeksAttributeType `json:"weeklySnapshotRetentionWeeks,omitempty"` } // NewUpdateBackupSchedulePayload instantiates a new UpdateBackupSchedulePayload object diff --git a/services/mongodbflex/model_update_backup_schedule_payload_test.go b/services/mongodbflex/model_update_backup_schedule_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_update_backup_schedule_payload_test.go +++ b/services/mongodbflex/model_update_backup_schedule_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_update_instance_payload.go b/services/mongodbflex/model_update_instance_payload.go index e514941e3..3a91c55dd 100644 --- a/services/mongodbflex/model_update_instance_payload.go +++ b/services/mongodbflex/model_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -144,7 +144,7 @@ func setUpdateInstancePayloadGetOptionsAttributeType(arg *UpdateInstancePayloadG types and functions for replicas */ -// isInteger +// isLong type UpdateInstancePayloadGetReplicasAttributeType = *int64 type UpdateInstancePayloadGetReplicasArgType = int64 type UpdateInstancePayloadGetReplicasRetType = int64 diff --git a/services/mongodbflex/model_update_instance_payload_test.go b/services/mongodbflex/model_update_instance_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_update_instance_payload_test.go +++ b/services/mongodbflex/model_update_instance_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_update_instance_response.go b/services/mongodbflex/model_update_instance_response.go index 7b5c2c1ad..9bfb93b03 100644 --- a/services/mongodbflex/model_update_instance_response.go +++ b/services/mongodbflex/model_update_instance_response.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_update_instance_response_test.go b/services/mongodbflex/model_update_instance_response_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_update_instance_response_test.go +++ b/services/mongodbflex/model_update_instance_response_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_update_user_payload.go b/services/mongodbflex/model_update_user_payload.go index 3542c6865..1b20facee 100644 --- a/services/mongodbflex/model_update_user_payload.go +++ b/services/mongodbflex/model_update_user_payload.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_update_user_payload_test.go b/services/mongodbflex/model_update_user_payload_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_update_user_payload_test.go +++ b/services/mongodbflex/model_update_user_payload_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/model_user.go b/services/mongodbflex/model_user.go index 2e8f81f3a..0157714c7 100644 --- a/services/mongodbflex/model_user.go +++ b/services/mongodbflex/model_user.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -105,7 +105,7 @@ type UserGetPasswordRetType = string types and functions for port */ -// isInteger +// isLong type UserGetPortAttributeType = *int64 type UserGetPortArgType = int64 type UserGetPortRetType = int64 diff --git a/services/mongodbflex/model_user_test.go b/services/mongodbflex/model_user_test.go index 66837611c..e3129995f 100644 --- a/services/mongodbflex/model_user_test.go +++ b/services/mongodbflex/model_user_test.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/utils.go b/services/mongodbflex/utils.go index b60863e30..e86ef12de 100644 --- a/services/mongodbflex/utils.go +++ b/services/mongodbflex/utils.go @@ -3,7 +3,7 @@ STACKIT MongoDB Service API This is the documentation for the STACKIT MongoDB Flex Service API -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/services/mongodbflex/wait/wait.go b/services/mongodbflex/wait/wait.go index b9a54b5e4..76afae0e4 100644 --- a/services/mongodbflex/wait/wait.go +++ b/services/mongodbflex/wait/wait.go @@ -31,14 +31,14 @@ const ( // Interface needed for tests type APIClientInstanceInterface interface { - GetInstanceExecute(ctx context.Context, projectId, instanceId string) (*mongodbflex.GetInstanceResponse, error) - ListRestoreJobsExecute(ctx context.Context, projectId, instanceId string) (*mongodbflex.ListRestoreJobsResponse, error) + GetInstanceExecute(ctx context.Context, projectId, instanceId, region string) (*mongodbflex.GetInstanceResponse, error) + ListRestoreJobsExecute(ctx context.Context, projectId, instanceId, region string) (*mongodbflex.ListRestoreJobsResponse, error) } // CreateInstanceWaitHandler will wait for instance creation -func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { +func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { handler := wait.New(func() (waitFinished bool, response *mongodbflex.GetInstanceResponse, err error) { - s, err := a.GetInstanceExecute(ctx, projectId, instanceId) + s, err := a.GetInstanceExecute(ctx, projectId, instanceId, region) if err != nil { return false, nil, err } @@ -66,13 +66,13 @@ func CreateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface } // CloneInstanceWaitHandler will wait for instance clone to be created -func CloneInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { - return CreateInstanceWaitHandler(ctx, a, projectId, instanceId) +func CloneInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { + return CreateInstanceWaitHandler(ctx, a, projectId, instanceId, region) } -func RestoreInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, backupId string) *wait.AsyncActionHandler[mongodbflex.ListRestoreJobsResponse] { +func RestoreInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, backupId, region string) *wait.AsyncActionHandler[mongodbflex.ListRestoreJobsResponse] { handler := wait.New(func() (waitFinished bool, response *mongodbflex.ListRestoreJobsResponse, err error) { - s, err := a.ListRestoreJobsExecute(ctx, projectId, instanceId) + s, err := a.ListRestoreJobsExecute(ctx, projectId, instanceId, region) if err != nil { return false, nil, err } @@ -115,9 +115,9 @@ func RestoreInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterfac } // UpdateInstanceWaitHandler will wait for instance update -func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { +func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { handler := wait.New(func() (waitFinished bool, response *mongodbflex.GetInstanceResponse, err error) { - s, err := a.GetInstanceExecute(ctx, projectId, instanceId) + s, err := a.GetInstanceExecute(ctx, projectId, instanceId, region) if err != nil { return false, nil, err } @@ -144,14 +144,14 @@ func UpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface } // PartialUpdateInstanceWaitHandler will wait for instance update -func PartialUpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { - return UpdateInstanceWaitHandler(ctx, a, projectId, instanceId) +func PartialUpdateInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[mongodbflex.GetInstanceResponse] { + return UpdateInstanceWaitHandler(ctx, a, projectId, instanceId, region) } // DeleteInstanceWaitHandler will wait for instance deletion -func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId string) *wait.AsyncActionHandler[struct{}] { +func DeleteInstanceWaitHandler(ctx context.Context, a APIClientInstanceInterface, projectId, instanceId, region string) *wait.AsyncActionHandler[struct{}] { handler := wait.New(func() (waitFinished bool, response *struct{}, err error) { - _, err = a.GetInstanceExecute(ctx, projectId, instanceId) + _, err = a.GetInstanceExecute(ctx, projectId, instanceId, region) if err == nil { return false, nil, nil } diff --git a/services/mongodbflex/wait/wait_test.go b/services/mongodbflex/wait/wait_test.go index fcbfa4925..d136bb259 100644 --- a/services/mongodbflex/wait/wait_test.go +++ b/services/mongodbflex/wait/wait_test.go @@ -23,7 +23,9 @@ type apiClientInstanceMocked struct { listRestoreJobsFails bool } -func (a *apiClientInstanceMocked) GetInstanceExecute(_ context.Context, _, _ string) (*mongodbflex.GetInstanceResponse, error) { +const testRegion = "eu01" + +func (a *apiClientInstanceMocked) GetInstanceExecute(_ context.Context, _, _, _ string) (*mongodbflex.GetInstanceResponse, error) { if a.instanceGetFails { return nil, &oapierror.GenericOpenAPIError{ StatusCode: 500, @@ -44,7 +46,7 @@ func (a *apiClientInstanceMocked) GetInstanceExecute(_ context.Context, _, _ str }, nil } -func (a *apiClientInstanceMocked) ListRestoreJobsExecute(_ context.Context, _, _ string) (*mongodbflex.ListRestoreJobsResponse, error) { +func (a *apiClientInstanceMocked) ListRestoreJobsExecute(_ context.Context, _, _, _ string) (*mongodbflex.ListRestoreJobsResponse, error) { if a.listRestoreJobsFails { return nil, &oapierror.GenericOpenAPIError{ StatusCode: 500, @@ -125,7 +127,7 @@ func TestCreateInstanceWaitHandler(t *testing.T) { } } - handler := CreateInstanceWaitHandler(context.Background(), apiClient, "", instanceId) + handler := CreateInstanceWaitHandler(context.Background(), apiClient, "", instanceId, testRegion) gotRes, err := handler.SetTimeout(10 * time.Millisecond).SetSleepBeforeWait(1 * time.Millisecond).WaitWithContext(context.Background()) @@ -202,7 +204,7 @@ func TestUpdateInstanceWaitHandler(t *testing.T) { } } - handler := UpdateInstanceWaitHandler(context.Background(), apiClient, "", instanceId) + handler := UpdateInstanceWaitHandler(context.Background(), apiClient, "", instanceId, testRegion) gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) @@ -252,7 +254,7 @@ func TestDeleteInstanceWaitHandler(t *testing.T) { instanceState: tt.instanceState, } - handler := DeleteInstanceWaitHandler(context.Background(), apiClient, "", instanceId) + handler := DeleteInstanceWaitHandler(context.Background(), apiClient, "", instanceId, testRegion) _, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background()) @@ -328,7 +330,7 @@ func TestRestoreInstanceWaitHandler(t *testing.T) { } } - handler := RestoreInstanceWaitHandler(context.Background(), apiClient, "", "", backupId) + handler := RestoreInstanceWaitHandler(context.Background(), apiClient, "", "", backupId, testRegion) gotRes, err := handler.SetTimeout(10 * time.Millisecond).WaitWithContext(context.Background())