From f0cfec1b915f2c9bf8f4415b7cdfea3ccb5526c0 Mon Sep 17 00:00:00 2001 From: Ionos Cloud SDK Robot Date: Mon, 12 Dec 2022 13:51:18 +0000 Subject: [PATCH] auto-generated version 1.2.0 --- api/openapi.yaml | 95 +++++++++++++++--------------- api_clusters.go | 2 +- api_logs.go | 2 +- api_metadata.go | 2 +- api_restores.go | 2 +- api_snapshots.go | 2 +- api_templates.go | 2 +- api_users.go | 30 +++------- client.go | 6 +- configuration.go | 4 +- docs/api/UsersApi.md | 28 ++++----- docs/models/Health.md | 15 +++++ docs/models/Metadata.md | 26 ++++++++ docs/models/SnapshotResponse.md | 2 +- docs/models/State.md | 2 +- docs/summary.md | 1 + logger.go | 2 +- model_api_version.go | 2 +- model_cluster_list.go | 2 +- model_cluster_list_all_of.go | 2 +- model_cluster_logs.go | 2 +- model_cluster_logs_instances.go | 2 +- model_cluster_logs_messages.go | 2 +- model_cluster_properties.go | 2 +- model_cluster_response.go | 2 +- model_connection.go | 2 +- model_create_cluster_properties.go | 2 +- model_create_cluster_request.go | 2 +- model_create_restore_request.go | 2 +- model_day_of_the_week.go | 16 ++--- model_error_message.go | 2 +- model_error_response.go | 2 +- model_health.go | 85 ++++++++++++++++++++++++++ model_maintenance_window.go | 2 +- model_metadata.go | 45 +++++++++++++- model_pagination.go | 2 +- model_pagination_links.go | 2 +- model_patch_cluster_properties.go | 2 +- model_patch_cluster_request.go | 2 +- model_patch_user_properties.go | 2 +- model_patch_user_request.go | 2 +- model_resource_type.go | 10 ++-- model_snapshot_list.go | 2 +- model_snapshot_list_all_of.go | 2 +- model_snapshot_properties.go | 2 +- model_snapshot_response.go | 4 +- model_state.go | 14 ++--- model_template_list.go | 2 +- model_template_list_all_of.go | 2 +- model_template_response.go | 2 +- model_user.go | 2 +- model_user_metadata.go | 2 +- model_user_properties.go | 2 +- model_user_roles.go | 2 +- model_users_list.go | 2 +- response.go | 2 +- utils.go | 2 +- 57 files changed, 307 insertions(+), 158 deletions(-) create mode 100644 docs/models/Health.md create mode 100644 model_health.go diff --git a/api/openapi.yaml b/api/openapi.yaml index 83424ba..ffc8cb7 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -9,7 +9,7 @@ info: \ (DCD) and the API use the same concepts consistently and are well suited for\ \ smooth and intuitive use.\n" title: IONOS DBaaS MongoDB REST API - version: 0.1.0 + version: 1.0.0 servers: - description: Production url: https://api.ionos.com/databases/mongodb @@ -298,7 +298,7 @@ paths: security: - basicAuth: [] - tokenAuth: [] - summary: Get a Cluster Users + summary: Get all Cluster Users tags: - Users post: @@ -354,7 +354,7 @@ paths: summary: Create MongoDB User tags: - Users - /clusters/{clusterId}/users/{database}/{username}: + /clusters/{clusterId}/users/{username}: delete: description: Deletes a MongoDB user specified by its ID. operationId: clustersUsersDelete @@ -367,14 +367,6 @@ paths: schema: type: string style: simple - - description: The authentication database. - explode: false - in: path - name: database - required: true - schema: - type: string - style: simple - description: The authentication username. explode: false in: path @@ -417,8 +409,7 @@ paths: tags: - Users get: - description: Retrieves the MongoDB user identified by the username and database - parameters. + description: Retrieves the MongoDB user identified by the username. operationId: clustersUsersFindById parameters: - description: The unique ID of the cluster. @@ -429,14 +420,6 @@ paths: schema: type: string style: simple - - description: The authentication database. - explode: false - in: path - name: database - required: true - schema: - type: string - style: simple - description: The authentication username. explode: false in: path @@ -490,14 +473,6 @@ paths: schema: type: string style: simple - - description: The authentication database. - explode: false - in: path - name: database - required: true - schema: - type: string - style: simple - description: The authentication username. explode: false in: path @@ -863,15 +838,6 @@ components: schema: type: string style: simple - DatabasePath: - description: The authentication database. - explode: false - in: path - name: database - required: true - schema: - type: string - style: simple UsernamePath: description: The authentication username. explode: false @@ -1004,7 +970,6 @@ components: $ref: '#/components/schemas/UserRoles' type: array required: - - database - password - username User: @@ -1079,7 +1044,11 @@ components: enum: - read - readWrite + - dbAdmin + - clusterMonitor - readAnyDatabase + - readWriteAnyDatabase + - dbAdminAnyDatabase example: read type: string database: @@ -1092,7 +1061,7 @@ components: description: List of snapshots. type: object SnapshotResponse: - description: A database snapshost. + description: A database snapshot. properties: type: $ref: '#/components/schemas/ResourceType' @@ -1147,6 +1116,7 @@ components: createdBy: john.doe@example.com lastModifiedDate: 2020-12-11T13:37:50+01:00 lastModifiedBy: jane.doe@example.com + health: HEALTHY state: AVAILABLE lastModifiedByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 id: 498ae72f-411f-11eb-9d07-046c59cc737e @@ -1230,15 +1200,16 @@ components: - de/txl - gb/lhr - es/vit + - us/ewr + - fr/par instances: description: | The total number of instances in the cluster (one primary and n-1 secondaries). example: 3 type: integer x-extensible-enum: + - 1 - 3 - - 5 - - 7 connections: items: $ref: '#/components/schemas/Connection' @@ -1337,6 +1308,7 @@ components: createdBy: john.doe@example.com lastModifiedDate: 2020-12-11T13:37:50+01:00 lastModifiedBy: jane.doe@example.com + health: HEALTHY state: AVAILABLE lastModifiedByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 properties: @@ -1397,6 +1369,7 @@ components: createdBy: john.doe@example.com lastModifiedDate: 2020-12-11T13:37:50+01:00 lastModifiedBy: jane.doe@example.com + health: HEALTHY state: AVAILABLE lastModifiedByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 properties: @@ -1428,8 +1401,16 @@ components: type: string state: $ref: '#/components/schemas/State' + health: + $ref: '#/components/schemas/Health' State: - description: The current status reported by the cluster. + description: | + The current status reported by the cluster. + * **AVAILABLE** Resources for this cluster exist and are healthy. + * **BUSY** Resources for this cluster are being created or updated. + * **DESTROYING** Delete cluster command was issued, the cluster is being deleted. + * **FAILED** Failed to get the cluster status. + * **UNKNOWN** The state is unknown. enum: - AVAILABLE - BUSY @@ -1438,6 +1419,20 @@ components: - UNKNOWN example: AVAILABLE type: string + Health: + description: | + The current health status reported by the cluster. + * **HEALTHY** Primary exists and number of replicas is equal to specified. + * **UNHEALTHY** Primary does not exist or cluster doesn't have majority. + * **DEGRADED** Primary exists and number of replicas is less than specified. + * **UNKNOWN** The health status is unknown. + enum: + - HEALTHY + - UNHEALTHY + - DEGRADED + - UNKNOWN + example: HEALTHY + type: string CreateClusterProperties: description: | The properties with all data needed to create a new MongoDB cluster. @@ -1477,9 +1472,8 @@ components: example: 3 type: integer x-extensible-enum: + - 1 - 3 - - 5 - - 7 connections: items: $ref: '#/components/schemas/Connection' @@ -1496,6 +1490,8 @@ components: - de/txl - gb/lhr - es/vit + - us/ewr + - fr/par displayName: description: The name of your cluster. example: MongoDB cluster @@ -1519,6 +1515,7 @@ components: createdBy: john.doe@example.com lastModifiedDate: 2020-12-11T13:37:50+01:00 lastModifiedBy: jane.doe@example.com + health: HEALTHY state: AVAILABLE lastModifiedByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 properties: @@ -1568,9 +1565,8 @@ components: example: 3 type: integer x-extensible-enum: + - 1 - 3 - - 5 - - 7 connections: items: $ref: '#/components/schemas/Connection' @@ -1631,9 +1627,8 @@ components: example: 3 type: integer x-extensible-enum: + - 1 - 3 - - 5 - - 7 Location: description: | The physical location where the cluster will be created. This is the location where all your instances will be located. This property is immutable. @@ -1644,6 +1639,8 @@ components: - de/txl - gb/lhr - es/vit + - us/ewr + - fr/par Connection: description: The network connection details for your cluster. example: diff --git a/api_clusters.go b/api_clusters.go index 9ecc3ac..c225914 100644 --- a/api_clusters.go +++ b/api_clusters.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_logs.go b/api_logs.go index 6d6d77f..8a16d36 100644 --- a/api_logs.go +++ b/api_logs.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_metadata.go b/api_metadata.go index 1376b6b..32f7b4b 100644 --- a/api_metadata.go +++ b/api_metadata.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_restores.go b/api_restores.go index a961083..7e42039 100644 --- a/api_restores.go +++ b/api_restores.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_snapshots.go b/api_snapshots.go index 663c80a..e45d199 100644 --- a/api_snapshots.go +++ b/api_snapshots.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_templates.go b/api_templates.go index 007145f..d50b745 100644 --- a/api_templates.go +++ b/api_templates.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/api_users.go b/api_users.go index 71c12a2..d86ab69 100644 --- a/api_users.go +++ b/api_users.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -31,7 +31,6 @@ type ApiClustersUsersDeleteRequest struct { ctx _context.Context ApiService *UsersApiService clusterId string - database string username string } @@ -44,16 +43,14 @@ func (r ApiClustersUsersDeleteRequest) Execute() (User, *APIResponse, error) { * Deletes a MongoDB user specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param clusterId The unique ID of the cluster. - * @param database The authentication database. * @param username The authentication username. * @return ApiClustersUsersDeleteRequest */ -func (a *UsersApiService) ClustersUsersDelete(ctx _context.Context, clusterId string, database string, username string) ApiClustersUsersDeleteRequest { +func (a *UsersApiService) ClustersUsersDelete(ctx _context.Context, clusterId string, username string) ApiClustersUsersDeleteRequest { return ApiClustersUsersDeleteRequest{ ApiService: a, ctx: ctx, clusterId: clusterId, - database: database, username: username, } } @@ -77,9 +74,8 @@ func (a *UsersApiService) ClustersUsersDeleteExecute(r ApiClustersUsersDeleteReq return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/clusters/{clusterId}/users/{database}/{username}" + localVarPath := localBasePath + "/clusters/{clusterId}/users/{username}" localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", _neturl.PathEscape(parameterToString(r.clusterId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"database"+"}", _neturl.PathEscape(parameterToString(r.database, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) @@ -175,7 +171,6 @@ type ApiClustersUsersFindByIdRequest struct { ctx _context.Context ApiService *UsersApiService clusterId string - database string username string } @@ -185,19 +180,17 @@ func (r ApiClustersUsersFindByIdRequest) Execute() (User, *APIResponse, error) { /* * ClustersUsersFindById Get a MongoDB User by ID - * Retrieves the MongoDB user identified by the username and database parameters. + * Retrieves the MongoDB user identified by the username. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param clusterId The unique ID of the cluster. - * @param database The authentication database. * @param username The authentication username. * @return ApiClustersUsersFindByIdRequest */ -func (a *UsersApiService) ClustersUsersFindById(ctx _context.Context, clusterId string, database string, username string) ApiClustersUsersFindByIdRequest { +func (a *UsersApiService) ClustersUsersFindById(ctx _context.Context, clusterId string, username string) ApiClustersUsersFindByIdRequest { return ApiClustersUsersFindByIdRequest{ ApiService: a, ctx: ctx, clusterId: clusterId, - database: database, username: username, } } @@ -221,9 +214,8 @@ func (a *UsersApiService) ClustersUsersFindByIdExecute(r ApiClustersUsersFindByI return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/clusters/{clusterId}/users/{database}/{username}" + localVarPath := localBasePath + "/clusters/{clusterId}/users/{username}" localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", _neturl.PathEscape(parameterToString(r.clusterId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"database"+"}", _neturl.PathEscape(parameterToString(r.database, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) @@ -326,7 +318,7 @@ func (r ApiClustersUsersGetRequest) Execute() (UsersList, *APIResponse, error) { } /* - * ClustersUsersGet Get a Cluster Users + * ClustersUsersGet Get all Cluster Users * Retrieves a list of MongoDB users. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param clusterId The unique ID of the cluster. @@ -455,7 +447,6 @@ type ApiClustersUsersPatchRequest struct { ctx _context.Context ApiService *UsersApiService clusterId string - database string username string patchUserRequest *PatchUserRequest } @@ -474,16 +465,14 @@ func (r ApiClustersUsersPatchRequest) Execute() (User, *APIResponse, error) { * Patches a MongoDB user specified by its ID. * @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). * @param clusterId The unique ID of the cluster. - * @param database The authentication database. * @param username The authentication username. * @return ApiClustersUsersPatchRequest */ -func (a *UsersApiService) ClustersUsersPatch(ctx _context.Context, clusterId string, database string, username string) ApiClustersUsersPatchRequest { +func (a *UsersApiService) ClustersUsersPatch(ctx _context.Context, clusterId string, username string) ApiClustersUsersPatchRequest { return ApiClustersUsersPatchRequest{ ApiService: a, ctx: ctx, clusterId: clusterId, - database: database, username: username, } } @@ -507,9 +496,8 @@ func (a *UsersApiService) ClustersUsersPatchExecute(r ApiClustersUsersPatchReque return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/clusters/{clusterId}/users/{database}/{username}" + localVarPath := localBasePath + "/clusters/{clusterId}/users/{username}" localVarPath = strings.Replace(localVarPath, "{"+"clusterId"+"}", _neturl.PathEscape(parameterToString(r.clusterId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"database"+"}", _neturl.PathEscape(parameterToString(r.database, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"username"+"}", _neturl.PathEscape(parameterToString(r.username, "")), -1) localVarHeaderParams := make(map[string]string) diff --git a/client.go b/client.go index eb0a4bb..f835686 100644 --- a/client.go +++ b/client.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -50,10 +50,10 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "1.1.0" + Version = "1.2.0" ) -// APIClient manages communication with the IONOS DBaaS MongoDB REST API API v0.1.0 +// APIClient manages communication with the IONOS DBaaS MongoDB REST API API v1.0.0 // In most cases there should be only one, shared, APIClient. type APIClient struct { cfg *Configuration diff --git a/configuration.go b/configuration.go index f3a96ec..9e30582 100644 --- a/configuration.go +++ b/configuration.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -128,7 +128,7 @@ func NewConfiguration(username, password, token, hostUrl string) *Configuration cfg := &Configuration{ DefaultHeader: make(map[string]string), DefaultQueryParams: url.Values{}, - UserAgent: "ionos-cloud-sdk-go-dbaas-mongo/v1.1.0", + UserAgent: "ionos-cloud-sdk-go-dbaas-mongo/v1.2.0", Debug: false, Username: username, Password: password, diff --git a/docs/api/UsersApi.md b/docs/api/UsersApi.md index 4d3e88f..72d1cb1 100644 --- a/docs/api/UsersApi.md +++ b/docs/api/UsersApi.md @@ -4,10 +4,10 @@ All URIs are relative to *https://api.ionos.com/databases/mongodb* |Method | HTTP request | Description| |------------- | ------------- | -------------| -|[**ClustersUsersDelete**](UsersApi.md#ClustersUsersDelete) | **Delete** /clusters/{clusterId}/users/{database}/{username} | Delete a MongoDB User by ID| -|[**ClustersUsersFindById**](UsersApi.md#ClustersUsersFindById) | **Get** /clusters/{clusterId}/users/{database}/{username} | Get a MongoDB User by ID| -|[**ClustersUsersGet**](UsersApi.md#ClustersUsersGet) | **Get** /clusters/{clusterId}/users | Get a Cluster Users| -|[**ClustersUsersPatch**](UsersApi.md#ClustersUsersPatch) | **Patch** /clusters/{clusterId}/users/{database}/{username} | Patch a MongoDB User by ID| +|[**ClustersUsersDelete**](UsersApi.md#ClustersUsersDelete) | **Delete** /clusters/{clusterId}/users/{username} | Delete a MongoDB User by ID| +|[**ClustersUsersFindById**](UsersApi.md#ClustersUsersFindById) | **Get** /clusters/{clusterId}/users/{username} | Get a MongoDB User by ID| +|[**ClustersUsersGet**](UsersApi.md#ClustersUsersGet) | **Get** /clusters/{clusterId}/users | Get all Cluster Users| +|[**ClustersUsersPatch**](UsersApi.md#ClustersUsersPatch) | **Patch** /clusters/{clusterId}/users/{username} | Patch a MongoDB User by ID| |[**ClustersUsersPost**](UsersApi.md#ClustersUsersPost) | **Post** /clusters/{clusterId}/users | Create MongoDB User| @@ -15,7 +15,7 @@ All URIs are relative to *https://api.ionos.com/databases/mongodb* ## ClustersUsersDelete ```go -var result User = ClustersUsersDelete(ctx, clusterId, database, username) +var result User = ClustersUsersDelete(ctx, clusterId, username) .Execute() ``` @@ -38,12 +38,11 @@ import ( func main() { clusterId := "clusterId_example" // string | The unique ID of the cluster. - database := "database_example" // string | The authentication database. username := "username_example" // string | The authentication username. configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.UsersApi.ClustersUsersDelete(context.Background(), clusterId, database, username).Execute() + resource, resp, err := apiClient.UsersApi.ClustersUsersDelete(context.Background(), clusterId, username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.ClustersUsersDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -60,7 +59,6 @@ func main() { |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**clusterId** | **string** | The unique ID of the cluster. | | -|**database** | **string** | The authentication database. | | |**username** | **string** | The authentication username. | | ### Other Parameters @@ -85,7 +83,7 @@ Other parameters are passed through a pointer to an apiClustersUsersDeleteReques ## ClustersUsersFindById ```go -var result User = ClustersUsersFindById(ctx, clusterId, database, username) +var result User = ClustersUsersFindById(ctx, clusterId, username) .Execute() ``` @@ -108,12 +106,11 @@ import ( func main() { clusterId := "clusterId_example" // string | The unique ID of the cluster. - database := "database_example" // string | The authentication database. username := "username_example" // string | The authentication username. configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.UsersApi.ClustersUsersFindById(context.Background(), clusterId, database, username).Execute() + resource, resp, err := apiClient.UsersApi.ClustersUsersFindById(context.Background(), clusterId, username).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.ClustersUsersFindById``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -130,7 +127,6 @@ func main() { |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**clusterId** | **string** | The unique ID of the cluster. | | -|**database** | **string** | The authentication database. | | |**username** | **string** | The authentication username. | | ### Other Parameters @@ -159,7 +155,7 @@ var result UsersList = ClustersUsersGet(ctx, clusterId) .Execute() ``` -Get a Cluster Users +Get all Cluster Users @@ -221,7 +217,7 @@ Other parameters are passed through a pointer to an apiClustersUsersGetRequest s ## ClustersUsersPatch ```go -var result User = ClustersUsersPatch(ctx, clusterId, database, username) +var result User = ClustersUsersPatch(ctx, clusterId, username) .PatchUserRequest(patchUserRequest) .Execute() ``` @@ -245,13 +241,12 @@ import ( func main() { clusterId := "clusterId_example" // string | The unique ID of the cluster. - database := "database_example" // string | The authentication database. username := "username_example" // string | The authentication username. patchUserRequest := *openapiclient.NewPatchUserRequest() // PatchUserRequest | Part of the MongoDB user which should be modified. configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.UsersApi.ClustersUsersPatch(context.Background(), clusterId, database, username).PatchUserRequest(patchUserRequest).Execute() + resource, resp, err := apiClient.UsersApi.ClustersUsersPatch(context.Background(), clusterId, username).PatchUserRequest(patchUserRequest).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.ClustersUsersPatch``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -268,7 +263,6 @@ func main() { |------------- | ------------- | ------------- | -------------| |**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc.| |**clusterId** | **string** | The unique ID of the cluster. | | -|**database** | **string** | The authentication database. | | |**username** | **string** | The authentication username. | | ### Other Parameters diff --git a/docs/models/Health.md b/docs/models/Health.md new file mode 100644 index 0000000..f0e002f --- /dev/null +++ b/docs/models/Health.md @@ -0,0 +1,15 @@ +# Health + +The current health status reported by the cluster. * **HEALTHY** Primary exists and number of replicas is equal to specified. * **UNHEALTHY** Primary does not exist or cluster doesn't have majority. * **DEGRADED** Primary exists and number of replicas is less than specified. * **UNKNOWN** The health status is unknown. + +## PossibleValues +|Value | +|------------ | +|HEALTHY | +|UNHEALTHY | +|DEGRADED | +|UNKNOWN | + + + + diff --git a/docs/models/Metadata.md b/docs/models/Metadata.md index 9c99f6f..1eb34c9 100644 --- a/docs/models/Metadata.md +++ b/docs/models/Metadata.md @@ -14,6 +14,7 @@ The metadata of the resource. |**LastModifiedBy** | Pointer to **string** | The last user who modified the resource. | [optional] | |**LastModifiedByUserId** | Pointer to **string** | The ID of the user who last modified the resource. | [optional] | |**State** | Pointer to [**State**](State.md) | | [optional] | +|**Health** | Pointer to [**Health**](Health.md) | | [optional] | ## Methods @@ -193,5 +194,30 @@ SetState sets State field to given value. HasState returns a boolean if a field has been set. +### GetHealth + +`func (o *Metadata) GetHealth() Health` + +GetHealth returns the Health field if non-nil, zero value otherwise. + +### GetHealthOk + +`func (o *Metadata) GetHealthOk() (*Health, bool)` + +GetHealthOk returns a tuple with the Health field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHealth + +`func (o *Metadata) SetHealth(v Health)` + +SetHealth sets Health field to given value. + +### HasHealth + +`func (o *Metadata) HasHealth() bool` + +HasHealth returns a boolean if a field has been set. + diff --git a/docs/models/SnapshotResponse.md b/docs/models/SnapshotResponse.md index 03f00cc..d1bc5df 100644 --- a/docs/models/SnapshotResponse.md +++ b/docs/models/SnapshotResponse.md @@ -1,6 +1,6 @@ # SnapshotResponse -A database snapshost. +A database snapshot. ## Properties diff --git a/docs/models/State.md b/docs/models/State.md index dfa89cc..679fcec 100644 --- a/docs/models/State.md +++ b/docs/models/State.md @@ -1,6 +1,6 @@ # State -The current status reported by the cluster. +The current status reported by the cluster. * **AVAILABLE** Resources for this cluster exist and are healthy. * **BUSY** Resources for this cluster are being created or updated. * **DESTROYING** Delete cluster command was issued, the cluster is being deleted. * **FAILED** Failed to get the cluster status. * **UNKNOWN** The state is unknown. ## PossibleValues |Value | diff --git a/docs/summary.md b/docs/summary.md index 5779852..a7258f0 100644 --- a/docs/summary.md +++ b/docs/summary.md @@ -30,6 +30,7 @@ * [DayOfTheWeek](models/DayOfTheWeek.md) * [ErrorMessage](models/ErrorMessage.md) * [ErrorResponse](models/ErrorResponse.md) +* [Health](models/Health.md) * [MaintenanceWindow](models/MaintenanceWindow.md) * [Metadata](models/Metadata.md) * [Pagination](models/Pagination.md) diff --git a/logger.go b/logger.go index ae6c8a1..a02e019 100644 --- a/logger.go +++ b/logger.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_api_version.go b/model_api_version.go index e817e94..1254b58 100644 --- a/model_api_version.go +++ b/model_api_version.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_list.go b/model_cluster_list.go index 49aff1e..d512f83 100644 --- a/model_cluster_list.go +++ b/model_cluster_list.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_list_all_of.go b/model_cluster_list_all_of.go index cca759f..41993b4 100644 --- a/model_cluster_list_all_of.go +++ b/model_cluster_list_all_of.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_logs.go b/model_cluster_logs.go index b14ebe3..1407320 100644 --- a/model_cluster_logs.go +++ b/model_cluster_logs.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_logs_instances.go b/model_cluster_logs_instances.go index 3d0c83e..3cf86c4 100644 --- a/model_cluster_logs_instances.go +++ b/model_cluster_logs_instances.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_logs_messages.go b/model_cluster_logs_messages.go index a366409..96cc89b 100644 --- a/model_cluster_logs_messages.go +++ b/model_cluster_logs_messages.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_properties.go b/model_cluster_properties.go index 71a89bf..51a78f2 100644 --- a/model_cluster_properties.go +++ b/model_cluster_properties.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_cluster_response.go b/model_cluster_response.go index 8f616eb..ba2b258 100644 --- a/model_cluster_response.go +++ b/model_cluster_response.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_connection.go b/model_connection.go index 6d8eeee..cb8ff90 100644 --- a/model_connection.go +++ b/model_connection.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_create_cluster_properties.go b/model_create_cluster_properties.go index d01813a..6a6d465 100644 --- a/model_create_cluster_properties.go +++ b/model_create_cluster_properties.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_create_cluster_request.go b/model_create_cluster_request.go index dbbd6ad..f6b139f 100644 --- a/model_create_cluster_request.go +++ b/model_create_cluster_request.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_create_restore_request.go b/model_create_restore_request.go index 617a725..6df8cca 100644 --- a/model_create_restore_request.go +++ b/model_create_restore_request.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_day_of_the_week.go b/model_day_of_the_week.go index e253dd0..423fa9a 100644 --- a/model_day_of_the_week.go +++ b/model_day_of_the_week.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,13 +20,13 @@ type DayOfTheWeek string // List of DayOfTheWeek const ( - SUNDAY DayOfTheWeek = "Sunday" - MONDAY DayOfTheWeek = "Monday" - TUESDAY DayOfTheWeek = "Tuesday" - WEDNESDAY DayOfTheWeek = "Wednesday" - THURSDAY DayOfTheWeek = "Thursday" - FRIDAY DayOfTheWeek = "Friday" - SATURDAY DayOfTheWeek = "Saturday" + DAYOFTHEWEEK_SUNDAY DayOfTheWeek = "Sunday" + DAYOFTHEWEEK_MONDAY DayOfTheWeek = "Monday" + DAYOFTHEWEEK_TUESDAY DayOfTheWeek = "Tuesday" + DAYOFTHEWEEK_WEDNESDAY DayOfTheWeek = "Wednesday" + DAYOFTHEWEEK_THURSDAY DayOfTheWeek = "Thursday" + DAYOFTHEWEEK_FRIDAY DayOfTheWeek = "Friday" + DAYOFTHEWEEK_SATURDAY DayOfTheWeek = "Saturday" ) func (v *DayOfTheWeek) UnmarshalJSON(src []byte) error { diff --git a/model_error_message.go b/model_error_message.go index a39809a..c4bb042 100644 --- a/model_error_message.go +++ b/model_error_message.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_error_response.go b/model_error_response.go index 8a43753..1c6d220 100644 --- a/model_error_response.go +++ b/model_error_response.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_health.go b/model_health.go new file mode 100644 index 0000000..34a8017 --- /dev/null +++ b/model_health.go @@ -0,0 +1,85 @@ +/* + * IONOS DBaaS MongoDB REST API + * + * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. + * + * API version: 1.0.0 + */ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package ionoscloud + +import ( + "encoding/json" + "fmt" +) + +// Health The current health status reported by the cluster. * **HEALTHY** Primary exists and number of replicas is equal to specified. * **UNHEALTHY** Primary does not exist or cluster doesn't have majority. * **DEGRADED** Primary exists and number of replicas is less than specified. * **UNKNOWN** The health status is unknown. +type Health string + +// List of Health +const ( + HEALTH_HEALTHY Health = "HEALTHY" + HEALTH_UNHEALTHY Health = "UNHEALTHY" + HEALTH_DEGRADED Health = "DEGRADED" + HEALTH_UNKNOWN Health = "UNKNOWN" +) + +func (v *Health) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := Health(value) + for _, existing := range []Health{"HEALTHY", "UNHEALTHY", "DEGRADED", "UNKNOWN"} { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid Health", value) +} + +// Ptr returns reference to Health value +func (v Health) Ptr() *Health { + return &v +} + +type NullableHealth struct { + value *Health + isSet bool +} + +func (v NullableHealth) Get() *Health { + return v.value +} + +func (v *NullableHealth) Set(val *Health) { + v.value = val + v.isSet = true +} + +func (v NullableHealth) IsSet() bool { + return v.isSet +} + +func (v *NullableHealth) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableHealth(val *Health) *NullableHealth { + return &NullableHealth{value: val, isSet: true} +} + +func (v NullableHealth) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableHealth) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/model_maintenance_window.go b/model_maintenance_window.go index eb77e8b..4a20f1c 100644 --- a/model_maintenance_window.go +++ b/model_maintenance_window.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_metadata.go b/model_metadata.go index 03c3dbc..130bc3e 100644 --- a/model_metadata.go +++ b/model_metadata.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -30,6 +30,7 @@ type Metadata struct { // The ID of the user who last modified the resource. LastModifiedByUserId *string `json:"lastModifiedByUserId,omitempty"` State *State `json:"state,omitempty"` + Health *Health `json:"health,omitempty"` } // NewMetadata instantiates a new Metadata object @@ -330,6 +331,44 @@ func (o *Metadata) HasState() bool { return false } +// GetHealth returns the Health field value +// If the value is explicit nil, the zero value for Health will be returned +func (o *Metadata) GetHealth() *Health { + if o == nil { + return nil + } + + return o.Health + +} + +// GetHealthOk returns a tuple with the Health field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *Metadata) GetHealthOk() (*Health, bool) { + if o == nil { + return nil, false + } + + return o.Health, true +} + +// SetHealth sets field value +func (o *Metadata) SetHealth(v Health) { + + o.Health = &v + +} + +// HasHealth returns a boolean if a field has been set. +func (o *Metadata) HasHealth() bool { + if o != nil && o.Health != nil { + return true + } + + return false +} + func (o Metadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CreatedDate != nil { @@ -360,6 +399,10 @@ func (o Metadata) MarshalJSON() ([]byte, error) { toSerialize["state"] = o.State } + if o.Health != nil { + toSerialize["health"] = o.Health + } + return json.Marshal(toSerialize) } diff --git a/model_pagination.go b/model_pagination.go index 1450879..cf22158 100644 --- a/model_pagination.go +++ b/model_pagination.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_pagination_links.go b/model_pagination_links.go index 1bafeff..8132302 100644 --- a/model_pagination_links.go +++ b/model_pagination_links.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_patch_cluster_properties.go b/model_patch_cluster_properties.go index 9350718..3c0f450 100644 --- a/model_patch_cluster_properties.go +++ b/model_patch_cluster_properties.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_patch_cluster_request.go b/model_patch_cluster_request.go index 32722ac..69ed2f5 100644 --- a/model_patch_cluster_request.go +++ b/model_patch_cluster_request.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_patch_user_properties.go b/model_patch_user_properties.go index 0479292..9193cbd 100644 --- a/model_patch_user_properties.go +++ b/model_patch_user_properties.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_patch_user_request.go b/model_patch_user_request.go index 0c760c4..6d585fe 100644 --- a/model_patch_user_request.go +++ b/model_patch_user_request.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_resource_type.go b/model_resource_type.go index 35fa09d..cce9d2d 100644 --- a/model_resource_type.go +++ b/model_resource_type.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -20,10 +20,10 @@ type ResourceType string // List of ResourceType const ( - COLLECTION ResourceType = "collection" - CLUSTER ResourceType = "cluster" - USER ResourceType = "user" - SNAPSHOT ResourceType = "snapshot" + RESOURCETYPE_COLLECTION ResourceType = "collection" + RESOURCETYPE_CLUSTER ResourceType = "cluster" + RESOURCETYPE_USER ResourceType = "user" + RESOURCETYPE_SNAPSHOT ResourceType = "snapshot" ) func (v *ResourceType) UnmarshalJSON(src []byte) error { diff --git a/model_snapshot_list.go b/model_snapshot_list.go index 75fa7dd..4299a2f 100644 --- a/model_snapshot_list.go +++ b/model_snapshot_list.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_snapshot_list_all_of.go b/model_snapshot_list_all_of.go index 65ff5da..ac6c7d0 100644 --- a/model_snapshot_list_all_of.go +++ b/model_snapshot_list_all_of.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_snapshot_properties.go b/model_snapshot_properties.go index ec07325..e199613 100644 --- a/model_snapshot_properties.go +++ b/model_snapshot_properties.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_snapshot_response.go b/model_snapshot_response.go index 96c5216..439904f 100644 --- a/model_snapshot_response.go +++ b/model_snapshot_response.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -14,7 +14,7 @@ import ( "encoding/json" ) -// SnapshotResponse A database snapshost. +// SnapshotResponse A database snapshot. type SnapshotResponse struct { Type *ResourceType `json:"type,omitempty"` // The unique ID of the resource. diff --git a/model_state.go b/model_state.go index 93ed642..3ab3e88 100644 --- a/model_state.go +++ b/model_state.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. @@ -15,16 +15,16 @@ import ( "fmt" ) -// State The current status reported by the cluster. +// State The current status reported by the cluster. * **AVAILABLE** Resources for this cluster exist and are healthy. * **BUSY** Resources for this cluster are being created or updated. * **DESTROYING** Delete cluster command was issued, the cluster is being deleted. * **FAILED** Failed to get the cluster status. * **UNKNOWN** The state is unknown. type State string // List of State const ( - AVAILABLE State = "AVAILABLE" - BUSY State = "BUSY" - DESTROYING State = "DESTROYING" - FAILED State = "FAILED" - UNKNOWN State = "UNKNOWN" + STATE_AVAILABLE State = "AVAILABLE" + STATE_BUSY State = "BUSY" + STATE_DESTROYING State = "DESTROYING" + STATE_FAILED State = "FAILED" + STATE_UNKNOWN State = "UNKNOWN" ) func (v *State) UnmarshalJSON(src []byte) error { diff --git a/model_template_list.go b/model_template_list.go index 0ea5a34..4cb7b85 100644 --- a/model_template_list.go +++ b/model_template_list.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_template_list_all_of.go b/model_template_list_all_of.go index fa7c61d..fc204ea 100644 --- a/model_template_list_all_of.go +++ b/model_template_list_all_of.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_template_response.go b/model_template_response.go index 624d2a1..e33244f 100644 --- a/model_template_response.go +++ b/model_template_response.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_user.go b/model_user.go index b2c53b8..5a6bce5 100644 --- a/model_user.go +++ b/model_user.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_user_metadata.go b/model_user_metadata.go index 26bfaab..0014577 100644 --- a/model_user_metadata.go +++ b/model_user_metadata.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_user_properties.go b/model_user_properties.go index e9014b9..7f7b526 100644 --- a/model_user_properties.go +++ b/model_user_properties.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_user_roles.go b/model_user_roles.go index ce2baf0..d6c1916 100644 --- a/model_user_roles.go +++ b/model_user_roles.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/model_users_list.go b/model_users_list.go index 55881d5..a95160e 100644 --- a/model_users_list.go +++ b/model_users_list.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/response.go b/response.go index fd782bc..da7c155 100644 --- a/response.go +++ b/response.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. diff --git a/utils.go b/utils.go index 9ea2122..d2ded3d 100644 --- a/utils.go +++ b/utils.go @@ -3,7 +3,7 @@ * * With IONOS Cloud Database as a Service, you have the ability to quickly set up and manage a MongoDB database. You can also delete clusters, manage backups and users via the API. MongoDB is an open source, cross-platform, document-oriented database program. Classified as a NoSQL database program, it uses JSON-like documents with optional schemas. The MongoDB API allows you to create additional database clusters or modify existing ones. Both tools, the Data Center Designer (DCD) and the API use the same concepts consistently and are well suited for smooth and intuitive use. * - * API version: 0.1.0 + * API version: 1.0.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.