diff --git a/services/postgresflex/api_default.go b/services/postgresflex/api_default.go index 49e40ebb..485160a8 100644 --- a/services/postgresflex/api_default.go +++ b/services/postgresflex/api_default.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -30,6 +30,7 @@ type ApiCloneInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string cloneInstancePayload *CloneInstancePayload } @@ -54,8 +55,9 @@ func (r ApiCloneInstanceRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -127,6 +129,17 @@ func (r ApiCloneInstanceRequest) Execute() (*CloneInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -150,23 +163,26 @@ Clone an existing instance of a postgres database to a new destination instance @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 @param instanceId Instance ID @return ApiCloneInstanceRequest */ -func (a *APIClient) CloneInstance(ctx context.Context, projectId string, instanceId string) ApiCloneInstanceRequest { +func (a *APIClient) CloneInstance(ctx context.Context, projectId string, region string, instanceId string) ApiCloneInstanceRequest { return ApiCloneInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) CloneInstanceExecute(ctx context.Context, projectId string, instanceId string) (*CloneInstanceResponse, error) { +func (a *APIClient) CloneInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) (*CloneInstanceResponse, error) { r := ApiCloneInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -176,6 +192,7 @@ type ApiCreateDatabaseRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string createDatabasePayload *CreateDatabasePayload } @@ -200,8 +217,9 @@ func (r ApiCreateDatabaseRequest) Execute() (*InstanceCreateDatabaseResponse, er return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/databases" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -273,6 +291,17 @@ func (r ApiCreateDatabaseRequest) Execute() (*InstanceCreateDatabaseResponse, er newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -297,23 +326,26 @@ Note: The name of a valid user must be provided in the "options" map field using @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 @param instanceId Instance ID @return ApiCreateDatabaseRequest */ -func (a *APIClient) CreateDatabase(ctx context.Context, projectId string, instanceId string) ApiCreateDatabaseRequest { +func (a *APIClient) CreateDatabase(ctx context.Context, projectId string, region string, instanceId string) ApiCreateDatabaseRequest { return ApiCreateDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) CreateDatabaseExecute(ctx context.Context, projectId string, instanceId string) (*InstanceCreateDatabaseResponse, error) { +func (a *APIClient) CreateDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string) (*InstanceCreateDatabaseResponse, error) { r := ApiCreateDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -323,6 +355,7 @@ type ApiCreateInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string createInstancePayload *CreateInstancePayload } @@ -346,8 +379,9 @@ func (r ApiCreateInstanceRequest) 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{} @@ -418,6 +452,17 @@ func (r ApiCreateInstanceRequest) Execute() (*CreateInstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -441,21 +486,24 @@ Create a new instance of a postgres database @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 ApiCreateInstanceRequest{ 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 := ApiCreateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -464,6 +512,7 @@ type ApiCreateUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string createUserPayload *CreateUserPayload } @@ -488,8 +537,9 @@ func (r ApiCreateUserRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -561,6 +611,17 @@ func (r ApiCreateUserRequest) Execute() (*CreateUserResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -584,23 +645,26 @@ Create user for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID + @param region The region which should be addressed @param instanceId Instance ID @return ApiCreateUserRequest */ -func (a *APIClient) CreateUser(ctx context.Context, projectId string, instanceId string) ApiCreateUserRequest { +func (a *APIClient) CreateUser(ctx context.Context, projectId string, region string, instanceId string) ApiCreateUserRequest { return ApiCreateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, instanceId string) (*CreateUserResponse, error) { +func (a *APIClient) CreateUserExecute(ctx context.Context, projectId string, region string, instanceId string) (*CreateUserResponse, error) { r := ApiCreateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -610,6 +674,7 @@ type ApiDeleteDatabaseRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string databaseId string } @@ -626,8 +691,9 @@ func (r ApiDeleteDatabaseRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/databases/{databaseId}" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarPath = strings.Replace(localVarPath, "{"+"databaseId"+"}", url.PathEscape(ParameterValueToString(r.databaseId, "databaseId")), -1) @@ -695,6 +761,17 @@ func (r ApiDeleteDatabaseRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -708,25 +785,28 @@ Delete database for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID + @param region The region which should be addressed @param instanceId Instance ID @param databaseId Database ID @return ApiDeleteDatabaseRequest */ -func (a *APIClient) DeleteDatabase(ctx context.Context, projectId string, instanceId string, databaseId string) ApiDeleteDatabaseRequest { +func (a *APIClient) DeleteDatabase(ctx context.Context, projectId string, region string, instanceId string, databaseId string) ApiDeleteDatabaseRequest { return ApiDeleteDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseId: databaseId, } } -func (a *APIClient) DeleteDatabaseExecute(ctx context.Context, projectId string, instanceId string, databaseId string) error { +func (a *APIClient) DeleteDatabaseExecute(ctx context.Context, projectId string, region string, instanceId string, databaseId string) error { r := ApiDeleteDatabaseRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, databaseId: databaseId, } @@ -737,6 +817,7 @@ type ApiDeleteInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -752,8 +833,9 @@ func (r ApiDeleteInstanceRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -820,6 +902,17 @@ func (r ApiDeleteInstanceRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -854,23 +947,26 @@ Delete available instance @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 @param instanceId Instance ID @return ApiDeleteInstanceRequest */ -func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, instanceId string) ApiDeleteInstanceRequest { +func (a *APIClient) DeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiDeleteInstanceRequest { return ApiDeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error { +func (a *APIClient) DeleteInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error { r := ApiDeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -880,6 +976,7 @@ type ApiDeleteUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string userId string } @@ -896,8 +993,9 @@ func (r ApiDeleteUserRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -965,6 +1063,17 @@ func (r ApiDeleteUserRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -978,25 +1087,28 @@ Delete user for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID + @param region The region which should be addressed @param instanceId Instance ID @param userId User ID @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, region string, instanceId string, userId string) ApiDeleteUserRequest { return ApiDeleteUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } } -func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { +func (a *APIClient) DeleteUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId string) error { r := ApiDeleteUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } @@ -1007,6 +1119,7 @@ type ApiDisableServiceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string } func (r ApiDisableServiceRequest) Execute() error { @@ -1021,8 +1134,9 @@ func (r ApiDisableServiceRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}" 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{} @@ -1088,6 +1202,17 @@ func (r ApiDisableServiceRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } if localVarHTTPResponse.StatusCode == 500 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1111,21 +1236,24 @@ Termination is the deletion of a whole project which causes the deletion of all @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 ApiDisableServiceRequest */ -func (a *APIClient) DisableService(ctx context.Context, projectId string) ApiDisableServiceRequest { +func (a *APIClient) DisableService(ctx context.Context, projectId string, region string) ApiDisableServiceRequest { return ApiDisableServiceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } } -func (a *APIClient) DisableServiceExecute(ctx context.Context, projectId string) error { +func (a *APIClient) DisableServiceExecute(ctx context.Context, projectId string, region string) error { r := ApiDisableServiceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -1134,6 +1262,7 @@ type ApiForceDeleteInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -1149,8 +1278,9 @@ func (r ApiForceDeleteInstanceRequest) Execute() error { return &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/force" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/force" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -1206,6 +1336,28 @@ func (r ApiForceDeleteInstanceRequest) Execute() error { Body: localVarBody, ErrorMessage: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } if localVarHTTPResponse.StatusCode == 406 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -1240,23 +1392,26 @@ Forces the deletion of an delayed deleted instance @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 @param instanceId Instance ID @return ApiForceDeleteInstanceRequest */ -func (a *APIClient) ForceDeleteInstance(ctx context.Context, projectId string, instanceId string) ApiForceDeleteInstanceRequest { +func (a *APIClient) ForceDeleteInstance(ctx context.Context, projectId string, region string, instanceId string) ApiForceDeleteInstanceRequest { return ApiForceDeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) ForceDeleteInstanceExecute(ctx context.Context, projectId string, instanceId string) error { +func (a *APIClient) ForceDeleteInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) error { r := ApiForceDeleteInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -1266,6 +1421,7 @@ type ApiGetBackupRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string backupId string } @@ -1283,8 +1439,9 @@ func (r ApiGetBackupRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -1352,6 +1509,17 @@ func (r ApiGetBackupRequest) Execute() (*GetBackupResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -1375,25 +1543,28 @@ Get specific available backup @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 @param instanceId Instance ID @param backupId Backup ID @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, region string, instanceId string, backupId string) ApiGetBackupRequest { return ApiGetBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, backupId: backupId, } } -func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, instanceId string, backupId string) (*GetBackupResponse, error) { +func (a *APIClient) GetBackupExecute(ctx context.Context, projectId string, region string, instanceId string, backupId string) (*GetBackupResponse, error) { r := ApiGetBackupRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, backupId: backupId, } @@ -1404,6 +1575,7 @@ type ApiGetInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -1420,8 +1592,9 @@ func (r ApiGetInstanceRequest) Execute() (*InstanceResponse, 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -1488,6 +1661,17 @@ func (r ApiGetInstanceRequest) Execute() (*InstanceResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -1511,23 +1695,26 @@ Get specific available instances @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 @param instanceId Instance ID @return ApiGetInstanceRequest */ -func (a *APIClient) GetInstance(ctx context.Context, projectId string, instanceId string) ApiGetInstanceRequest { +func (a *APIClient) GetInstance(ctx context.Context, projectId string, region string, instanceId string) ApiGetInstanceRequest { return ApiGetInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, instanceId string) (*InstanceResponse, error) { +func (a *APIClient) GetInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) (*InstanceResponse, error) { r := ApiGetInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -1537,6 +1724,7 @@ type ApiGetUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string userId string } @@ -1554,8 +1742,9 @@ func (r ApiGetUserRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -1623,6 +1812,17 @@ func (r ApiGetUserRequest) Execute() (*GetUserResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -1646,25 +1846,28 @@ Get specific available user for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID + @param region The region which should be addressed @param instanceId Instance ID @param userId User ID @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, region string, instanceId string, userId string) ApiGetUserRequest { return ApiGetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } } -func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*GetUserResponse, error) { +func (a *APIClient) GetUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId string) (*GetUserResponse, error) { r := ApiGetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } @@ -1675,6 +1878,7 @@ type ApiListBackupsRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -1691,8 +1895,9 @@ func (r ApiListBackupsRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -1759,6 +1964,17 @@ func (r ApiListBackupsRequest) Execute() (*ListBackupsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -1782,23 +1998,26 @@ List all backups which are available for a specific instance @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 @param instanceId Instance ID @return ApiListBackupsRequest */ -func (a *APIClient) ListBackups(ctx context.Context, projectId string, instanceId string) ApiListBackupsRequest { +func (a *APIClient) ListBackups(ctx context.Context, projectId string, region string, instanceId string) ApiListBackupsRequest { return ApiListBackupsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, instanceId string) (*ListBackupsResponse, error) { +func (a *APIClient) ListBackupsExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListBackupsResponse, error) { r := ApiListBackupsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -1808,6 +2027,7 @@ type ApiListDatabaseParametersRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -1824,8 +2044,9 @@ func (r ApiListDatabaseParametersRequest) Execute() (*PostgresDatabaseParameterR return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/parameter" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/parameter" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -1892,6 +2113,17 @@ func (r ApiListDatabaseParametersRequest) Execute() (*PostgresDatabaseParameterR newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -1915,23 +2147,26 @@ List available databases parameter @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 @param instanceId Instance ID @return ApiListDatabaseParametersRequest */ -func (a *APIClient) ListDatabaseParameters(ctx context.Context, projectId string, instanceId string) ApiListDatabaseParametersRequest { +func (a *APIClient) ListDatabaseParameters(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabaseParametersRequest { return ApiListDatabaseParametersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) ListDatabaseParametersExecute(ctx context.Context, projectId string, instanceId string) (*PostgresDatabaseParameterResponse, error) { +func (a *APIClient) ListDatabaseParametersExecute(ctx context.Context, projectId string, region string, instanceId string) (*PostgresDatabaseParameterResponse, error) { r := ApiListDatabaseParametersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -1941,6 +2176,7 @@ type ApiListDatabasesRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -1957,8 +2193,9 @@ func (r ApiListDatabasesRequest) Execute() (*InstanceListDatabasesResponse, erro return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/instances/{instanceId}/databases" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -2025,6 +2262,17 @@ func (r ApiListDatabasesRequest) Execute() (*InstanceListDatabasesResponse, erro newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -2048,23 +2296,26 @@ List available databases for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID + @param region The region which should be addressed @param instanceId Instance ID @return ApiListDatabasesRequest */ -func (a *APIClient) ListDatabases(ctx context.Context, projectId string, instanceId string) ApiListDatabasesRequest { +func (a *APIClient) ListDatabases(ctx context.Context, projectId string, region string, instanceId string) ApiListDatabasesRequest { return ApiListDatabasesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) ListDatabasesExecute(ctx context.Context, projectId string, instanceId string) (*InstanceListDatabasesResponse, error) { +func (a *APIClient) ListDatabasesExecute(ctx context.Context, projectId string, region string, instanceId string) (*InstanceListDatabasesResponse, error) { r := ApiListDatabasesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -2074,6 +2325,7 @@ type ApiListFlavorsRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string } func (r ApiListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { @@ -2089,8 +2341,9 @@ func (r ApiListFlavorsRequest) 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{} @@ -2156,6 +2409,17 @@ func (r ApiListFlavorsRequest) Execute() (*ListFlavorsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -2179,21 +2443,24 @@ Get available flavors for a specific 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 ApiListFlavorsRequest */ -func (a *APIClient) ListFlavors(ctx context.Context, projectId string) ApiListFlavorsRequest { +func (a *APIClient) ListFlavors(ctx context.Context, projectId string, region string) ApiListFlavorsRequest { return ApiListFlavorsRequest{ 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 := ApiListFlavorsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -2202,6 +2469,7 @@ type ApiListInstancesRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string } func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { @@ -2217,8 +2485,9 @@ func (r ApiListInstancesRequest) 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{} @@ -2284,6 +2553,17 @@ func (r ApiListInstancesRequest) Execute() (*ListInstancesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -2307,21 +2587,24 @@ List available instances @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 ApiListInstancesRequest{ 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 := ApiListInstancesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -2330,6 +2613,7 @@ type ApiListMetricsRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string metric string granularity *string @@ -2379,8 +2663,9 @@ func (r ApiListMetricsRequest) Execute() (*InstanceMetricsResponse, 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -2461,6 +2746,17 @@ func (r ApiListMetricsRequest) Execute() (*InstanceMetricsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 405 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2505,25 +2801,28 @@ Returns a metric for an instance. The metric will only be for the master pod if @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The UUID of the project. + @param region The region which should be addressed @param instanceId The UUID of the instance. @param metric The name of the metric. Valid metrics are 'cpu', 'memory', 'max-connections', 'connections' and 'disk-use'. @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, region string, instanceId string, metric string) ApiListMetricsRequest { return ApiListMetricsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, metric: metric, } } -func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, instanceId string, metric string) (*InstanceMetricsResponse, error) { +func (a *APIClient) ListMetricsExecute(ctx context.Context, projectId string, region string, instanceId string, metric string) (*InstanceMetricsResponse, error) { r := ApiListMetricsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, metric: metric, } @@ -2534,6 +2833,7 @@ type ApiListStoragesRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string flavorId string } @@ -2550,8 +2850,9 @@ func (r ApiListStoragesRequest) Execute() (*ListStoragesResponse, error) { return localVarReturnValue, &oapierror.GenericOpenAPIError{ErrorMessage: err.Error()} } - localVarPath := localBasePath + "/v1/projects/{projectId}/storages/{flavorId}" + localVarPath := localBasePath + "/v2/projects/{projectId}/regions/{region}/storages/{flavorId}" localVarPath = strings.Replace(localVarPath, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(r.projectId, "projectId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"flavorId"+"}", url.PathEscape(ParameterValueToString(r.flavorId, "flavorId")), -1) localVarHeaderParams := make(map[string]string) @@ -2618,6 +2919,17 @@ func (r ApiListStoragesRequest) Execute() (*ListStoragesResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -2641,23 +2953,26 @@ Get available storages for a specific flavor @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 @param flavorId Flavor ID @return ApiListStoragesRequest */ -func (a *APIClient) ListStorages(ctx context.Context, projectId string, flavorId string) ApiListStoragesRequest { +func (a *APIClient) ListStorages(ctx context.Context, projectId string, region string, flavorId string) ApiListStoragesRequest { return ApiListStoragesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, flavorId: flavorId, } } -func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, flavorId string) (*ListStoragesResponse, error) { +func (a *APIClient) ListStoragesExecute(ctx context.Context, projectId string, region string, flavorId string) (*ListStoragesResponse, error) { r := ApiListStoragesRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, flavorId: flavorId, } return r.Execute() @@ -2667,6 +2982,7 @@ type ApiListUsersRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string } @@ -2683,8 +2999,9 @@ func (r ApiListUsersRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -2751,6 +3068,17 @@ func (r ApiListUsersRequest) Execute() (*ListUsersResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -2774,23 +3102,26 @@ List available users for an instance @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId Project ID + @param region The region which should be addressed @param instanceId Instance ID @return ApiListUsersRequest */ -func (a *APIClient) ListUsers(ctx context.Context, projectId string, instanceId string) ApiListUsersRequest { +func (a *APIClient) ListUsers(ctx context.Context, projectId string, region string, instanceId string) ApiListUsersRequest { return ApiListUsersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, instanceId string) (*ListUsersResponse, error) { +func (a *APIClient) ListUsersExecute(ctx context.Context, projectId string, region string, instanceId string) (*ListUsersResponse, error) { r := ApiListUsersRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -2800,6 +3131,7 @@ type ApiListVersionsRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId *string } @@ -2823,8 +3155,9 @@ func (r ApiListVersionsRequest) 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{} @@ -2893,6 +3226,17 @@ func (r ApiListVersionsRequest) Execute() (*ListVersionsResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -2916,21 +3260,24 @@ Get available versions for postgres database @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 ApiListVersionsRequest{ 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 := ApiListVersionsRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, } return r.Execute() } @@ -2939,6 +3286,7 @@ type ApiPartialUpdateInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string partialUpdateInstancePayload *PartialUpdateInstancePayload } @@ -2963,8 +3311,9 @@ func (r ApiPartialUpdateInstanceRequest) Execute() (*PartialUpdateInstanceRespon 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -3036,6 +3385,17 @@ func (r ApiPartialUpdateInstanceRequest) Execute() (*PartialUpdateInstanceRespon newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -3059,23 +3419,26 @@ Update available instance of a postgres database. Supported Versions are 12, 13, @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 @param instanceId Instance ID @return ApiPartialUpdateInstanceRequest */ -func (a *APIClient) PartialUpdateInstance(ctx context.Context, projectId string, instanceId string) ApiPartialUpdateInstanceRequest { +func (a *APIClient) PartialUpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiPartialUpdateInstanceRequest { return ApiPartialUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) (*PartialUpdateInstanceResponse, error) { +func (a *APIClient) PartialUpdateInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) (*PartialUpdateInstanceResponse, error) { r := ApiPartialUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -3085,6 +3448,7 @@ type ApiPartialUpdateUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string userId string partialUpdateUserPayload *PartialUpdateUserPayload @@ -3109,8 +3473,9 @@ func (r ApiPartialUpdateUserRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -3180,6 +3545,17 @@ func (r ApiPartialUpdateUserRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } if localVarHTTPResponse.StatusCode == 500 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3203,25 +3579,28 @@ Update user for an instance. Only the roles are updatable. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project + @param region The region which should be addressed @param instanceId The ID of the instance @param userId The ID of the user in the database @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, region string, instanceId string, userId string) ApiPartialUpdateUserRequest { return ApiPartialUpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } } -func (a *APIClient) PartialUpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { +func (a *APIClient) PartialUpdateUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId string) error { r := ApiPartialUpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } @@ -3232,6 +3611,7 @@ type ApiResetUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string userId string } @@ -3249,8 +3629,9 @@ func (r ApiResetUserRequest) Execute() (*ResetUserResponse, 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -3318,6 +3699,17 @@ func (r ApiResetUserRequest) Execute() (*ResetUserResponse, error) { newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } if localVarHTTPResponse.StatusCode == 404 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3362,25 +3754,28 @@ Reset user password for a postgres instance @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 @param instanceId Instance ID @param userId user ID @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, region string, instanceId string, userId string) ApiResetUserRequest { return ApiResetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } } -func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, instanceId string, userId string) (*ResetUserResponse, error) { +func (a *APIClient) ResetUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId string) (*ResetUserResponse, error) { r := ApiResetUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } @@ -3391,6 +3786,7 @@ type ApiUpdateBackupScheduleRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string updateBackupSchedulePayload *UpdateBackupSchedulePayload } @@ -3414,8 +3810,9 @@ func (r ApiUpdateBackupScheduleRequest) Execute() error { return &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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -3487,6 +3884,17 @@ func (r ApiUpdateBackupScheduleRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } return newErr } @@ -3500,23 +3908,26 @@ Update backup schedule @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 @param instanceId Instance ID @return ApiUpdateBackupScheduleRequest */ -func (a *APIClient) UpdateBackupSchedule(ctx context.Context, projectId string, instanceId string) ApiUpdateBackupScheduleRequest { +func (a *APIClient) UpdateBackupSchedule(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateBackupScheduleRequest { return ApiUpdateBackupScheduleRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) UpdateBackupScheduleExecute(ctx context.Context, projectId string, instanceId string) error { +func (a *APIClient) UpdateBackupScheduleExecute(ctx context.Context, projectId string, region string, instanceId string) error { r := ApiUpdateBackupScheduleRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -3526,6 +3937,7 @@ type ApiUpdateInstanceRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string updateInstancePayload *UpdateInstancePayload } @@ -3550,8 +3962,9 @@ func (r ApiUpdateInstanceRequest) Execute() (*PartialUpdateInstanceResponse, err 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -1) localVarPath = strings.Replace(localVarPath, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(r.instanceId, "instanceId")), -1) localVarHeaderParams := make(map[string]string) @@ -3623,6 +4036,17 @@ func (r ApiUpdateInstanceRequest) Execute() (*PartialUpdateInstanceResponse, err newErr.Model = v return localVarReturnValue, newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return localVarReturnValue, newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return localVarReturnValue, newErr + } return localVarReturnValue, newErr } @@ -3646,23 +4070,26 @@ Update available instance of a postgres database. Supported Versions are 12, 13, @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 @param instanceId Instance ID @return ApiUpdateInstanceRequest */ -func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, instanceId string) ApiUpdateInstanceRequest { +func (a *APIClient) UpdateInstance(ctx context.Context, projectId string, region string, instanceId string) ApiUpdateInstanceRequest { return ApiUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } } -func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, instanceId string) (*PartialUpdateInstanceResponse, error) { +func (a *APIClient) UpdateInstanceExecute(ctx context.Context, projectId string, region string, instanceId string) (*PartialUpdateInstanceResponse, error) { r := ApiUpdateInstanceRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, } return r.Execute() @@ -3672,6 +4099,7 @@ type ApiUpdateUserRequest struct { ctx context.Context apiService *DefaultApiService projectId string + region string instanceId string userId string updateUserPayload *UpdateUserPayload @@ -3696,8 +4124,9 @@ func (r ApiUpdateUserRequest) 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, "{"+"region"+"}", url.PathEscape(ParameterValueToString(r.region, "region")), -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) @@ -3767,6 +4196,17 @@ func (r ApiUpdateUserRequest) Execute() error { newErr.Model = v return newErr } + if localVarHTTPResponse.StatusCode == 401 { + var v Error + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.ErrorMessage = err.Error() + return newErr + } + newErr.ErrorMessage = oapierror.FormatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.Model = v + return newErr + } if localVarHTTPResponse.StatusCode == 500 { var v Error err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -3790,25 +4230,28 @@ Update user for an instance. Only the roles are updatable. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param projectId The ID of the project + @param region The region which should be addressed @param instanceId The ID of the instance @param userId The ID of the user in the database @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, region string, instanceId string, userId string) ApiUpdateUserRequest { return ApiUpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } } -func (a *APIClient) UpdateUserExecute(ctx context.Context, projectId string, instanceId string, userId string) error { +func (a *APIClient) UpdateUserExecute(ctx context.Context, projectId string, region string, instanceId string, userId string) error { r := ApiUpdateUserRequest{ apiService: a.defaultApi, ctx: ctx, projectId: projectId, + region: region, instanceId: instanceId, userId: userId, } diff --git a/services/postgresflex/api_default_test.go b/services/postgresflex/api_default_test.go index 6a24ae70..7d6ee277 100644 --- a/services/postgresflex/api_default_test.go +++ b/services/postgresflex/api_default_test.go @@ -24,9 +24,11 @@ import ( func Test_postgresflex_DefaultApiService(t *testing.T) { t.Run("Test DefaultApiService CloneInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/clone" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/clone" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -66,10 +68,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" cloneInstancePayload := CloneInstancePayload{} - resp, reqErr := apiClient.CloneInstance(context.Background(), projectId, instanceId).CloneInstancePayload(cloneInstancePayload).Execute() + resp, reqErr := apiClient.CloneInstance(context.Background(), projectId, region, instanceId).CloneInstancePayload(cloneInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -80,9 +83,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService CreateDatabase", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/databases" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -122,10 +127,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" createDatabasePayload := CreateDatabasePayload{} - resp, reqErr := apiClient.CreateDatabase(context.Background(), projectId, instanceId).CreateDatabasePayload(createDatabasePayload).Execute() + resp, reqErr := apiClient.CreateDatabase(context.Background(), projectId, region, instanceId).CreateDatabasePayload(createDatabasePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -136,9 +142,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService CreateInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances" + path := "/v2/projects/{projectId}/regions/{region}/instances" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { @@ -176,9 +184,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" 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) @@ -189,9 +198,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService CreateUser", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -231,10 +242,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" createUserPayload := CreateUserPayload{} - resp, reqErr := apiClient.CreateUser(context.Background(), projectId, instanceId).CreateUserPayload(createUserPayload).Execute() + resp, reqErr := apiClient.CreateUser(context.Background(), projectId, region, instanceId).CreateUserPayload(createUserPayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -245,9 +257,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteDatabase", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/databases/{databaseId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases/{databaseId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) databaseIdValue := "databaseId" @@ -286,10 +300,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" databaseId := "databaseId" - reqErr := apiClient.DeleteDatabase(context.Background(), projectId, instanceId, databaseId).Execute() + reqErr := apiClient.DeleteDatabase(context.Background(), projectId, region, instanceId, databaseId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -297,9 +312,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -336,9 +353,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - reqErr := apiClient.DeleteInstance(context.Background(), projectId, instanceId).Execute() + reqErr := apiClient.DeleteInstance(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -346,9 +364,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DeleteUser", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId" @@ -387,10 +407,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" userId := "userId" - reqErr := apiClient.DeleteUser(context.Background(), projectId, instanceId, userId).Execute() + reqErr := apiClient.DeleteUser(context.Background(), projectId, region, instanceId, userId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -398,9 +419,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService DisableService", func(t *testing.T) { - path := "/v1/projects/{projectId}" + path := "/v2/projects/{projectId}/regions/{region}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { @@ -435,8 +458,9 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" - reqErr := apiClient.DisableService(context.Background(), projectId).Execute() + reqErr := apiClient.DisableService(context.Background(), projectId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -444,9 +468,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ForceDeleteInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/force" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/force" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -483,9 +509,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - reqErr := apiClient.ForceDeleteInstance(context.Background(), projectId, instanceId).Execute() + reqErr := apiClient.ForceDeleteInstance(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -493,9 +520,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetBackup", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups/{backupId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups/{backupId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) backupIdValue := "backupId" @@ -537,10 +566,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" backupId := "backupId" - resp, reqErr := apiClient.GetBackup(context.Background(), projectId, instanceId, backupId).Execute() + resp, reqErr := apiClient.GetBackup(context.Background(), projectId, region, instanceId, backupId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -551,9 +581,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -593,9 +625,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - resp, reqErr := apiClient.GetInstance(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.GetInstance(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -606,9 +639,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService GetUser", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId" @@ -650,10 +685,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" userId := "userId" - resp, reqErr := apiClient.GetUser(context.Background(), projectId, instanceId, userId).Execute() + resp, reqErr := apiClient.GetUser(context.Background(), projectId, region, instanceId, userId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -664,9 +700,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListBackups", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -706,9 +744,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - resp, reqErr := apiClient.ListBackups(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListBackups(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -719,9 +758,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListDatabaseParameters", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/parameter" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/parameter" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -761,9 +802,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - resp, reqErr := apiClient.ListDatabaseParameters(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListDatabaseParameters(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -774,9 +816,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListDatabases", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/databases" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/databases" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -816,9 +860,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - resp, reqErr := apiClient.ListDatabases(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListDatabases(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -829,9 +874,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListFlavors", func(t *testing.T) { - path := "/v1/projects/{projectId}/flavors" + path := "/v2/projects/{projectId}/regions/{region}/flavors" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { @@ -869,8 +916,9 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" - 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) @@ -881,9 +929,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListInstances", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances" + path := "/v2/projects/{projectId}/regions/{region}/instances" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { @@ -921,8 +971,9 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" - resp, reqErr := apiClient.ListInstances(context.Background(), projectId).Execute() + resp, reqErr := apiClient.ListInstances(context.Background(), projectId, region).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -933,9 +984,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListMetrics", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/metrics/{metric}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/metrics/{metric}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) metricValue := "metric" @@ -977,11 +1030,12 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" metric := "metric" var granularity string - resp, reqErr := apiClient.ListMetrics(context.Background(), projectId, instanceId, metric).Granularity(granularity).Execute() + resp, reqErr := apiClient.ListMetrics(context.Background(), projectId, region, instanceId, metric).Granularity(granularity).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -992,9 +1046,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListStorages", func(t *testing.T) { - path := "/v1/projects/{projectId}/storages/{flavorId}" + path := "/v2/projects/{projectId}/regions/{region}/storages/{flavorId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) flavorIdValue := "flavorId" path = strings.Replace(path, "{"+"flavorId"+"}", url.PathEscape(ParameterValueToString(flavorIdValue, "flavorId")), -1) @@ -1034,9 +1090,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" flavorId := "flavorId" - resp, reqErr := apiClient.ListStorages(context.Background(), projectId, flavorId).Execute() + resp, reqErr := apiClient.ListStorages(context.Background(), projectId, region, flavorId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1047,9 +1104,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListUsers", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -1089,9 +1148,10 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" - resp, reqErr := apiClient.ListUsers(context.Background(), projectId, instanceId).Execute() + resp, reqErr := apiClient.ListUsers(context.Background(), projectId, region, instanceId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1102,9 +1162,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ListVersions", func(t *testing.T) { - path := "/v1/projects/{projectId}/versions" + path := "/v2/projects/{projectId}/regions/{region}/versions" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) testDefaultApiServeMux := http.NewServeMux() testDefaultApiServeMux.HandleFunc(path, func(w http.ResponseWriter, req *http.Request) { @@ -1142,8 +1204,9 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" - 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) @@ -1154,9 +1217,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PartialUpdateInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -1196,10 +1261,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" partialUpdateInstancePayload := PartialUpdateInstancePayload{} - resp, reqErr := apiClient.PartialUpdateInstance(context.Background(), projectId, instanceId).PartialUpdateInstancePayload(partialUpdateInstancePayload).Execute() + resp, reqErr := apiClient.PartialUpdateInstance(context.Background(), projectId, region, instanceId).PartialUpdateInstancePayload(partialUpdateInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1210,9 +1276,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService PartialUpdateUser", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId" @@ -1251,10 +1319,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" userId := "userId" - reqErr := apiClient.PartialUpdateUser(context.Background(), projectId, instanceId, userId).Execute() + reqErr := apiClient.PartialUpdateUser(context.Background(), projectId, region, instanceId, userId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1262,9 +1331,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService ResetUser", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}/reset" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}/reset" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId" @@ -1306,10 +1377,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" userId := "userId" - resp, reqErr := apiClient.ResetUser(context.Background(), projectId, instanceId, userId).Execute() + resp, reqErr := apiClient.ResetUser(context.Background(), projectId, region, instanceId, userId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1320,9 +1392,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService UpdateBackupSchedule", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/backups" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/backups" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -1359,10 +1433,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" updateBackupSchedulePayload := UpdateBackupSchedulePayload{} - reqErr := apiClient.UpdateBackupSchedule(context.Background(), projectId, instanceId).UpdateBackupSchedulePayload(updateBackupSchedulePayload).Execute() + reqErr := apiClient.UpdateBackupSchedule(context.Background(), projectId, region, instanceId).UpdateBackupSchedulePayload(updateBackupSchedulePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1370,9 +1445,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService UpdateInstance", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) @@ -1412,10 +1489,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" updateInstancePayload := UpdateInstancePayload{} - resp, reqErr := apiClient.UpdateInstance(context.Background(), projectId, instanceId).UpdateInstancePayload(updateInstancePayload).Execute() + resp, reqErr := apiClient.UpdateInstance(context.Background(), projectId, region, instanceId).UpdateInstancePayload(updateInstancePayload).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) @@ -1426,9 +1504,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { }) t.Run("Test DefaultApiService UpdateUser", func(t *testing.T) { - path := "/v1/projects/{projectId}/instances/{instanceId}/users/{userId}" + path := "/v2/projects/{projectId}/regions/{region}/instances/{instanceId}/users/{userId}" projectIdValue := "projectId" path = strings.Replace(path, "{"+"projectId"+"}", url.PathEscape(ParameterValueToString(projectIdValue, "projectId")), -1) + regionValue := "region" + path = strings.Replace(path, "{"+"region"+"}", url.PathEscape(ParameterValueToString(regionValue, "region")), -1) instanceIdValue := "instanceId" path = strings.Replace(path, "{"+"instanceId"+"}", url.PathEscape(ParameterValueToString(instanceIdValue, "instanceId")), -1) userIdValue := "userId" @@ -1467,10 +1547,11 @@ func Test_postgresflex_DefaultApiService(t *testing.T) { } projectId := "projectId" + region := "region" instanceId := "instanceId" userId := "userId" - reqErr := apiClient.UpdateUser(context.Background(), projectId, instanceId, userId).Execute() + reqErr := apiClient.UpdateUser(context.Background(), projectId, region, instanceId, userId).Execute() if reqErr != nil { t.Fatalf("error in call: %v", reqErr) diff --git a/services/postgresflex/client.go b/services/postgresflex/client.go index 3fcc396e..a7aeb1b4 100644 --- a/services/postgresflex/client.go +++ b/services/postgresflex/client.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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 PostgreSQL Flex API API v1.0.0 +// APIClient manages communication with the STACKIT PostgreSQL Flex 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/postgresflex/configuration.go b/services/postgresflex/configuration.go index 5f2d5296..f781b4a8 100644 --- a/services/postgresflex/configuration.go +++ b/services/postgresflex/configuration.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_acl.go b/services/postgresflex/model_acl.go index a5b2352a..b644a198 100644 --- a/services/postgresflex/model_acl.go +++ b/services/postgresflex/model_acl.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_configuration.go b/services/postgresflex/model_api_configuration.go index d0d5f2d5..65a87abf 100644 --- a/services/postgresflex/model_api_configuration.go +++ b/services/postgresflex/model_api_configuration.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_extension_config_load_response.go b/services/postgresflex/model_api_extension_config_load_response.go index 4aa48e41..61e98f50 100644 --- a/services/postgresflex/model_api_extension_config_load_response.go +++ b/services/postgresflex/model_api_extension_config_load_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_extension_configure_response.go b/services/postgresflex/model_api_extension_configure_response.go index 322960d9..18d9f72c 100644 --- a/services/postgresflex/model_api_extension_configure_response.go +++ b/services/postgresflex/model_api_extension_configure_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_extension_delete_response.go b/services/postgresflex/model_api_extension_delete_response.go index a427c61a..a7578fd1 100644 --- a/services/postgresflex/model_api_extension_delete_response.go +++ b/services/postgresflex/model_api_extension_delete_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_extension_list.go b/services/postgresflex/model_api_extension_list.go index 9056ff29..41ccd0d8 100644 --- a/services/postgresflex/model_api_extension_list.go +++ b/services/postgresflex/model_api_extension_list.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_extension_load_response.go b/services/postgresflex/model_api_extension_load_response.go index e88fc621..f33f22ef 100644 --- a/services/postgresflex/model_api_extension_load_response.go +++ b/services/postgresflex/model_api_extension_load_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_install_response.go b/services/postgresflex/model_api_install_response.go index 3c419d2b..1d4e3222 100644 --- a/services/postgresflex/model_api_install_response.go +++ b/services/postgresflex/model_api_install_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_api_installed_list_response.go b/services/postgresflex/model_api_installed_list_response.go index 6efea3d6..dddf0d3f 100644 --- a/services/postgresflex/model_api_installed_list_response.go +++ b/services/postgresflex/model_api_installed_list_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_backup.go b/services/postgresflex/model_backup.go index ed4a5757..699d58e3 100644 --- a/services/postgresflex/model_backup.go +++ b/services/postgresflex/model_backup.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_clone_instance_payload.go b/services/postgresflex/model_clone_instance_payload.go index 1aa6d9f5..501993d5 100644 --- a/services/postgresflex/model_clone_instance_payload.go +++ b/services/postgresflex/model_clone_instance_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_clone_instance_response.go b/services/postgresflex/model_clone_instance_response.go index d8c805cd..3341081e 100644 --- a/services/postgresflex/model_clone_instance_response.go +++ b/services/postgresflex/model_clone_instance_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_create_database_payload.go b/services/postgresflex/model_create_database_payload.go index ee897e42..f5defdab 100644 --- a/services/postgresflex/model_create_database_payload.go +++ b/services/postgresflex/model_create_database_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_create_instance_payload.go b/services/postgresflex/model_create_instance_payload.go index 8c2508be..9e63bc15 100644 --- a/services/postgresflex/model_create_instance_payload.go +++ b/services/postgresflex/model_create_instance_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -31,6 +31,7 @@ type CreateInstancePayload struct { Name *string `json:"name"` // REQUIRED Options *map[string]string `json:"options"` + // Can be cast to int32 without loss of precision. // REQUIRED Replicas *int64 `json:"replicas"` // REQUIRED @@ -68,7 +69,7 @@ func NewCreateInstancePayloadWithDefaults() *CreateInstancePayload { // GetAcl returns the Acl field value func (o *CreateInstancePayload) GetAcl() *ACL { - if o == nil { + if o == nil || IsNil(o.Acl) { var ret *ACL return ret } @@ -92,7 +93,7 @@ func (o *CreateInstancePayload) SetAcl(v *ACL) { // GetBackupSchedule returns the BackupSchedule field value func (o *CreateInstancePayload) GetBackupSchedule() *string { - if o == nil { + if o == nil || IsNil(o.BackupSchedule) { var ret *string return ret } @@ -116,7 +117,7 @@ func (o *CreateInstancePayload) SetBackupSchedule(v *string) { // GetFlavorId returns the FlavorId field value func (o *CreateInstancePayload) GetFlavorId() *string { - if o == nil { + if o == nil || IsNil(o.FlavorId) { var ret *string return ret } @@ -172,7 +173,7 @@ func (o *CreateInstancePayload) SetLabels(v *map[string]string) { // GetName returns the Name field value func (o *CreateInstancePayload) GetName() *string { - if o == nil { + if o == nil || IsNil(o.Name) { var ret *string return ret } @@ -196,7 +197,7 @@ func (o *CreateInstancePayload) SetName(v *string) { // GetOptions returns the Options field value func (o *CreateInstancePayload) GetOptions() *map[string]string { - if o == nil { + if o == nil || IsNil(o.Options) { var ret *map[string]string return ret } @@ -220,7 +221,7 @@ func (o *CreateInstancePayload) SetOptions(v *map[string]string) { // GetReplicas returns the Replicas field value func (o *CreateInstancePayload) GetReplicas() *int64 { - if o == nil { + if o == nil || IsNil(o.Replicas) { var ret *int64 return ret } @@ -244,7 +245,7 @@ func (o *CreateInstancePayload) SetReplicas(v *int64) { // GetStorage returns the Storage field value func (o *CreateInstancePayload) GetStorage() *Storage { - if o == nil { + if o == nil || IsNil(o.Storage) { var ret *Storage return ret } @@ -268,7 +269,7 @@ func (o *CreateInstancePayload) SetStorage(v *Storage) { // GetVersion returns the Version field value func (o *CreateInstancePayload) GetVersion() *string { - if o == nil { + if o == nil || IsNil(o.Version) { var ret *string return ret } diff --git a/services/postgresflex/model_create_instance_response.go b/services/postgresflex/model_create_instance_response.go index 5c32261a..fdb6fc85 100644 --- a/services/postgresflex/model_create_instance_response.go +++ b/services/postgresflex/model_create_instance_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_create_user_payload.go b/services/postgresflex/model_create_user_payload.go index a44698b1..a5078f0d 100644 --- a/services/postgresflex/model_create_user_payload.go +++ b/services/postgresflex/model_create_user_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_create_user_response.go b/services/postgresflex/model_create_user_response.go index 803acac2..fb4abd05 100644 --- a/services/postgresflex/model_create_user_response.go +++ b/services/postgresflex/model_create_user_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_error.go b/services/postgresflex/model_error.go index 8199f09a..dd63e06d 100644 --- a/services/postgresflex/model_error.go +++ b/services/postgresflex/model_error.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -19,6 +19,7 @@ var _ MappedNullable = &Error{} // Error struct for Error type Error struct { + // Can be cast to int32 without loss of precision. Code *int64 `json:"code,omitempty"` Fields *map[string][]string `json:"fields,omitempty"` Message *string `json:"message,omitempty"` diff --git a/services/postgresflex/model_extensions_configuration.go b/services/postgresflex/model_extensions_configuration.go index e1ae619f..7793def1 100644 --- a/services/postgresflex/model_extensions_configuration.go +++ b/services/postgresflex/model_extensions_configuration.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_extensions_extension_list_response.go b/services/postgresflex/model_extensions_extension_list_response.go index b5a5a992..4c5d71b2 100644 --- a/services/postgresflex/model_extensions_extension_list_response.go +++ b/services/postgresflex/model_extensions_extension_list_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_extensions_new_config.go b/services/postgresflex/model_extensions_new_config.go index 8b1ecd29..050607d0 100644 --- a/services/postgresflex/model_extensions_new_config.go +++ b/services/postgresflex/model_extensions_new_config.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_flavor.go b/services/postgresflex/model_flavor.go index c6cb06f7..346a6805 100644 --- a/services/postgresflex/model_flavor.go +++ b/services/postgresflex/model_flavor.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_get_backup_response.go b/services/postgresflex/model_get_backup_response.go index bb96bf4b..9b714744 100644 --- a/services/postgresflex/model_get_backup_response.go +++ b/services/postgresflex/model_get_backup_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_get_user_response.go b/services/postgresflex/model_get_user_response.go index f305470c..30e5f47a 100644 --- a/services/postgresflex/model_get_user_response.go +++ b/services/postgresflex/model_get_user_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance.go b/services/postgresflex/model_instance.go index 7bb58284..b1652cc9 100644 --- a/services/postgresflex/model_instance.go +++ b/services/postgresflex/model_instance.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -25,10 +25,11 @@ type Instance struct { Id *string `json:"id,omitempty"` Name *string `json:"name,omitempty"` Options *map[string]string `json:"options,omitempty"` - Replicas *int64 `json:"replicas,omitempty"` - Status *string `json:"status,omitempty"` - Storage *Storage `json:"storage,omitempty"` - Version *string `json:"version,omitempty"` + // Can be cast to int32 without loss of precision. + Replicas *int64 `json:"replicas,omitempty"` + Status *string `json:"status,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` } // NewInstance instantiates a new Instance object diff --git a/services/postgresflex/model_instance_create_database_response.go b/services/postgresflex/model_instance_create_database_response.go index 3b6ff9f7..3bd3b0c9 100644 --- a/services/postgresflex/model_instance_create_database_response.go +++ b/services/postgresflex/model_instance_create_database_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_data_point.go b/services/postgresflex/model_instance_data_point.go index 39cc312d..e3919124 100644 --- a/services/postgresflex/model_instance_data_point.go +++ b/services/postgresflex/model_instance_data_point.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_database.go b/services/postgresflex/model_instance_database.go index cca33c0f..b38991be 100644 --- a/services/postgresflex/model_instance_database.go +++ b/services/postgresflex/model_instance_database.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_host.go b/services/postgresflex/model_instance_host.go index 744e354c..a19dcab5 100644 --- a/services/postgresflex/model_instance_host.go +++ b/services/postgresflex/model_instance_host.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_host_metric.go b/services/postgresflex/model_instance_host_metric.go index 745f7da9..f2a3e094 100644 --- a/services/postgresflex/model_instance_host_metric.go +++ b/services/postgresflex/model_instance_host_metric.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_list_databases_response.go b/services/postgresflex/model_instance_list_databases_response.go index 3d1107b2..41ecd99a 100644 --- a/services/postgresflex/model_instance_list_databases_response.go +++ b/services/postgresflex/model_instance_list_databases_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_list_instance.go b/services/postgresflex/model_instance_list_instance.go index 8a8fa277..be7a9aaa 100644 --- a/services/postgresflex/model_instance_list_instance.go +++ b/services/postgresflex/model_instance_list_instance.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_metrics_response.go b/services/postgresflex/model_instance_metrics_response.go index 06c3790f..042ef9ce 100644 --- a/services/postgresflex/model_instance_metrics_response.go +++ b/services/postgresflex/model_instance_metrics_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_instance_response.go b/services/postgresflex/model_instance_response.go index 8f814ad2..8138df36 100644 --- a/services/postgresflex/model_instance_response.go +++ b/services/postgresflex/model_instance_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_backups_response.go b/services/postgresflex/model_list_backups_response.go index ab789cc7..dccd329d 100644 --- a/services/postgresflex/model_list_backups_response.go +++ b/services/postgresflex/model_list_backups_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_flavors_response.go b/services/postgresflex/model_list_flavors_response.go index ba4da587..94bb5304 100644 --- a/services/postgresflex/model_list_flavors_response.go +++ b/services/postgresflex/model_list_flavors_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_instances_response.go b/services/postgresflex/model_list_instances_response.go index bcf116f4..596b65f9 100644 --- a/services/postgresflex/model_list_instances_response.go +++ b/services/postgresflex/model_list_instances_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_storages_response.go b/services/postgresflex/model_list_storages_response.go index 06a8a5a9..d08cd34e 100644 --- a/services/postgresflex/model_list_storages_response.go +++ b/services/postgresflex/model_list_storages_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_users_response.go b/services/postgresflex/model_list_users_response.go index a8cc5dc8..a18bf893 100644 --- a/services/postgresflex/model_list_users_response.go +++ b/services/postgresflex/model_list_users_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_users_response_item.go b/services/postgresflex/model_list_users_response_item.go index 05637b83..eed4d1f8 100644 --- a/services/postgresflex/model_list_users_response_item.go +++ b/services/postgresflex/model_list_users_response_item.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_list_versions_response.go b/services/postgresflex/model_list_versions_response.go index 5ecfd84a..1a132376 100644 --- a/services/postgresflex/model_list_versions_response.go +++ b/services/postgresflex/model_list_versions_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_partial_update_instance_payload.go b/services/postgresflex/model_partial_update_instance_payload.go index e5139826..87961874 100644 --- a/services/postgresflex/model_partial_update_instance_payload.go +++ b/services/postgresflex/model_partial_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -23,12 +23,13 @@ type PartialUpdateInstancePayload struct { BackupSchedule *string `json:"backupSchedule,omitempty"` FlavorId *string `json:"flavorId,omitempty"` // Labels field is not certain/clear - Labels *map[string]string `json:"labels,omitempty"` - Name *string `json:"name,omitempty"` - Options *map[string]string `json:"options,omitempty"` - Replicas *int64 `json:"replicas,omitempty"` - Storage *Storage `json:"storage,omitempty"` - Version *string `json:"version,omitempty"` + Labels *map[string]string `json:"labels,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + // Can be cast to int32 without loss of precision. + Replicas *int64 `json:"replicas,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` } // NewPartialUpdateInstancePayload instantiates a new PartialUpdateInstancePayload object diff --git a/services/postgresflex/model_partial_update_instance_response.go b/services/postgresflex/model_partial_update_instance_response.go index 75251048..472c91d7 100644 --- a/services/postgresflex/model_partial_update_instance_response.go +++ b/services/postgresflex/model_partial_update_instance_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_partial_update_user_payload.go b/services/postgresflex/model_partial_update_user_payload.go index cadf8cde..b6e53523 100644 --- a/services/postgresflex/model_partial_update_user_payload.go +++ b/services/postgresflex/model_partial_update_user_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_postgres_database_parameter.go b/services/postgresflex/model_postgres_database_parameter.go index ca978fe8..6a546969 100644 --- a/services/postgresflex/model_postgres_database_parameter.go +++ b/services/postgresflex/model_postgres_database_parameter.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_postgres_database_parameter_response.go b/services/postgresflex/model_postgres_database_parameter_response.go index 7d32cbaf..5eeb3aea 100644 --- a/services/postgresflex/model_postgres_database_parameter_response.go +++ b/services/postgresflex/model_postgres_database_parameter_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_reset_user_response.go b/services/postgresflex/model_reset_user_response.go index ac85fe73..13445c7d 100644 --- a/services/postgresflex/model_reset_user_response.go +++ b/services/postgresflex/model_reset_user_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_storage.go b/services/postgresflex/model_storage.go index 668064d9..0e9030ae 100644 --- a/services/postgresflex/model_storage.go +++ b/services/postgresflex/model_storage.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_storage_range.go b/services/postgresflex/model_storage_range.go index d76ce584..2f905b17 100644 --- a/services/postgresflex/model_storage_range.go +++ b/services/postgresflex/model_storage_range.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_update_backup_schedule_payload.go b/services/postgresflex/model_update_backup_schedule_payload.go index 7c2286c7..377cd1f3 100644 --- a/services/postgresflex/model_update_backup_schedule_payload.go +++ b/services/postgresflex/model_update_backup_schedule_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -45,7 +45,7 @@ func NewUpdateBackupSchedulePayloadWithDefaults() *UpdateBackupSchedulePayload { // GetBackupSchedule returns the BackupSchedule field value func (o *UpdateBackupSchedulePayload) GetBackupSchedule() *string { - if o == nil { + if o == nil || IsNil(o.BackupSchedule) { var ret *string return ret } diff --git a/services/postgresflex/model_update_instance_payload.go b/services/postgresflex/model_update_instance_payload.go index 9bd35e98..29823bd8 100644 --- a/services/postgresflex/model_update_instance_payload.go +++ b/services/postgresflex/model_update_instance_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -23,12 +23,13 @@ type UpdateInstancePayload struct { BackupSchedule *string `json:"backupSchedule,omitempty"` FlavorId *string `json:"flavorId,omitempty"` // Labels field is not certain/clear - Labels *map[string]string `json:"labels,omitempty"` - Name *string `json:"name,omitempty"` - Options *map[string]string `json:"options,omitempty"` - Replicas *int64 `json:"replicas,omitempty"` - Storage *Storage `json:"storage,omitempty"` - Version *string `json:"version,omitempty"` + Labels *map[string]string `json:"labels,omitempty"` + Name *string `json:"name,omitempty"` + Options *map[string]string `json:"options,omitempty"` + // Can be cast to int32 without loss of precision. + Replicas *int64 `json:"replicas,omitempty"` + Storage *Storage `json:"storage,omitempty"` + Version *string `json:"version,omitempty"` } // NewUpdateInstancePayload instantiates a new UpdateInstancePayload object diff --git a/services/postgresflex/model_update_user_payload.go b/services/postgresflex/model_update_user_payload.go index 9361c7d3..fa229bbc 100644 --- a/services/postgresflex/model_update_user_payload.go +++ b/services/postgresflex/model_update_user_payload.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_user.go b/services/postgresflex/model_user.go index 19753759..1561ccd3 100644 --- a/services/postgresflex/model_user.go +++ b/services/postgresflex/model_user.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/model_user_response.go b/services/postgresflex/model_user_response.go index de124b7d..50909ebb 100644 --- a/services/postgresflex/model_user_response.go +++ b/services/postgresflex/model_user_response.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -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/postgresflex/utils.go b/services/postgresflex/utils.go index 764e4f7c..2076da42 100644 --- a/services/postgresflex/utils.go +++ b/services/postgresflex/utils.go @@ -3,7 +3,7 @@ STACKIT PostgreSQL Flex API This is the documentation for the STACKIT postgres service -API version: 1.0.0 +API version: 2.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.