diff --git a/api/openapi.yaml b/api/openapi.yaml deleted file mode 100644 index ffc8cb7..0000000 --- a/api/openapi.yaml +++ /dev/null @@ -1,1834 +0,0 @@ -openapi: 3.0.3 -info: - description: "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. \n\nMongoDB is an open source, cross-platform, document-oriented\ - \ database program. Classified as a NoSQL database program, it uses JSON-like\ - \ documents with optional schemas.\n\nThe 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.\n" - title: IONOS DBaaS MongoDB REST API - version: 1.0.0 -servers: -- description: Production - url: https://api.ionos.com/databases/mongodb -security: -- basicAuth: [] -- tokenAuth: [] -tags: -- description: A cluster in this context describes a grouping of multiple MongoDB - instances into a replica set. **Note** that we do not yet support sharded clusters. - name: Clusters -- description: Metadata about the API, such as versions. - name: Metadata -paths: - /clusters: - get: - description: Retrieves a list of MongoDB clusters. - operationId: clustersGet - parameters: - - description: | - Response filter to list only the MongoDB clusters that contain - the specified name. The value is case insensitive and matched on the - 'displayName' field. - explode: true - in: query - name: filter.name - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterList' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get Clusters - tags: - - Clusters - post: - description: | - Creates a new MongoDB cluster. - operationId: clustersPost - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateClusterRequest' - description: The cluster to be created. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterResponse' - description: | - The created cluster is returned and is automatically set to `state = BUSY`. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Create a Cluster - tags: - - Clusters - /clusters/{clusterId}: - delete: - description: Deletes a MongoDB cluster. - operationId: clustersDelete - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterResponse' - description: | - The cluster to be deleted is automatically set to `state = DESTROYING`. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Delete a Cluster - tags: - - Clusters - get: - description: Get a cluster by id. - operationId: clustersFindById - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterResponse' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get a cluster by id - tags: - - Clusters - patch: - description: Patch attributes of a MongoDB cluster. - operationId: clustersPatch - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchClusterRequest' - description: Part of the cluster which should be modified. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterResponse' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Patch a cluster - tags: - - Clusters - /clusters/{clusterId}/users: - get: - description: Retrieves a list of MongoDB users. - operationId: clustersUsersGet - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/UsersList' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get all Cluster Users - tags: - - Users - post: - description: | - Creates a MongoDB user. - operationId: clustersUsersPost - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: The user to be created. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: | - The created user is returned with metadata indicating when the user was created and by whom. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Create MongoDB User - tags: - - Users - /clusters/{clusterId}/users/{username}: - delete: - description: Deletes a MongoDB user specified by its ID. - operationId: clustersUsersDelete - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - - description: The authentication username. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: | - The user identified by the username and database parameters will be deleted from the cluster. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Delete a MongoDB User by ID - tags: - - Users - get: - description: Retrieves the MongoDB user identified by the username. - operationId: clustersUsersFindById - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - - description: The authentication username. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: | - The user identified by the username and database parameters is returned. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get a MongoDB User by ID - tags: - - Users - patch: - description: Patches a MongoDB user specified by its ID. - operationId: clustersUsersPatch - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - - description: The authentication username. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PatchUserRequest' - description: Part of the MongoDB user which should be modified. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/User' - description: | - The user identified by the username and database parameters will be patched. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Patch a MongoDB User by ID - tags: - - Users - /clusters/{clusterId}/logs: - get: - description: Retrieves MongoDB logs based on the given parameters. - operationId: clustersLogsGet - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - - description: The start time for the query in RFC3339 format. Must not be more - than 30 days ago but before the end parameter. The default is 30 days ago. - explode: true - in: query - name: start - required: false - schema: - format: date-time - type: string - style: form - - description: The end time for the query in RFC3339 format. Must not be greater - than now. The default is the current timestamp. - explode: true - in: query - name: end - required: false - schema: - format: date-time - type: string - style: form - - description: The direction in which to scan through the logs. The logs are - returned in order of the direction. - explode: true - in: query - name: direction - required: false - schema: - default: BACKWARD - enum: - - BACKWARD - - FORWARD - type: string - style: form - - description: The maximal number of log lines to return. If the limit is reached - then log lines will be cut at the end (respecting the scan direction). - explode: true - in: query - name: limit - required: false - schema: - default: 100 - maximum: 5000 - minimum: 1 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ClusterLogs' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get logs of your cluster - tags: - - Logs - /clusters/{clusterId}/snapshots: - get: - description: Retrieves MongoDB snapshots. - operationId: clustersSnapshotsGet - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/SnapshotList' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get the snapshots of your cluster - tags: - - Snapshots - /clusters/{clusterId}/restore: - post: - description: Triggers an in-place restore of the given MongoDB cluster. - operationId: clustersRestorePost - parameters: - - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateRestoreRequest' - description: The restore request to create. - required: true - responses: - "202": - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: In-place restore of a cluster - tags: - - Restores - /templates: - get: - description: | - Retrieves a list of valid templates. These templates can be used to create MongoDB clusters; they contain properties, such as number of cores, RAM, and the storage size. - operationId: templatesGet - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/TemplateList' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get Templates - tags: - - Templates - /infos/version: - get: - description: Retrieves the current version of the responding API. - operationId: infosVersionGet - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/APIVersion' - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get API Version - tags: - - Metadata - /infos/versions: - get: - description: Retrieves all available versions of the responding API. - operationId: infosVersionsGet - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/APIVersion' - type: array - description: Successful operation. - default: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - security: - - basicAuth: [] - - tokenAuth: [] - summary: Get All API Versions - tags: - - Metadata -components: - parameters: - ClusterNameQuery: - description: | - Response filter to list only the MongoDB clusters that contain - the specified name. The value is case insensitive and matched on the - 'displayName' field. - explode: true - in: query - name: filter.name - required: false - schema: - type: string - style: form - ClusterIdPath: - description: The unique ID of the cluster. - explode: false - in: path - name: clusterId - required: true - schema: - type: string - style: simple - UsernamePath: - description: The authentication username. - explode: false - in: path - name: username - required: true - schema: - type: string - style: simple - responses: - ApiError: - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - description: | - Any erroneous status code: 400 (parse error), 401 (auth error), - 402 (trial access), 403 (insufficient permissions), 404 (not found), - 405 (unsupported HTTP method), 415 (unsupported content type), - 422 (validation error), 429 (request rate limit exceeded), - 500 (server error), 503 (maintenance) - headers: - Content-Type: - description: The content type of the response. - explode: false - schema: - default: application/problem+json - type: string - style: simple - schemas: - ErrorResponse: - properties: - httpStatus: - description: The HTTP status code of the operation. - example: 400 - type: integer - messages: - items: - $ref: '#/components/schemas/ErrorMessage' - type: array - type: object - ErrorMessage: - properties: - errorCode: - description: | - Application internal error code. - example: dbaas-err-api-123 - type: string - message: - description: | - A human readable explanation specific to this occurrence of the - problem. - example: Error message example - type: string - type: object - APIVersion: - example: - name: v2.1 - swaggerUrl: https://api.ionos.com/databases/mongodb/infos/assets/swagger-v2.1.yml - properties: - name: - example: v2.1 - type: string - swaggerUrl: - example: https://api.ionos.com/databases/mongodb/infos/assets/swagger-v2.1.yml - type: string - type: object - UsersList: - description: List of cluster users. - example: - id: 498ae72f-411f-11eb-9d07-046c59cc737e - items: - - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - createdBy: john.doe@example.com - state: CREATING - properties: - password: password - roles: - - database: database - role: read - - database: database - role: read - username: username - - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - createdBy: john.doe@example.com - state: CREATING - properties: - password: password - roles: - - database: database - role: read - - database: database - role: read - username: username - properties: - type: - $ref: '#/components/schemas/ResourceType' - id: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - items: - items: - $ref: '#/components/schemas/User' - type: array - type: object - UserProperties: - description: Mongodb user properties. - example: - password: password - roles: - - database: database - role: read - - database: database - role: read - username: username - properties: - username: - type: string - password: - minLength: 10 - type: string - writeOnly: true - roles: - items: - $ref: '#/components/schemas/UserRoles' - type: array - required: - - password - - username - User: - description: MongoDB database user. - example: - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - createdBy: john.doe@example.com - state: CREATING - properties: - password: password - roles: - - database: database - role: read - - database: database - role: read - username: username - properties: - type: - $ref: '#/components/schemas/ResourceType' - metadata: - $ref: '#/components/schemas/UserMetadata' - properties: - $ref: '#/components/schemas/UserProperties' - type: object - PatchUserRequest: - description: MongoDB database user patch request. - example: - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - createdBy: john.doe@example.com - state: CREATING - properties: - password: password - roles: - - database: database - role: read - - database: database - role: read - properties: - metadata: - $ref: '#/components/schemas/UserMetadata' - properties: - $ref: '#/components/schemas/PatchUserProperties' - PatchUserProperties: - description: MongoDB database user patch request properties. - example: - password: password - roles: - - database: database - role: read - - database: database - role: read - properties: - password: - minLength: 10 - type: string - writeOnly: true - roles: - items: - $ref: '#/components/schemas/UserRoles' - type: array - UserRoles: - description: a list of mongodb user role. - example: - database: database - role: read - properties: - role: - enum: - - read - - readWrite - - dbAdmin - - clusterMonitor - - readAnyDatabase - - readWriteAnyDatabase - - dbAdminAnyDatabase - example: read - type: string - database: - type: string - type: object - SnapshotList: - allOf: - - $ref: '#/components/schemas/SnapshotList_allOf' - - $ref: '#/components/schemas/Pagination' - description: List of snapshots. - type: object - SnapshotResponse: - description: A database snapshot. - properties: - type: - $ref: '#/components/schemas/ResourceType' - id: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - properties: - $ref: '#/components/schemas/SnapshotProperties' - type: object - SnapshotProperties: - description: Properties of a snapshot. - properties: - version: - description: The MongoDB version this backup was created from. - example: "5.0" - type: string - size: - description: The size of the snapshot in Mebibytes. - example: 150 - type: integer - creationTime: - description: The date the resource was created. - example: 2020-12-10T13:37:50+01:00 - format: date-time - type: string - type: object - CreateRestoreRequest: - description: The restore request. - example: - snapshotId: dcd31531-3ac8-11eb-9feb-046c59cc737e - properties: - snapshotId: - description: The unique ID of the snapshot you want to restore. - example: dcd31531-3ac8-11eb-9feb-046c59cc737e - type: string - required: - - snapshotId - type: object - ClusterList: - allOf: - - $ref: '#/components/schemas/ClusterList_allOf' - - $ref: '#/components/schemas/Pagination' - description: List of clusters. - type: object - ClusterResponse: - description: A database cluster. - example: - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - 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 - properties: - maintenanceWindow: - dayOfTheWeek: Monday - time: 16:30:59 - connectionString: mongo+srv://m-498ae72f-411f-11eb-9d07-046c59cc737e.mongodb.de-txl.ionos.com - instances: 3 - displayName: MongoDB cluster - location: de/txl - templateID: 498ae72f-411f-11eb-9d07-046c59cc737e - mongoDBVersion: "5.0" - connections: - - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - type: - $ref: '#/components/schemas/ResourceType' - id: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - metadata: - $ref: '#/components/schemas/Metadata' - properties: - $ref: '#/components/schemas/ClusterProperties' - type: object - ResourceType: - description: The resource type. - enum: - - collection - - cluster - - user - - snapshot - type: string - ResourceId: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - ClusterProperties: - description: Properties of a database cluster. - example: - maintenanceWindow: - dayOfTheWeek: Monday - time: 16:30:59 - connectionString: mongo+srv://m-498ae72f-411f-11eb-9d07-046c59cc737e.mongodb.de-txl.ionos.com - instances: 3 - displayName: MongoDB cluster - location: de/txl - templateID: 498ae72f-411f-11eb-9d07-046c59cc737e - mongoDBVersion: "5.0" - connections: - - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - displayName: - description: The name of your cluster. - example: MongoDB cluster - type: string - mongoDBVersion: - description: The MongoDB version of your cluster. - example: "5.0" - type: string - x-extensible-enum: - - "5.0" - - "6.0" - 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. - example: de/txl - type: string - x-extensible-enum: - - de/fra - - 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 - connections: - items: - $ref: '#/components/schemas/Connection' - maxItems: 1 - minItems: 1 - type: array - maintenanceWindow: - $ref: '#/components/schemas/MaintenanceWindow' - templateID: - description: | - The unique ID of the template, which specifies the number of cores, storage size, and memory. - You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). - To get a list of all templates to confirm the changes use the /templates endpoint. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - connectionString: - description: The connection string for your cluster. - example: mongo+srv://m-498ae72f-411f-11eb-9d07-046c59cc737e.mongodb.de-txl.ionos.com - type: string - type: object - Pagination: - properties: - offset: - description: | - The offset specified in the request (if none was specified, the default - offset is 0) (not implemented yet). - example: 0 - minimum: 0 - readOnly: true - type: integer - limit: - description: | - The limit specified in the request (if none was specified, use the - endpoint's default pagination limit) (not implemented yet, always return - number of items). - example: 42 - minimum: 0 - readOnly: true - type: integer - _links: - $ref: '#/components/schemas/PaginationLinks' - type: object - PaginationOffset: - description: | - The offset specified in the request (if none was specified, the default - offset is 0) (not implemented yet). - example: 0 - minimum: 0 - readOnly: true - type: integer - PaginationLimit: - description: | - The limit specified in the request (if none was specified, use the - endpoint's default pagination limit) (not implemented yet, always return - number of items). - example: 42 - minimum: 0 - readOnly: true - type: integer - PaginationLinks: - description: | - The URLs to navigate the different pages. As of now we always only return a - single page. - properties: - prev: - description: | - The URL (with offset and limit parameters) of the previous page; only - present if the offset is greater than 0. - example: - format: uri - readOnly: true - type: string - self: - description: | - The URL (with offset and limit parameters) of the current page. - example: - format: uri - readOnly: true - type: string - next: - description: | - The URL (with offset and limit parameters) of the next page; only - present if the offset and limit is less than the total number of elements. - example: - format: uri - readOnly: true - type: string - type: object - CreateClusterRequest: - description: | - The request payload with all data needed to create a new MongoDB cluster. - example: - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - 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: - maintenanceWindow: - dayOfTheWeek: Monday - time: 16:30:59 - instances: 3 - displayName: MongoDB cluster - location: de/txl - templateID: 498ae72f-411f-11eb-9d07-046c59cc737e - mongoDBVersion: "5.0" - connections: - - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - metadata: - $ref: '#/components/schemas/Metadata' - properties: - $ref: '#/components/schemas/CreateClusterProperties' - type: object - UserMetadata: - description: The metadata of the resource. - example: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - createdBy: john.doe@example.com - state: CREATING - properties: - createdDate: - description: The date the resource was created. - example: 2020-12-10T13:37:50+01:00 - format: date-time - type: string - createdBy: - description: The user who created the resource. - example: john.doe@example.com - type: string - createdByUserId: - description: The ID of the user who created the resource. - example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - type: string - state: - description: The user state. - enum: - - AVAILABLE - - CREATING - - DESTROYING - example: CREATING - type: string - Metadata: - description: The metadata of the resource. - example: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - 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: - createdDate: - description: The date the resource was created. - example: 2020-12-10T13:37:50+01:00 - format: date-time - type: string - createdBy: - description: The user who created the resource. - example: john.doe@example.com - type: string - createdByUserId: - description: The ID of the user who created the resource. - example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - type: string - lastModifiedDate: - description: The date the resource was last modified. - example: 2020-12-11T13:37:50+01:00 - format: date-time - type: string - lastModifiedBy: - description: The last user who modified the resource. - example: jane.doe@example.com - type: string - lastModifiedByUserId: - description: The ID of the user who last modified the resource. - example: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - type: string - state: - $ref: '#/components/schemas/State' - health: - $ref: '#/components/schemas/Health' - State: - 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 - - DESTROYING - - FAILED - - 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. - example: - maintenanceWindow: - dayOfTheWeek: Monday - time: 16:30:59 - instances: 3 - displayName: MongoDB cluster - location: de/txl - templateID: 498ae72f-411f-11eb-9d07-046c59cc737e - mongoDBVersion: "5.0" - connections: - - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - templateID: - description: | - The unique ID of the template, which specifies the number of cores, storage size, and memory. - You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). - To get a list of all templates to confirm the changes use the /templates endpoint. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - mongoDBVersion: - description: The MongoDB version of your cluster. - example: "5.0" - type: string - x-extensible-enum: - - "5.0" - - "6.0" - 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 - connections: - items: - $ref: '#/components/schemas/Connection' - maxItems: 1 - minItems: 1 - type: array - 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. - example: de/txl - type: string - x-extensible-enum: - - de/fra - - de/txl - - gb/lhr - - es/vit - - us/ewr - - fr/par - displayName: - description: The name of your cluster. - example: MongoDB cluster - type: string - maintenanceWindow: - $ref: '#/components/schemas/MaintenanceWindow' - required: - - connections - - displayName - - instances - - location - - mongodbVersion - - templateID - type: object - PatchClusterRequest: - description: Request payload to change a cluster. - example: - metadata: - createdByUserId: 87f9a82e-b28d-49ed-9d04-fba2c0459cd3 - createdDate: 2020-12-10T13:37:50+01:00 - 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: - maintenanceWindow: - dayOfTheWeek: Monday - time: 16:30:59 - instances: 3 - displayName: MongoDB cluster - templateID: 498ae72f-411f-11eb-9d07-046c59cc737e - connections: - - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - metadata: - $ref: '#/components/schemas/Metadata' - properties: - $ref: '#/components/schemas/PatchClusterProperties' - type: object - PatchClusterProperties: - description: Properties of the payload to change a cluster. - example: - maintenanceWindow: - dayOfTheWeek: Monday - time: 16:30:59 - instances: 3 - displayName: MongoDB cluster - templateID: 498ae72f-411f-11eb-9d07-046c59cc737e - connections: - - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - displayName: - description: The name of your cluster. - example: MongoDB cluster - type: string - maintenanceWindow: - $ref: '#/components/schemas/MaintenanceWindow' - 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 - connections: - items: - $ref: '#/components/schemas/Connection' - maxItems: 1 - minItems: 0 - type: array - templateID: - description: | - The unique ID of the template, which specifies the number of cores, storage size, and memory. - You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). - To get a list of all templates to confirm the changes use the /templates endpoint. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - type: object - TemplateID: - description: | - The unique ID of the template, which specifies the number of cores, storage size, and memory. - You cannot downgrade to a smaller template or minor edition (e.g. from business to playground). - To get a list of all templates to confirm the changes use the /templates endpoint. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - ClusterLogs: - description: The logs of the MongoDB cluster. - example: - instances: - - name: mongodb-cluster-0 - messages: - - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - - name: mongodb-cluster-0 - messages: - - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - properties: - instances: - items: - $ref: '#/components/schemas/ClusterLogs_instances' - type: array - type: object - MongoDBVersion: - description: The MongoDB version of your cluster. - example: "5.0" - type: string - x-extensible-enum: - - "5.0" - - "6.0" - ConnectionString: - description: The connection string for your cluster. - example: mongo+srv://m-498ae72f-411f-11eb-9d07-046c59cc737e.mongodb.de-txl.ionos.com - type: string - 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 - 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. - example: de/txl - type: string - x-extensible-enum: - - de/fra - - de/txl - - gb/lhr - - es/vit - - us/ewr - - fr/par - Connection: - description: The network connection details for your cluster. - example: - cidrList: - - 192.168.1.100/24 - - 192.168.1.101/24 - datacenterId: 5a029f4a-72e5-11ec-90d6-0242ac120003 - lanId: "2" - properties: - datacenterId: - description: The datacenter to which your cluster will be connected. - example: 5a029f4a-72e5-11ec-90d6-0242ac120003 - type: string - lanId: - description: The numeric LAN ID with which you connect your cluster. - example: "2" - type: string - cidrList: - description: | - The list of IPs for your cluster. - All IPs must be in a /24 network. - Note the following unavailable IP ranges: - 10.233.114.0/24 - example: - - 192.168.1.100/24 - - 192.168.1.101/24 - items: - type: string - type: array - required: - - cidrList - - datacenterId - - lanId - type: object - DisplayName: - description: The name of your cluster. - example: MongoDB cluster - type: string - MaintenanceWindow: - description: | - A weekly window of 4 hours during which maintenance work can be performed. - example: - dayOfTheWeek: Monday - time: 16:30:59 - properties: - time: - example: 16:30:59 - type: string - dayOfTheWeek: - $ref: '#/components/schemas/DayOfTheWeek' - required: - - dayOfTheWeek - - time - type: object - DayOfTheWeek: - description: The week day. - enum: - - Sunday - - Monday - - Tuesday - - Wednesday - - Thursday - - Friday - - Saturday - example: Monday - type: string - TemplateList: - allOf: - - $ref: '#/components/schemas/TemplateList_allOf' - - $ref: '#/components/schemas/Pagination' - description: The list of MongoDB templates. - type: object - TemplateResponse: - description: A MongoDB template item. - properties: - id: - description: The unique template ID. - example: 15c6dd2f-02d2-4987-b439-9a58dd59ecc3 - type: string - name: - description: The name of the template. - example: MongoDB Community 4XL - type: string - edition: - description: The edition of the template (e.g. enterprise) - example: enterprise - type: string - cores: - description: The number of CPU cores. - example: 1 - type: integer - ram: - description: The amount of memory in GB. - example: 4 - type: integer - storageSize: - description: The amount of storage size in GB. - example: 30 - type: integer - SnapshotList_allOf: - properties: - type: - $ref: '#/components/schemas/ResourceType' - id: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - items: - items: - $ref: '#/components/schemas/SnapshotResponse' - type: array - type: object - ClusterList_allOf: - properties: - type: - $ref: '#/components/schemas/ResourceType' - id: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - items: - items: - $ref: '#/components/schemas/ClusterResponse' - type: array - type: object - ClusterLogs_messages: - example: - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - properties: - time: - example: 2021-09-06T10:00:38.253+02:00 - format: date-time - type: string - message: - example: Hello World - type: string - type: object - ClusterLogs_instances: - example: - name: mongodb-cluster-0 - messages: - - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - - time: 2021-09-06T10:00:38.253+02:00 - message: Hello World - properties: - name: - description: The name of the MongoDB instance. - example: mongodb-cluster-0 - type: string - messages: - items: - $ref: '#/components/schemas/ClusterLogs_messages' - type: array - type: object - TemplateList_allOf: - properties: - type: - $ref: '#/components/schemas/ResourceType' - id: - description: The unique ID of the resource. - example: 498ae72f-411f-11eb-9d07-046c59cc737e - type: string - items: - items: - $ref: '#/components/schemas/TemplateResponse' - type: array - type: object - securitySchemes: - basicAuth: - description: | - For 'Basic' authentication, take your credentials by first combining the username and password with a colon (``username:password``) and then encoding the resulting string in base64 (``YWxhZGRpbjpvcGVuc2VzYW1l``). - - **Example Request Header** - - ``Authorization: Basic YWxhZGRpbjpvcGVuc2Vzl`` - - More details: https://en.wikipedia.org/wiki/Basic_access_authentication - scheme: basic - type: http - tokenAuth: - description: | - Authorization is granted when a valid proof of identity is provided along with an API request for data. This proof of identity is in the form of a JSON web access token, a unique string that identifies a user. - - **Example Request Header** - - ``Authorization: Bearer ACCESS_TOKEN`` - in: header - name: Authorization - type: apiKey diff --git a/api_clusters.go b/api_clusters.go index c225914..30d06bb 100644 --- a/api_clusters.go +++ b/api_clusters.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -302,9 +302,19 @@ func (a *ClustersApiService) ClustersFindByIdExecute(r ApiClustersFindByIdReques type ApiClustersGetRequest struct { ctx _context.Context ApiService *ClustersApiService + limit *int32 + offset *int32 filterName *string } +func (r ApiClustersGetRequest) Limit(limit int32) ApiClustersGetRequest { + r.limit = &limit + return r +} +func (r ApiClustersGetRequest) Offset(offset int32) ApiClustersGetRequest { + r.offset = &offset + return r +} func (r ApiClustersGetRequest) FilterName(filterName string) ApiClustersGetRequest { r.filterName = &filterName return r @@ -352,6 +362,12 @@ func (a *ClustersApiService) ClustersGetExecute(r ApiClustersGetRequest) (Cluste localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } if r.filterName != nil { localVarQueryParams.Add("filter.name", parameterToString(*r.filterName, "")) } diff --git a/api_logs.go b/api_logs.go index 8a16d36..0845c73 100644 --- a/api_logs.go +++ b/api_logs.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/api_metadata.go b/api_metadata.go index 32f7b4b..889837d 100644 --- a/api_metadata.go +++ b/api_metadata.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/api_restores.go b/api_restores.go index 7e42039..8c152ab 100644 --- a/api_restores.go +++ b/api_restores.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/api_snapshots.go b/api_snapshots.go index e45d199..928aeff 100644 --- a/api_snapshots.go +++ b/api_snapshots.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -31,6 +31,17 @@ type ApiClustersSnapshotsGetRequest struct { ctx _context.Context ApiService *SnapshotsApiService clusterId string + limit *int32 + offset *int32 +} + +func (r ApiClustersSnapshotsGetRequest) Limit(limit int32) ApiClustersSnapshotsGetRequest { + r.limit = &limit + return r +} +func (r ApiClustersSnapshotsGetRequest) Offset(offset int32) ApiClustersSnapshotsGetRequest { + r.offset = &offset + return r } func (r ApiClustersSnapshotsGetRequest) Execute() (SnapshotList, *APIResponse, error) { @@ -78,6 +89,12 @@ func (a *SnapshotsApiService) ClustersSnapshotsGetExecute(r ApiClustersSnapshots localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api_templates.go b/api_templates.go index d50b745..24c8b63 100644 --- a/api_templates.go +++ b/api_templates.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -29,6 +29,17 @@ type TemplatesApiService service type ApiTemplatesGetRequest struct { ctx _context.Context ApiService *TemplatesApiService + limit *int32 + offset *int32 +} + +func (r ApiTemplatesGetRequest) Limit(limit int32) ApiTemplatesGetRequest { + r.limit = &limit + return r +} +func (r ApiTemplatesGetRequest) Offset(offset int32) ApiTemplatesGetRequest { + r.offset = &offset + return r } func (r ApiTemplatesGetRequest) Execute() (TemplateList, *APIResponse, error) { @@ -74,6 +85,12 @@ func (a *TemplatesApiService) TemplatesGetExecute(r ApiTemplatesGetRequest) (Tem localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/api_users.go b/api_users.go index d86ab69..2dbf84b 100644 --- a/api_users.go +++ b/api_users.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -311,6 +311,17 @@ type ApiClustersUsersGetRequest struct { ctx _context.Context ApiService *UsersApiService clusterId string + limit *int32 + offset *int32 +} + +func (r ApiClustersUsersGetRequest) Limit(limit int32) ApiClustersUsersGetRequest { + r.limit = &limit + return r +} +func (r ApiClustersUsersGetRequest) Offset(offset int32) ApiClustersUsersGetRequest { + r.offset = &offset + return r } func (r ApiClustersUsersGetRequest) Execute() (UsersList, *APIResponse, error) { @@ -358,6 +369,12 @@ func (a *UsersApiService) ClustersUsersGetExecute(r ApiClustersUsersGetRequest) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.limit != nil { + localVarQueryParams.Add("limit", parameterToString(*r.limit, "")) + } + if r.offset != nil { + localVarQueryParams.Add("offset", parameterToString(*r.offset, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} diff --git a/client.go b/client.go index f835686..40fc666 100644 --- a/client.go +++ b/client.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -50,7 +50,7 @@ const ( RequestStatusFailed = "FAILED" RequestStatusDone = "DONE" - Version = "1.2.0" + Version = "1.2.1" ) // APIClient manages communication with the IONOS DBaaS MongoDB REST API API v1.0.0 diff --git a/configuration.go b/configuration.go index 9e30582..dfd2a5b 100644 --- a/configuration.go +++ b/configuration.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -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.2.0", + UserAgent: "ionos-cloud-sdk-go-dbaas-mongo/v1.2.1", Debug: false, Username: username, Password: password, diff --git a/docs/api/ClustersApi.md b/docs/api/ClustersApi.md index 1245184..5c2e0a4 100644 --- a/docs/api/ClustersApi.md +++ b/docs/api/ClustersApi.md @@ -69,7 +69,7 @@ Other parameters are passed through a pointer to an apiClustersDeleteRequest str ### Return type -[**ClusterResponse**](ClusterResponse.md) +[**ClusterResponse**](../models/ClusterResponse.md) ### HTTP request headers @@ -135,7 +135,7 @@ Other parameters are passed through a pointer to an apiClustersFindByIdRequest s ### Return type -[**ClusterResponse**](ClusterResponse.md) +[**ClusterResponse**](../models/ClusterResponse.md) ### HTTP request headers @@ -148,6 +148,8 @@ Other parameters are passed through a pointer to an apiClustersFindByIdRequest s ```go var result ClusterList = ClustersGet(ctx) + .Limit(limit) + .Offset(offset) .FilterName(filterName) .Execute() ``` @@ -170,11 +172,13 @@ import ( ) func main() { + limit := int32(100) // int32 | The maximum number of elements to return. Use together with 'offset' for pagination. (optional) (default to 100) + offset := int32(200) // int32 | The first element to return. Use together with 'limit' for pagination. (optional) (default to 0) filterName := "filterName_example" // string | Response filter to list only the MongoDB clusters that contain the specified name. The value is case insensitive and matched on the 'displayName' field. (optional) configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.ClustersApi.ClustersGet(context.Background()).FilterName(filterName).Execute() + resource, resp, err := apiClient.ClustersApi.ClustersGet(context.Background()).Limit(limit).Offset(offset).FilterName(filterName).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `ClustersApi.ClustersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -195,11 +199,13 @@ Other parameters are passed through a pointer to an apiClustersGetRequest struct |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| +| **limit** | **int32** | The maximum number of elements to return. Use together with 'offset' for pagination. | [default to 100]| +| **offset** | **int32** | The first element to return. Use together with 'limit' for pagination. | [default to 0]| | **filterName** | **string** | Response filter to list only the MongoDB clusters that contain the specified name. The value is case insensitive and matched on the 'displayName' field. | | ### Return type -[**ClusterList**](ClusterList.md) +[**ClusterList**](../models/ClusterList.md) ### HTTP request headers @@ -264,11 +270,11 @@ Other parameters are passed through a pointer to an apiClustersPatchRequest stru |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **patchClusterRequest** | [**PatchClusterRequest**](PatchClusterRequest.md) | Part of the cluster which should be modified. | | +| **patchClusterRequest** | [**PatchClusterRequest**](../models/PatchClusterRequest.md) | Part of the cluster which should be modified. | | ### Return type -[**ClusterResponse**](ClusterResponse.md) +[**ClusterResponse**](../models/ClusterResponse.md) ### HTTP request headers @@ -328,11 +334,11 @@ Other parameters are passed through a pointer to an apiClustersPostRequest struc |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **createClusterRequest** | [**CreateClusterRequest**](CreateClusterRequest.md) | The cluster to be created. | | +| **createClusterRequest** | [**CreateClusterRequest**](../models/CreateClusterRequest.md) | The cluster to be created. | | ### Return type -[**ClusterResponse**](ClusterResponse.md) +[**ClusterResponse**](../models/ClusterResponse.md) ### HTTP request headers diff --git a/docs/api/LogsApi.md b/docs/api/LogsApi.md index 4e3a527..5e9e38f 100644 --- a/docs/api/LogsApi.md +++ b/docs/api/LogsApi.md @@ -77,7 +77,7 @@ Other parameters are passed through a pointer to an apiClustersLogsGetRequest st ### Return type -[**ClusterLogs**](ClusterLogs.md) +[**ClusterLogs**](../models/ClusterLogs.md) ### HTTP request headers diff --git a/docs/api/MetadataApi.md b/docs/api/MetadataApi.md index 7bd539b..2851bda 100644 --- a/docs/api/MetadataApi.md +++ b/docs/api/MetadataApi.md @@ -58,7 +58,7 @@ Other parameters are passed through a pointer to an apiInfosVersionGetRequest st ### Return type -[**APIVersion**](APIVersion.md) +[**APIVersion**](../models/APIVersion.md) ### HTTP request headers @@ -116,7 +116,7 @@ Other parameters are passed through a pointer to an apiInfosVersionsGetRequest s ### Return type -[**[]APIVersion**](APIVersion.md) +[**[]APIVersion**](../models/APIVersion.md) ### HTTP request headers diff --git a/docs/api/RestoresApi.md b/docs/api/RestoresApi.md index 799ab00..40b70bc 100644 --- a/docs/api/RestoresApi.md +++ b/docs/api/RestoresApi.md @@ -62,7 +62,7 @@ Other parameters are passed through a pointer to an apiClustersRestorePostReques |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **createRestoreRequest** | [**CreateRestoreRequest**](CreateRestoreRequest.md) | The restore request to create. | | +| **createRestoreRequest** | [**CreateRestoreRequest**](../models/CreateRestoreRequest.md) | The restore request to create. | | ### Return type diff --git a/docs/api/SnapshotsApi.md b/docs/api/SnapshotsApi.md index 517c8a7..a12b3e8 100644 --- a/docs/api/SnapshotsApi.md +++ b/docs/api/SnapshotsApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://api.ionos.com/databases/mongodb* ```go var result SnapshotList = ClustersSnapshotsGet(ctx, clusterId) + .Limit(limit) + .Offset(offset) .Execute() ``` @@ -34,10 +36,12 @@ import ( func main() { clusterId := "clusterId_example" // string | The unique ID of the cluster. + limit := int32(100) // int32 | The maximum number of elements to return. Use together with 'offset' for pagination. (optional) (default to 100) + offset := int32(200) // int32 | The first element to return. Use together with 'limit' for pagination. (optional) (default to 0) configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.SnapshotsApi.ClustersSnapshotsGet(context.Background(), clusterId).Execute() + resource, resp, err := apiClient.SnapshotsApi.ClustersSnapshotsGet(context.Background(), clusterId).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `SnapshotsApi.ClustersSnapshotsGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -62,10 +66,12 @@ Other parameters are passed through a pointer to an apiClustersSnapshotsGetReque |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| +| **limit** | **int32** | The maximum number of elements to return. Use together with 'offset' for pagination. | [default to 100]| +| **offset** | **int32** | The first element to return. Use together with 'limit' for pagination. | [default to 0]| ### Return type -[**SnapshotList**](SnapshotList.md) +[**SnapshotList**](../models/SnapshotList.md) ### HTTP request headers diff --git a/docs/api/TemplatesApi.md b/docs/api/TemplatesApi.md index 2e0eb09..a6f1290 100644 --- a/docs/api/TemplatesApi.md +++ b/docs/api/TemplatesApi.md @@ -12,6 +12,8 @@ All URIs are relative to *https://api.ionos.com/databases/mongodb* ```go var result TemplateList = TemplatesGet(ctx) + .Limit(limit) + .Offset(offset) .Execute() ``` @@ -33,10 +35,12 @@ import ( ) func main() { + limit := int32(100) // int32 | The maximum number of elements to return. Use together with 'offset' for pagination. (optional) (default to 100) + offset := int32(200) // int32 | The first element to return. Use together with 'limit' for pagination. (optional) (default to 0) configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.TemplatesApi.TemplatesGet(context.Background()).Execute() + resource, resp, err := apiClient.TemplatesApi.TemplatesGet(context.Background()).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `TemplatesApi.TemplatesGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -48,16 +52,21 @@ func main() { ### Path Parameters -This endpoint does not need any parameter. + ### Other Parameters Other parameters are passed through a pointer to an apiTemplatesGetRequest struct via the builder pattern +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **limit** | **int32** | The maximum number of elements to return. Use together with 'offset' for pagination. | [default to 100]| +| **offset** | **int32** | The first element to return. Use together with 'limit' for pagination. | [default to 0]| + ### Return type -[**TemplateList**](TemplateList.md) +[**TemplateList**](../models/TemplateList.md) ### HTTP request headers diff --git a/docs/api/UsersApi.md b/docs/api/UsersApi.md index 72d1cb1..c7f9115 100644 --- a/docs/api/UsersApi.md +++ b/docs/api/UsersApi.md @@ -71,7 +71,7 @@ Other parameters are passed through a pointer to an apiClustersUsersDeleteReques ### Return type -[**User**](User.md) +[**User**](../models/User.md) ### HTTP request headers @@ -139,7 +139,7 @@ Other parameters are passed through a pointer to an apiClustersUsersFindByIdRequ ### Return type -[**User**](User.md) +[**User**](../models/User.md) ### HTTP request headers @@ -152,6 +152,8 @@ Other parameters are passed through a pointer to an apiClustersUsersFindByIdRequ ```go var result UsersList = ClustersUsersGet(ctx, clusterId) + .Limit(limit) + .Offset(offset) .Execute() ``` @@ -174,10 +176,12 @@ import ( func main() { clusterId := "clusterId_example" // string | The unique ID of the cluster. + limit := int32(100) // int32 | The maximum number of elements to return. Use together with 'offset' for pagination. (optional) (default to 100) + offset := int32(200) // int32 | The first element to return. Use together with 'limit' for pagination. (optional) (default to 0) configuration := ionoscloud.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL") apiClient := ionoscloud.NewAPIClient(configuration) - resource, resp, err := apiClient.UsersApi.ClustersUsersGet(context.Background(), clusterId).Execute() + resource, resp, err := apiClient.UsersApi.ClustersUsersGet(context.Background(), clusterId).Limit(limit).Offset(offset).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `UsersApi.ClustersUsersGet``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp) @@ -202,10 +206,12 @@ Other parameters are passed through a pointer to an apiClustersUsersGetRequest s |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| +| **limit** | **int32** | The maximum number of elements to return. Use together with 'offset' for pagination. | [default to 100]| +| **offset** | **int32** | The first element to return. Use together with 'limit' for pagination. | [default to 0]| ### Return type -[**UsersList**](UsersList.md) +[**UsersList**](../models/UsersList.md) ### HTTP request headers @@ -272,11 +278,11 @@ Other parameters are passed through a pointer to an apiClustersUsersPatchRequest |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **patchUserRequest** | [**PatchUserRequest**](PatchUserRequest.md) | Part of the MongoDB user which should be modified. | | +| **patchUserRequest** | [**PatchUserRequest**](../models/PatchUserRequest.md) | Part of the MongoDB user which should be modified. | | ### Return type -[**User**](User.md) +[**User**](../models/User.md) ### HTTP request headers @@ -341,11 +347,11 @@ Other parameters are passed through a pointer to an apiClustersUsersPostRequest |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **user** | [**User**](User.md) | The user to be created. | | +| **user** | [**User**](../models/User.md) | The user to be created. | | ### Return type -[**User**](User.md) +[**User**](../models/User.md) ### HTTP request headers diff --git a/docs/models/ClusterList.md b/docs/models/ClusterList.md index 7fe3af9..6474682 100644 --- a/docs/models/ClusterList.md +++ b/docs/models/ClusterList.md @@ -10,8 +10,8 @@ List of clusters. |**Type** | Pointer to [**ResourceType**](ResourceType.md) | | [optional] | |**Id** | Pointer to **string** | The unique ID of the resource. | [optional] | |**Items** | Pointer to [**[]ClusterResponse**](ClusterResponse.md) | | [optional] | -|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). | [optional] [readonly] | -|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). | [optional] [readonly] | +|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [optional] [default to 0]| +|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, the default limit is 100). | [optional] [default to 100]| |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods diff --git a/docs/models/Pagination.md b/docs/models/Pagination.md index 6f5b04a..f3974b1 100644 --- a/docs/models/Pagination.md +++ b/docs/models/Pagination.md @@ -6,8 +6,8 @@ |Name | Type | Description | Notes| |------------ | ------------- | ------------- | -------------| -|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). | [optional] [readonly] | -|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). | [optional] [readonly] | +|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [optional] [default to 0]| +|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, the default limit is 100). | [optional] [default to 100]| |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods diff --git a/docs/models/PaginationLinks.md b/docs/models/PaginationLinks.md index f40c031..a48e256 100644 --- a/docs/models/PaginationLinks.md +++ b/docs/models/PaginationLinks.md @@ -1,6 +1,6 @@ # PaginationLinks -The URLs to navigate the different pages. As of now we always only return a single page. +The URLs to navigate the different pages. ## Properties diff --git a/docs/models/SnapshotList.md b/docs/models/SnapshotList.md index 5a2f247..861e901 100644 --- a/docs/models/SnapshotList.md +++ b/docs/models/SnapshotList.md @@ -10,8 +10,8 @@ List of snapshots. |**Type** | Pointer to [**ResourceType**](ResourceType.md) | | [optional] | |**Id** | Pointer to **string** | The unique ID of the resource. | [optional] | |**Items** | Pointer to [**[]SnapshotResponse**](SnapshotResponse.md) | | [optional] | -|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). | [optional] [readonly] | -|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). | [optional] [readonly] | +|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [optional] [default to 0]| +|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, the default limit is 100). | [optional] [default to 100]| |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods diff --git a/docs/models/TemplateList.md b/docs/models/TemplateList.md index c8f49a2..995e86e 100644 --- a/docs/models/TemplateList.md +++ b/docs/models/TemplateList.md @@ -10,8 +10,8 @@ The list of MongoDB templates. |**Type** | Pointer to [**ResourceType**](ResourceType.md) | | [optional] | |**Id** | Pointer to **string** | The unique ID of the resource. | [optional] | |**Items** | Pointer to [**[]TemplateResponse**](TemplateResponse.md) | | [optional] | -|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). | [optional] [readonly] | -|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). | [optional] [readonly] | +|**Offset** | Pointer to **int32** | The offset specified in the request (if none was specified, the default offset is 0). | [optional] [default to 0]| +|**Limit** | Pointer to **int32** | The limit specified in the request (if none was specified, the default limit is 100). | [optional] [default to 100]| |**Links** | Pointer to [**PaginationLinks**](PaginationLinks.md) | | [optional] | ## Methods diff --git a/docs/models/UserMetadata.md b/docs/models/UserMetadata.md index 90baf55..a6ef8f7 100644 --- a/docs/models/UserMetadata.md +++ b/docs/models/UserMetadata.md @@ -10,7 +10,6 @@ The metadata of the resource. |**CreatedDate** | Pointer to [**time.Time**](time.Time.md) | The date the resource was created. | [optional] | |**CreatedBy** | Pointer to **string** | The user who created the resource. | [optional] | |**CreatedByUserId** | Pointer to **string** | The ID of the user who created the resource. | [optional] | -|**State** | Pointer to **string** | The user state. | [optional] | ## Methods @@ -90,30 +89,5 @@ SetCreatedByUserId sets CreatedByUserId field to given value. HasCreatedByUserId returns a boolean if a field has been set. -### GetState - -`func (o *UserMetadata) GetState() string` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *UserMetadata) GetStateOk() (*string, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *UserMetadata) SetState(v string)` - -SetState sets State field to given value. - -### HasState - -`func (o *UserMetadata) HasState() bool` - -HasState returns a boolean if a field has been set. - diff --git a/logger.go b/logger.go index a02e019..0659eae 100644 --- a/logger.go +++ b/logger.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_api_version.go b/model_api_version.go index 1254b58..7dae954 100644 --- a/model_api_version.go +++ b/model_api_version.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_cluster_list.go b/model_cluster_list.go index d512f83..1ff5be2 100644 --- a/model_cluster_list.go +++ b/model_cluster_list.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -20,11 +20,11 @@ type ClusterList struct { // The unique ID of the resource. Id *string `json:"id,omitempty"` Items *[]ClusterResponse `json:"items,omitempty"` - // The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). + // The offset specified in the request (if none was specified, the default offset is 0). Offset *int32 `json:"offset,omitempty"` - // The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). + // The limit specified in the request (if none was specified, the default limit is 100). Limit *int32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + Links *PaginationLinks `json:"links,omitempty"` } // NewClusterList instantiates a new ClusterList object @@ -34,6 +34,11 @@ type ClusterList struct { func NewClusterList() *ClusterList { this := ClusterList{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit + return &this } @@ -42,6 +47,10 @@ func NewClusterList() *ClusterList { // but it doesn't guarantee that properties required by API are set func NewClusterListWithDefaults() *ClusterList { this := ClusterList{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit return &this } @@ -296,7 +305,7 @@ func (o ClusterList) MarshalJSON() ([]byte, error) { } if o.Links != nil { - toSerialize["_links"] = o.Links + toSerialize["links"] = o.Links } return json.Marshal(toSerialize) diff --git a/model_cluster_list_all_of.go b/model_cluster_list_all_of.go index 41993b4..bd4c1fe 100644 --- a/model_cluster_list_all_of.go +++ b/model_cluster_list_all_of.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_cluster_logs.go b/model_cluster_logs.go index 1407320..66f59a1 100644 --- a/model_cluster_logs.go +++ b/model_cluster_logs.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_cluster_logs_instances.go b/model_cluster_logs_instances.go index 3cf86c4..d6f1504 100644 --- a/model_cluster_logs_instances.go +++ b/model_cluster_logs_instances.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_cluster_logs_messages.go b/model_cluster_logs_messages.go index 96cc89b..bec0ff5 100644 --- a/model_cluster_logs_messages.go +++ b/model_cluster_logs_messages.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_cluster_properties.go b/model_cluster_properties.go index 51a78f2..a139c47 100644 --- a/model_cluster_properties.go +++ b/model_cluster_properties.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_cluster_response.go b/model_cluster_response.go index ba2b258..85014c0 100644 --- a/model_cluster_response.go +++ b/model_cluster_response.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_connection.go b/model_connection.go index cb8ff90..963d8d6 100644 --- a/model_connection.go +++ b/model_connection.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_create_cluster_properties.go b/model_create_cluster_properties.go index 6a6d465..17ad96c 100644 --- a/model_create_cluster_properties.go +++ b/model_create_cluster_properties.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_create_cluster_request.go b/model_create_cluster_request.go index f6b139f..51583f1 100644 --- a/model_create_cluster_request.go +++ b/model_create_cluster_request.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_create_restore_request.go b/model_create_restore_request.go index 6df8cca..78891cc 100644 --- a/model_create_restore_request.go +++ b/model_create_restore_request.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_day_of_the_week.go b/model_day_of_the_week.go index 423fa9a..4046048 100644 --- a/model_day_of_the_week.go +++ b/model_day_of_the_week.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_error_message.go b/model_error_message.go index c4bb042..0e480f8 100644 --- a/model_error_message.go +++ b/model_error_message.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_error_response.go b/model_error_response.go index 1c6d220..537916b 100644 --- a/model_error_response.go +++ b/model_error_response.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_health.go b/model_health.go index 34a8017..30841f8 100644 --- a/model_health.go +++ b/model_health.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_maintenance_window.go b/model_maintenance_window.go index 4a20f1c..71b04e4 100644 --- a/model_maintenance_window.go +++ b/model_maintenance_window.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_metadata.go b/model_metadata.go index 130bc3e..943e670 100644 --- a/model_metadata.go +++ b/model_metadata.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_pagination.go b/model_pagination.go index cf22158..7e4c0b3 100644 --- a/model_pagination.go +++ b/model_pagination.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -16,11 +16,11 @@ import ( // Pagination struct for Pagination type Pagination struct { - // The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). + // The offset specified in the request (if none was specified, the default offset is 0). Offset *int32 `json:"offset,omitempty"` - // The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). + // The limit specified in the request (if none was specified, the default limit is 100). Limit *int32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + Links *PaginationLinks `json:"links,omitempty"` } // NewPagination instantiates a new Pagination object @@ -30,6 +30,11 @@ type Pagination struct { func NewPagination() *Pagination { this := Pagination{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit + return &this } @@ -38,6 +43,10 @@ func NewPagination() *Pagination { // but it doesn't guarantee that properties required by API are set func NewPaginationWithDefaults() *Pagination { this := Pagination{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit return &this } @@ -166,7 +175,7 @@ func (o Pagination) MarshalJSON() ([]byte, error) { } if o.Links != nil { - toSerialize["_links"] = o.Links + toSerialize["links"] = o.Links } return json.Marshal(toSerialize) diff --git a/model_pagination_links.go b/model_pagination_links.go index 8132302..209c3bb 100644 --- a/model_pagination_links.go +++ b/model_pagination_links.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -14,7 +14,7 @@ import ( "encoding/json" ) -// PaginationLinks The URLs to navigate the different pages. As of now we always only return a single page. +// PaginationLinks The URLs to navigate the different pages. type PaginationLinks struct { // The URL (with offset and limit parameters) of the previous page; only present if the offset is greater than 0. Prev *string `json:"prev,omitempty"` diff --git a/model_patch_cluster_properties.go b/model_patch_cluster_properties.go index 3c0f450..d1a28f2 100644 --- a/model_patch_cluster_properties.go +++ b/model_patch_cluster_properties.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_patch_cluster_request.go b/model_patch_cluster_request.go index 69ed2f5..01477c2 100644 --- a/model_patch_cluster_request.go +++ b/model_patch_cluster_request.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_patch_user_properties.go b/model_patch_user_properties.go index 9193cbd..37cf4a2 100644 --- a/model_patch_user_properties.go +++ b/model_patch_user_properties.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_patch_user_request.go b/model_patch_user_request.go index 6d585fe..0e8a60b 100644 --- a/model_patch_user_request.go +++ b/model_patch_user_request.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_resource_type.go b/model_resource_type.go index cce9d2d..3733ecf 100644 --- a/model_resource_type.go +++ b/model_resource_type.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_snapshot_list.go b/model_snapshot_list.go index 4299a2f..7f4eb27 100644 --- a/model_snapshot_list.go +++ b/model_snapshot_list.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -20,11 +20,11 @@ type SnapshotList struct { // The unique ID of the resource. Id *string `json:"id,omitempty"` Items *[]SnapshotResponse `json:"items,omitempty"` - // The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). + // The offset specified in the request (if none was specified, the default offset is 0). Offset *int32 `json:"offset,omitempty"` - // The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). + // The limit specified in the request (if none was specified, the default limit is 100). Limit *int32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + Links *PaginationLinks `json:"links,omitempty"` } // NewSnapshotList instantiates a new SnapshotList object @@ -34,6 +34,11 @@ type SnapshotList struct { func NewSnapshotList() *SnapshotList { this := SnapshotList{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit + return &this } @@ -42,6 +47,10 @@ func NewSnapshotList() *SnapshotList { // but it doesn't guarantee that properties required by API are set func NewSnapshotListWithDefaults() *SnapshotList { this := SnapshotList{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit return &this } @@ -296,7 +305,7 @@ func (o SnapshotList) MarshalJSON() ([]byte, error) { } if o.Links != nil { - toSerialize["_links"] = o.Links + toSerialize["links"] = o.Links } return json.Marshal(toSerialize) diff --git a/model_snapshot_list_all_of.go b/model_snapshot_list_all_of.go index ac6c7d0..e3a4e27 100644 --- a/model_snapshot_list_all_of.go +++ b/model_snapshot_list_all_of.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_snapshot_properties.go b/model_snapshot_properties.go index e199613..91b8e1f 100644 --- a/model_snapshot_properties.go +++ b/model_snapshot_properties.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_snapshot_response.go b/model_snapshot_response.go index 439904f..7d0bc63 100644 --- a/model_snapshot_response.go +++ b/model_snapshot_response.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_state.go b/model_state.go index 3ab3e88..68c3869 100644 --- a/model_state.go +++ b/model_state.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_template_list.go b/model_template_list.go index 4cb7b85..47a3793 100644 --- a/model_template_list.go +++ b/model_template_list.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -20,11 +20,11 @@ type TemplateList struct { // The unique ID of the resource. Id *string `json:"id,omitempty"` Items *[]TemplateResponse `json:"items,omitempty"` - // The offset specified in the request (if none was specified, the default offset is 0) (not implemented yet). + // The offset specified in the request (if none was specified, the default offset is 0). Offset *int32 `json:"offset,omitempty"` - // The limit specified in the request (if none was specified, use the endpoint's default pagination limit) (not implemented yet, always return number of items). + // The limit specified in the request (if none was specified, the default limit is 100). Limit *int32 `json:"limit,omitempty"` - Links *PaginationLinks `json:"_links,omitempty"` + Links *PaginationLinks `json:"links,omitempty"` } // NewTemplateList instantiates a new TemplateList object @@ -34,6 +34,11 @@ type TemplateList struct { func NewTemplateList() *TemplateList { this := TemplateList{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit + return &this } @@ -42,6 +47,10 @@ func NewTemplateList() *TemplateList { // but it doesn't guarantee that properties required by API are set func NewTemplateListWithDefaults() *TemplateList { this := TemplateList{} + var offset int32 = 0 + this.Offset = &offset + var limit int32 = 100 + this.Limit = &limit return &this } @@ -296,7 +305,7 @@ func (o TemplateList) MarshalJSON() ([]byte, error) { } if o.Links != nil { - toSerialize["_links"] = o.Links + toSerialize["links"] = o.Links } return json.Marshal(toSerialize) diff --git a/model_template_list_all_of.go b/model_template_list_all_of.go index fc204ea..e7e632e 100644 --- a/model_template_list_all_of.go +++ b/model_template_list_all_of.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_template_response.go b/model_template_response.go index e33244f..d1a7332 100644 --- a/model_template_response.go +++ b/model_template_response.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_user.go b/model_user.go index 5a6bce5..b13dca4 100644 --- a/model_user.go +++ b/model_user.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_user_metadata.go b/model_user_metadata.go index 0014577..286eeb3 100644 --- a/model_user_metadata.go +++ b/model_user_metadata.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -23,8 +23,6 @@ type UserMetadata struct { CreatedBy *string `json:"createdBy,omitempty"` // The ID of the user who created the resource. CreatedByUserId *string `json:"createdByUserId,omitempty"` - // The user state. - State *string `json:"state,omitempty"` } // NewUserMetadata instantiates a new UserMetadata object @@ -166,44 +164,6 @@ func (o *UserMetadata) HasCreatedByUserId() bool { return false } -// GetState returns the State field value -// If the value is explicit nil, the zero value for string will be returned -func (o *UserMetadata) GetState() *string { - if o == nil { - return nil - } - - return o.State - -} - -// GetStateOk returns a tuple with the State 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 *UserMetadata) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - - return o.State, true -} - -// SetState sets field value -func (o *UserMetadata) SetState(v string) { - - o.State = &v - -} - -// HasState returns a boolean if a field has been set. -func (o *UserMetadata) HasState() bool { - if o != nil && o.State != nil { - return true - } - - return false -} - func (o UserMetadata) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.CreatedDate != nil { @@ -218,10 +178,6 @@ func (o UserMetadata) MarshalJSON() ([]byte, error) { toSerialize["createdByUserId"] = o.CreatedByUserId } - if o.State != nil { - toSerialize["state"] = o.State - } - return json.Marshal(toSerialize) } diff --git a/model_user_properties.go b/model_user_properties.go index 7f7b526..7dac97d 100644 --- a/model_user_properties.go +++ b/model_user_properties.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_user_roles.go b/model_user_roles.go index d6c1916..fd0b394 100644 --- a/model_user_roles.go +++ b/model_user_roles.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/model_users_list.go b/model_users_list.go index a95160e..7a3142d 100644 --- a/model_users_list.go +++ b/model_users_list.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/response.go b/response.go index da7c155..18841bd 100644 --- a/response.go +++ b/response.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ diff --git a/utils.go b/utils.go index d2ded3d..d92c461 100644 --- a/utils.go +++ b/utils.go @@ -1,7 +1,7 @@ /* * 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. + * 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 */ @@ -12,10 +12,34 @@ package ionoscloud import ( "encoding/json" + "reflect" "strings" "time" ) +// ToPtr - returns a pointer to the given value. +func ToPtr[T any](v T) *T { + return &v +} + +// ToValue - returns the value of the pointer passed in +func ToValue[T any](ptr *T) T { + return *ptr +} + +// ToValueDefault - returns the value of the pointer passed in, or the default type value if the pointer is nil +func ToValueDefault[T any](ptr *T) T { + var defaultVal T + if ptr == nil { + return defaultVal + } + return *ptr +} + +func SliceToValueDefault[T any](ptrSlice *[]T) []T { + return append([]T{}, *ptrSlice...) +} + // PtrBool - returns a pointer to given boolean value. func PtrBool(v bool) *bool { return &v } @@ -742,3 +766,17 @@ func (t *IonosTime) UnmarshalJSON(data []byte) error { *t = IonosTime{tt} return nil } + +// IsNil checks if an input is nil +func IsNil(i interface{}) bool { + if i == nil { + return true + } + switch reflect.TypeOf(i).Kind() { + case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice: + return reflect.ValueOf(i).IsNil() + case reflect.Array: + return reflect.ValueOf(i).IsZero() + } + return false +}