From a7929586f5002014c0f9289969dec5f172b3ca7c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 14:40:52 +0200 Subject: [PATCH] feat(openapi): update with Bonita OpenAPI spec 0.0.20 (#385) Co-authored-by: educhastenier <4921958+educhastenier@users.noreply.github.com> --- .openapi-generator/FILES | 4 + .../openapi.yaml-default.sha256 | 2 +- api/openapi.yaml | 259 +++++++- pom.xml | 2 +- .../web/client/api/FormFileUploadApi.java | 59 ++ .../web/client/api/InformationApi.java | 53 ++ .../client/model/FormFileUploadResponse.java | 167 +++++ .../web/client/model/SystemInformation.java | 604 ++++++++++++++++++ 8 files changed, 1144 insertions(+), 6 deletions(-) create mode 100644 src/main/java/org/bonitasoft/web/client/api/FormFileUploadApi.java create mode 100644 src/main/java/org/bonitasoft/web/client/api/InformationApi.java create mode 100644 src/main/java/org/bonitasoft/web/client/model/FormFileUploadResponse.java create mode 100644 src/main/java/org/bonitasoft/web/client/model/SystemInformation.java diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 03c1a39e..93d1450b 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -31,11 +31,13 @@ src/main/java/org/bonitasoft/web/client/api/CustomUserDefinitionApi.java src/main/java/org/bonitasoft/web/client/api/CustomUserValueApi.java src/main/java/org/bonitasoft/web/client/api/DiagramApi.java src/main/java/org/bonitasoft/web/client/api/FlowNodeApi.java +src/main/java/org/bonitasoft/web/client/api/FormFileUploadApi.java src/main/java/org/bonitasoft/web/client/api/FormMappingApi.java src/main/java/org/bonitasoft/web/client/api/GroupApi.java src/main/java/org/bonitasoft/web/client/api/HumanTaskApi.java src/main/java/org/bonitasoft/web/client/api/I18nlocaleApi.java src/main/java/org/bonitasoft/web/client/api/I18ntranslationApi.java +src/main/java/org/bonitasoft/web/client/api/InformationApi.java src/main/java/org/bonitasoft/web/client/api/MaintenanceApi.java src/main/java/org/bonitasoft/web/client/api/ManualTaskApi.java src/main/java/org/bonitasoft/web/client/api/MembershipApi.java @@ -136,6 +138,7 @@ src/main/java/org/bonitasoft/web/client/model/Expression.java src/main/java/org/bonitasoft/web/client/model/FlowElementContainerDefinition.java src/main/java/org/bonitasoft/web/client/model/FlowNode.java src/main/java/org/bonitasoft/web/client/model/FlowNodeUpdateRequest.java +src/main/java/org/bonitasoft/web/client/model/FormFileUploadResponse.java src/main/java/org/bonitasoft/web/client/model/FormMapping.java src/main/java/org/bonitasoft/web/client/model/FormMappingUpdateRequest.java src/main/java/org/bonitasoft/web/client/model/Group.java @@ -197,6 +200,7 @@ src/main/java/org/bonitasoft/web/client/model/RoleCreateRequest.java src/main/java/org/bonitasoft/web/client/model/RoleUpdateRequest.java src/main/java/org/bonitasoft/web/client/model/Session.java src/main/java/org/bonitasoft/web/client/model/Signal.java +src/main/java/org/bonitasoft/web/client/model/SystemInformation.java src/main/java/org/bonitasoft/web/client/model/SystemTenant.java src/main/java/org/bonitasoft/web/client/model/Task.java src/main/java/org/bonitasoft/web/client/model/Tenant.java diff --git a/.openapi-generator/openapi.yaml-default.sha256 b/.openapi-generator/openapi.yaml-default.sha256 index 6618d50f..1ad7759c 100644 --- a/.openapi-generator/openapi.yaml-default.sha256 +++ b/.openapi-generator/openapi.yaml-default.sha256 @@ -1 +1 @@ -fb25da0b01d32a744a0a48d9eb80cb1a24ea5ba4b035982ba1006dbec2cd700b \ No newline at end of file +76148affed9d814ab2c5884bfd5f5b1c7f5310f54e494ce1d08df1f652eb9d2b \ No newline at end of file diff --git a/api/openapi.yaml b/api/openapi.yaml index f559f710..22bd31fb 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -104,7 +104,7 @@ info: name: GPL-v2.0 url: http://www.gnu.org/licenses/gpl-2.0.txt title: Bonita API - version: 0.0.19 + version: 0.0.20 x-logo: url: images/bonitasoft-logo.svg backgroundColor: '#19465f' @@ -269,6 +269,11 @@ tags: - description: I18nTranslation name: I18ntranslation x-displayName: I18nTranslation +- description: | + Handle the platform information. + This Web REST API is available since version 10.2 (2024.3). Most of the information returned is only for Subscription editions. + name: Information + x-displayName: Information - description: | Handle the license information. This requires a platform session. Log in using the platform login service. This Web REST API is available in **Enterprise editions only**, since version 7.11. @@ -359,6 +364,10 @@ tags: url: https://documentation.bonitasoft.com/bonita/latest/rest-api-extensions name: RestAPIextensions x-displayName: API extensions +- description: "Supports any type of files, used to upload a file before submitting\ + \ a process or task form with a document in its contract." + name: FormFileUpload + x-displayName: Form file upload paths: /loginservice: post: @@ -14232,9 +14241,11 @@ paths: - application/json /API/platform/license: get: + deprecated: true description: | Returns the current platform License. This requires a platform session. Log in using the platform login service. + Warning: Since Bonita 10.2 (2024.3), this API is deprecated: use the API `GET /system/information` instead. operationId: getPlatformLicense responses: "200": @@ -14242,7 +14253,7 @@ paths: application/json: schema: $ref: '#/components/schemas/PlatformLicense' - description: 'Success ' + description: Success "400": content: application/json: @@ -16600,10 +16611,68 @@ paths: x-content-type: application/json x-accepts: - application/json + /API/system/information: + get: + description: | + Returns system information details of the platform. + Requires to be logged in as a user having the Admin profile. + operationId: getSystemInformation + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/SystemInformation' + description: Success + "400": + content: + application/json: + example: + message: Bad request + schema: + $ref: '#/components/schemas/Error' + description: Bad request. + "401": + content: + application/json: + example: + message: Unauthorized + schema: + $ref: '#/components/schemas/Error' + description: Authorization information is missing or invalid. + "403": + content: + application/json: + example: + message: "Forbidden, The request contained valid data and was understood\ + \ by the server, but the server is refusing action." + schema: + $ref: '#/components/schemas/Error' + description: "Forbidden, The request contained valid data and was understood\ + \ by the server, but the server is refusing action." + "5XX": + content: + application/json: + example: + message: An unexpected error occured. + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error. + summary: Get the system information + tags: + - Information + x-codeSamples: + - lang: Shell + label: Curl + source: | + curl -b saved_cookies.txt -X GET --url 'http://localhost:8080/bonita/API/system/information' + x-accepts: + - application/json /API/system/license/unusedid: get: description: | - Returns license information for the current server + Returns license information for the current server. Requires to be logged in as a tenant technical administrator. + The same information can be retrieved as a user having simply the Admin profile through the API `GET /system/information`. operationId: getLicense responses: "200": @@ -16611,7 +16680,7 @@ paths: application/json: schema: $ref: '#/components/schemas/License' - description: 'Success ' + description: Success "400": content: application/json: @@ -17082,6 +17151,64 @@ paths: x-content-type: application/x-www-form-urlencoded x-accepts: - application/json + /API/formFileUpload: + post: + description: | + Supports any type of files, used to upload a file before submitting a process or task form with a document in its contract + operationId: formFileUpload + requestBody: + content: + multipart/form-data: + schema: + $ref: '#/components/schemas/FormFileUploadRequest' + responses: + "200": + content: + text/plain: + schema: + $ref: '#/components/schemas/FormFileUploadResponse' + description: Success + "400": + content: + application/json: + example: + message: Bad request + schema: + $ref: '#/components/schemas/Error' + description: Bad request. + "401": + content: + application/json: + example: + message: Unauthorized + schema: + $ref: '#/components/schemas/Error' + description: Authorization information is missing or invalid. + "403": + content: + application/json: + example: + message: "Forbidden, The request contained valid data and was understood\ + \ by the server, but the server is refusing action." + schema: + $ref: '#/components/schemas/Error' + description: "Forbidden, The request contained valid data and was understood\ + \ by the server, but the server is refusing action." + "5XX": + content: + application/json: + example: + message: An unexpected error occured. + schema: + $ref: '#/components/schemas/Error' + description: Unexpected error. + summary: Upload a file + tags: + - FormFileUpload + x-content-type: multipart/form-data + x-accepts: + - application/json + - text/plain components: parameters: pageIndex: @@ -21577,6 +21704,102 @@ components: description: is maintenance message active type: boolean type: object + SystemInformation: + description: "" + example: + activeFeatures: activeFeatures + subscriptionStartPeriod: subscriptionStartPeriod + licenseMode: licenseMode + licensee: licensee + contactInfo: contactInfo + requestKey: requestKey + subscriptionEndPeriod: subscriptionEndPeriod + caseCounter: 5 + licenseStartDate: licenseStartDate + licenseExpirationDate: licenseExpirationDate + edition: edition + caseCounterLimit: 1 + duration: duration + numberOfCPUCores: numberOfCPUCores + subscriptionType: subscriptionType + managedAppsLimit: 0 + expirationDate: 6 + properties: + licenseStartDate: + description: date in milliseconds timestamp since Epoch - first day (included) + of license file validity - Subscription editions only + type: string + duration: + description: number of days for license file validity - Subscription editions + only + type: string + licenseExpirationDate: + description: date in milliseconds timestamp since Epoch - last day (included) + of license file validity - Subscription editions only + type: string + numberOfCPUCores: + description: "number of CPUs allowed by the license, if license mode is\ + \ CPU-based - Subscription editions only" + type: string + edition: + description: name of the Bonita edition enabled by the license - Community + & Subscription editions + type: string + subscriptionType: + description: type of the Subscription the customer has purchased with Bonitasoft + - Subscription editions only + type: string + licenseMode: + description: available mode enabled by the license - Subscription editions + only + type: string + managedAppsLimit: + description: number of managed apps provisioned for in a Bonita Central + environment - Subscription editions only + format: int64 + type: integer + licensee: + description: Owner of the license - Subscription editions only + type: string + contactInfo: + description: E-mail address of the owner of the license - Subscription editions + only + type: string + expirationDate: + description: License expiration date in milliseconds timestamp since Epoch + - Subscription editions only + format: int64 + type: integer + activeFeatures: + description: List of active features that the license allow access to (separated + by comma) - Subscription editions only + type: string + requestKey: + description: "request key to use to generate a new license on the customer\ + \ portal. \n\nIf you have a subscription that specifies case-counter\ + \ licensing, additional fields are present:\n" + type: string + subscriptionStartPeriod: + description: date in milliseconds timestamp since Epoch - first day (included) + of current period for number of process instances provisioned - Subscription + editions only + type: string + subscriptionEndPeriod: + description: date in milliseconds timestamp since Epoch - last day (included) + of current period for number of process instances provisioned - Subscription + editions only + type: string + caseCounterLimit: + description: number of maximum process instances that can be started - Community + & Subscription editions + format: int64 + type: integer + caseCounter: + description: number of consumed process instances - Community & Subscription + editions + format: int64 + type: integer + type: object License: description: Bonita license example: @@ -21637,6 +21860,30 @@ components: description: the temporary file name once uploaded on the server type: string type: object + FormFileUploadRequest: + description: A file to upload + properties: + file: + format: binary + type: string + type: object + FormFileUploadResponse: + description: Form file upload response + example: + filename: 66c5d4e99167e.pdf + tempPath: 885efa7d-c639-4076-ba5d-04a7fbfc1d11.pdf + contentType: application/pdf + properties: + filename: + description: file name + type: string + tempPath: + description: temporary path of a file + type: string + contentType: + description: response content type + type: string + type: object importApplication_request: properties: applicationsDataUpload: @@ -21875,6 +22122,7 @@ x-tagGroups: - PlatformTenant - Tenant - License + - Information - name: Portal tags: - Page @@ -21893,4 +22141,7 @@ x-tagGroups: - name: Other tags: - RestAPIextensions +- name: Upload + tags: + - FormFileUpload diff --git a/pom.xml b/pom.xml index 8113d700..67965330 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ UTF-8 UTF-8 - 0.0.19 + 0.0.20 1.6.14 3.0.0 3.0.2 diff --git a/src/main/java/org/bonitasoft/web/client/api/FormFileUploadApi.java b/src/main/java/org/bonitasoft/web/client/api/FormFileUploadApi.java new file mode 100644 index 00000000..2fc0ffe2 --- /dev/null +++ b/src/main/java/org/bonitasoft/web/client/api/FormFileUploadApi.java @@ -0,0 +1,59 @@ +/** + * Copyright (C) 2024 BonitaSoft S.A. + * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2.0 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.bonitasoft.web.client.api; + +import java.io.File; + +import org.bonitasoft.web.client.invoker.ApiClient; +import org.bonitasoft.web.client.model.ApiResponse; +import org.bonitasoft.web.client.model.FormFileUploadResponse; + +import feign.*; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public interface FormFileUploadApi extends ApiClient.Api { + + /** + * Upload a file + * Supports any type of files, used to upload a file before submitting a process or task form with a document in its contract + * + * @param file (optional) + * @return FormFileUploadResponse + */ + @RequestLine("POST /API/formFileUpload") + @Headers({ + "Content-Type: multipart/form-data", + "Accept: application/json,text/plain", + }) + FormFileUploadResponse formFileUpload(@Param("file") File file); + + /** + * Upload a file + * Similar to formFileUpload but it also returns the http response headers . + * Supports any type of files, used to upload a file before submitting a process or task form with a document in its contract + * + * @param file (optional) + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("POST /API/formFileUpload") + @Headers({ + "Content-Type: multipart/form-data", + "Accept: application/json,text/plain", + }) + ApiResponse formFileUploadWithHttpInfo(@Param("file") File file); + +} diff --git a/src/main/java/org/bonitasoft/web/client/api/InformationApi.java b/src/main/java/org/bonitasoft/web/client/api/InformationApi.java new file mode 100644 index 00000000..2fac382d --- /dev/null +++ b/src/main/java/org/bonitasoft/web/client/api/InformationApi.java @@ -0,0 +1,53 @@ +/** + * Copyright (C) 2024 BonitaSoft S.A. + * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2.0 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.bonitasoft.web.client.api; + +import org.bonitasoft.web.client.invoker.ApiClient; +import org.bonitasoft.web.client.model.ApiResponse; +import org.bonitasoft.web.client.model.SystemInformation; + +import feign.*; + +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public interface InformationApi extends ApiClient.Api { + + /** + * Get the system information + * Returns system information details of the platform. Requires to be logged in as a user having the Admin profile. + * + * @return SystemInformation + */ + @RequestLine("GET /API/system/information") + @Headers({ + "Accept: application/json", + }) + SystemInformation getSystemInformation(); + + /** + * Get the system information + * Similar to getSystemInformation but it also returns the http response headers . + * Returns system information details of the platform. Requires to be logged in as a user having the Admin profile. + * + * @return A ApiResponse that wraps the response boyd and the http headers. + */ + @RequestLine("GET /API/system/information") + @Headers({ + "Accept: application/json", + }) + ApiResponse getSystemInformationWithHttpInfo(); + +} diff --git a/src/main/java/org/bonitasoft/web/client/model/FormFileUploadResponse.java b/src/main/java/org/bonitasoft/web/client/model/FormFileUploadResponse.java new file mode 100644 index 00000000..4ec60d14 --- /dev/null +++ b/src/main/java/org/bonitasoft/web/client/model/FormFileUploadResponse.java @@ -0,0 +1,167 @@ +/** + * Copyright (C) 2024-2023 BonitaSoft S.A. + * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2.0 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.bonitasoft.web.client.model; + +import java.io.Serializable; +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * Form file upload response + */ +@JsonPropertyOrder({ + FormFileUploadResponse.JSON_PROPERTY_FILENAME, + FormFileUploadResponse.JSON_PROPERTY_TEMP_PATH, + FormFileUploadResponse.JSON_PROPERTY_CONTENT_TYPE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class FormFileUploadResponse implements Serializable { + + private static final long serialVersionUID = 1L; + + public static final String JSON_PROPERTY_FILENAME = "filename"; + private String filename; + + public static final String JSON_PROPERTY_TEMP_PATH = "tempPath"; + private String tempPath; + + public static final String JSON_PROPERTY_CONTENT_TYPE = "contentType"; + private String contentType; + + public FormFileUploadResponse() { + } + + public FormFileUploadResponse filename(String filename) { + + this.filename = filename; + return this; + } + + /** + * file name + * + * @return filename + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getFilename() { + return filename; + } + + @JsonProperty(JSON_PROPERTY_FILENAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setFilename(String filename) { + this.filename = filename; + } + + public FormFileUploadResponse tempPath(String tempPath) { + + this.tempPath = tempPath; + return this; + } + + /** + * temporary path of a file + * + * @return tempPath + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMP_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getTempPath() { + return tempPath; + } + + @JsonProperty(JSON_PROPERTY_TEMP_PATH) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setTempPath(String tempPath) { + this.tempPath = tempPath; + } + + public FormFileUploadResponse contentType(String contentType) { + + this.contentType = contentType; + return this; + } + + /** + * response content type + * + * @return contentType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContentType() { + return contentType; + } + + @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContentType(String contentType) { + this.contentType = contentType; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FormFileUploadResponse formFileUploadResponse = (FormFileUploadResponse) o; + return Objects.equals(this.filename, formFileUploadResponse.filename) && + Objects.equals(this.tempPath, formFileUploadResponse.tempPath) && + Objects.equals(this.contentType, formFileUploadResponse.contentType); + } + + @Override + public int hashCode() { + return Objects.hash(filename, tempPath, contentType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FormFileUploadResponse {\n"); + sb.append(" filename: ").append(toIndentedString(filename)).append("\n"); + sb.append(" tempPath: ").append(toIndentedString(tempPath)).append("\n"); + sb.append(" contentType: ").append(toIndentedString(contentType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/src/main/java/org/bonitasoft/web/client/model/SystemInformation.java b/src/main/java/org/bonitasoft/web/client/model/SystemInformation.java new file mode 100644 index 00000000..75b54d4f --- /dev/null +++ b/src/main/java/org/bonitasoft/web/client/model/SystemInformation.java @@ -0,0 +1,604 @@ +/** + * Copyright (C) 2024-2023 BonitaSoft S.A. + * BonitaSoft, 32 rue Gustave Eiffel - 38000 Grenoble + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2.0 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.bonitasoft.web.client.model; + +import java.io.Serializable; +import java.util.Objects; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + +/** + * + */ +@JsonPropertyOrder({ + SystemInformation.JSON_PROPERTY_LICENSE_START_DATE, + SystemInformation.JSON_PROPERTY_DURATION, + SystemInformation.JSON_PROPERTY_LICENSE_EXPIRATION_DATE, + SystemInformation.JSON_PROPERTY_NUMBER_OF_C_P_U_CORES, + SystemInformation.JSON_PROPERTY_EDITION, + SystemInformation.JSON_PROPERTY_SUBSCRIPTION_TYPE, + SystemInformation.JSON_PROPERTY_LICENSE_MODE, + SystemInformation.JSON_PROPERTY_MANAGED_APPS_LIMIT, + SystemInformation.JSON_PROPERTY_LICENSEE, + SystemInformation.JSON_PROPERTY_CONTACT_INFO, + SystemInformation.JSON_PROPERTY_EXPIRATION_DATE, + SystemInformation.JSON_PROPERTY_ACTIVE_FEATURES, + SystemInformation.JSON_PROPERTY_REQUEST_KEY, + SystemInformation.JSON_PROPERTY_SUBSCRIPTION_START_PERIOD, + SystemInformation.JSON_PROPERTY_SUBSCRIPTION_END_PERIOD, + SystemInformation.JSON_PROPERTY_CASE_COUNTER_LIMIT, + SystemInformation.JSON_PROPERTY_CASE_COUNTER +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.7.0") +public class SystemInformation implements Serializable { + + private static final long serialVersionUID = 1L; + + public static final String JSON_PROPERTY_LICENSE_START_DATE = "licenseStartDate"; + private String licenseStartDate; + + public static final String JSON_PROPERTY_DURATION = "duration"; + private String duration; + + public static final String JSON_PROPERTY_LICENSE_EXPIRATION_DATE = "licenseExpirationDate"; + private String licenseExpirationDate; + + public static final String JSON_PROPERTY_NUMBER_OF_C_P_U_CORES = "numberOfCPUCores"; + private String numberOfCPUCores; + + public static final String JSON_PROPERTY_EDITION = "edition"; + private String edition; + + public static final String JSON_PROPERTY_SUBSCRIPTION_TYPE = "subscriptionType"; + private String subscriptionType; + + public static final String JSON_PROPERTY_LICENSE_MODE = "licenseMode"; + private String licenseMode; + + public static final String JSON_PROPERTY_MANAGED_APPS_LIMIT = "managedAppsLimit"; + private Long managedAppsLimit; + + public static final String JSON_PROPERTY_LICENSEE = "licensee"; + private String licensee; + + public static final String JSON_PROPERTY_CONTACT_INFO = "contactInfo"; + private String contactInfo; + + public static final String JSON_PROPERTY_EXPIRATION_DATE = "expirationDate"; + private Long expirationDate; + + public static final String JSON_PROPERTY_ACTIVE_FEATURES = "activeFeatures"; + private String activeFeatures; + + public static final String JSON_PROPERTY_REQUEST_KEY = "requestKey"; + private String requestKey; + + public static final String JSON_PROPERTY_SUBSCRIPTION_START_PERIOD = "subscriptionStartPeriod"; + private String subscriptionStartPeriod; + + public static final String JSON_PROPERTY_SUBSCRIPTION_END_PERIOD = "subscriptionEndPeriod"; + private String subscriptionEndPeriod; + + public static final String JSON_PROPERTY_CASE_COUNTER_LIMIT = "caseCounterLimit"; + private Long caseCounterLimit; + + public static final String JSON_PROPERTY_CASE_COUNTER = "caseCounter"; + private Long caseCounter; + + public SystemInformation() { + } + + public SystemInformation licenseStartDate(String licenseStartDate) { + + this.licenseStartDate = licenseStartDate; + return this; + } + + /** + * date in milliseconds timestamp since Epoch - first day (included) of license file validity - Subscription editions only + * + * @return licenseStartDate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LICENSE_START_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLicenseStartDate() { + return licenseStartDate; + } + + @JsonProperty(JSON_PROPERTY_LICENSE_START_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLicenseStartDate(String licenseStartDate) { + this.licenseStartDate = licenseStartDate; + } + + public SystemInformation duration(String duration) { + + this.duration = duration; + return this; + } + + /** + * number of days for license file validity - Subscription editions only + * + * @return duration + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getDuration() { + return duration; + } + + @JsonProperty(JSON_PROPERTY_DURATION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setDuration(String duration) { + this.duration = duration; + } + + public SystemInformation licenseExpirationDate(String licenseExpirationDate) { + + this.licenseExpirationDate = licenseExpirationDate; + return this; + } + + /** + * date in milliseconds timestamp since Epoch - last day (included) of license file validity - Subscription editions only + * + * @return licenseExpirationDate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LICENSE_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLicenseExpirationDate() { + return licenseExpirationDate; + } + + @JsonProperty(JSON_PROPERTY_LICENSE_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLicenseExpirationDate(String licenseExpirationDate) { + this.licenseExpirationDate = licenseExpirationDate; + } + + public SystemInformation numberOfCPUCores(String numberOfCPUCores) { + + this.numberOfCPUCores = numberOfCPUCores; + return this; + } + + /** + * number of CPUs allowed by the license, if license mode is CPU-based - Subscription editions only + * + * @return numberOfCPUCores + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NUMBER_OF_C_P_U_CORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getNumberOfCPUCores() { + return numberOfCPUCores; + } + + @JsonProperty(JSON_PROPERTY_NUMBER_OF_C_P_U_CORES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setNumberOfCPUCores(String numberOfCPUCores) { + this.numberOfCPUCores = numberOfCPUCores; + } + + public SystemInformation edition(String edition) { + + this.edition = edition; + return this; + } + + /** + * name of the Bonita edition enabled by the license - Community & Subscription editions + * + * @return edition + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getEdition() { + return edition; + } + + @JsonProperty(JSON_PROPERTY_EDITION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEdition(String edition) { + this.edition = edition; + } + + public SystemInformation subscriptionType(String subscriptionType) { + + this.subscriptionType = subscriptionType; + return this; + } + + /** + * type of the Subscription the customer has purchased with Bonitasoft - Subscription editions only + * + * @return subscriptionType + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubscriptionType() { + return subscriptionType; + } + + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_TYPE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubscriptionType(String subscriptionType) { + this.subscriptionType = subscriptionType; + } + + public SystemInformation licenseMode(String licenseMode) { + + this.licenseMode = licenseMode; + return this; + } + + /** + * available mode enabled by the license - Subscription editions only + * + * @return licenseMode + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LICENSE_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLicenseMode() { + return licenseMode; + } + + @JsonProperty(JSON_PROPERTY_LICENSE_MODE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLicenseMode(String licenseMode) { + this.licenseMode = licenseMode; + } + + public SystemInformation managedAppsLimit(Long managedAppsLimit) { + + this.managedAppsLimit = managedAppsLimit; + return this; + } + + /** + * number of managed apps provisioned for in a Bonita Central environment - Subscription editions only + * + * @return managedAppsLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_MANAGED_APPS_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getManagedAppsLimit() { + return managedAppsLimit; + } + + @JsonProperty(JSON_PROPERTY_MANAGED_APPS_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setManagedAppsLimit(Long managedAppsLimit) { + this.managedAppsLimit = managedAppsLimit; + } + + public SystemInformation licensee(String licensee) { + + this.licensee = licensee; + return this; + } + + /** + * Owner of the license - Subscription editions only + * + * @return licensee + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LICENSEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getLicensee() { + return licensee; + } + + @JsonProperty(JSON_PROPERTY_LICENSEE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setLicensee(String licensee) { + this.licensee = licensee; + } + + public SystemInformation contactInfo(String contactInfo) { + + this.contactInfo = contactInfo; + return this; + } + + /** + * E-mail address of the owner of the license - Subscription editions only + * + * @return contactInfo + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CONTACT_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getContactInfo() { + return contactInfo; + } + + @JsonProperty(JSON_PROPERTY_CONTACT_INFO) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setContactInfo(String contactInfo) { + this.contactInfo = contactInfo; + } + + public SystemInformation expirationDate(Long expirationDate) { + + this.expirationDate = expirationDate; + return this; + } + + /** + * License expiration date in milliseconds timestamp since Epoch - Subscription editions only + * + * @return expirationDate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getExpirationDate() { + return expirationDate; + } + + @JsonProperty(JSON_PROPERTY_EXPIRATION_DATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setExpirationDate(Long expirationDate) { + this.expirationDate = expirationDate; + } + + public SystemInformation activeFeatures(String activeFeatures) { + + this.activeFeatures = activeFeatures; + return this; + } + + /** + * List of active features that the license allow access to (separated by comma) - Subscription editions only + * + * @return activeFeatures + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ACTIVE_FEATURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getActiveFeatures() { + return activeFeatures; + } + + @JsonProperty(JSON_PROPERTY_ACTIVE_FEATURES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setActiveFeatures(String activeFeatures) { + this.activeFeatures = activeFeatures; + } + + public SystemInformation requestKey(String requestKey) { + + this.requestKey = requestKey; + return this; + } + + /** + * request key to use to generate a new license on the customer portal. If you have a subscription that specifies case-counter licensing, additional fields are + * present: + * + * @return requestKey + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_REQUEST_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getRequestKey() { + return requestKey; + } + + @JsonProperty(JSON_PROPERTY_REQUEST_KEY) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setRequestKey(String requestKey) { + this.requestKey = requestKey; + } + + public SystemInformation subscriptionStartPeriod(String subscriptionStartPeriod) { + + this.subscriptionStartPeriod = subscriptionStartPeriod; + return this; + } + + /** + * date in milliseconds timestamp since Epoch - first day (included) of current period for number of process instances provisioned - Subscription editions only + * + * @return subscriptionStartPeriod + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_START_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubscriptionStartPeriod() { + return subscriptionStartPeriod; + } + + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_START_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubscriptionStartPeriod(String subscriptionStartPeriod) { + this.subscriptionStartPeriod = subscriptionStartPeriod; + } + + public SystemInformation subscriptionEndPeriod(String subscriptionEndPeriod) { + + this.subscriptionEndPeriod = subscriptionEndPeriod; + return this; + } + + /** + * date in milliseconds timestamp since Epoch - last day (included) of current period for number of process instances provisioned - Subscription editions only + * + * @return subscriptionEndPeriod + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_END_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public String getSubscriptionEndPeriod() { + return subscriptionEndPeriod; + } + + @JsonProperty(JSON_PROPERTY_SUBSCRIPTION_END_PERIOD) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSubscriptionEndPeriod(String subscriptionEndPeriod) { + this.subscriptionEndPeriod = subscriptionEndPeriod; + } + + public SystemInformation caseCounterLimit(Long caseCounterLimit) { + + this.caseCounterLimit = caseCounterLimit; + return this; + } + + /** + * number of maximum process instances that can be started - Community & Subscription editions + * + * @return caseCounterLimit + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_COUNTER_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getCaseCounterLimit() { + return caseCounterLimit; + } + + @JsonProperty(JSON_PROPERTY_CASE_COUNTER_LIMIT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCaseCounterLimit(Long caseCounterLimit) { + this.caseCounterLimit = caseCounterLimit; + } + + public SystemInformation caseCounter(Long caseCounter) { + + this.caseCounter = caseCounter; + return this; + } + + /** + * number of consumed process instances - Community & Subscription editions + * + * @return caseCounter + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CASE_COUNTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + + public Long getCaseCounter() { + return caseCounter; + } + + @JsonProperty(JSON_PROPERTY_CASE_COUNTER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCaseCounter(Long caseCounter) { + this.caseCounter = caseCounter; + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SystemInformation systemInformation = (SystemInformation) o; + return Objects.equals(this.licenseStartDate, systemInformation.licenseStartDate) && + Objects.equals(this.duration, systemInformation.duration) && + Objects.equals(this.licenseExpirationDate, systemInformation.licenseExpirationDate) && + Objects.equals(this.numberOfCPUCores, systemInformation.numberOfCPUCores) && + Objects.equals(this.edition, systemInformation.edition) && + Objects.equals(this.subscriptionType, systemInformation.subscriptionType) && + Objects.equals(this.licenseMode, systemInformation.licenseMode) && + Objects.equals(this.managedAppsLimit, systemInformation.managedAppsLimit) && + Objects.equals(this.licensee, systemInformation.licensee) && + Objects.equals(this.contactInfo, systemInformation.contactInfo) && + Objects.equals(this.expirationDate, systemInformation.expirationDate) && + Objects.equals(this.activeFeatures, systemInformation.activeFeatures) && + Objects.equals(this.requestKey, systemInformation.requestKey) && + Objects.equals(this.subscriptionStartPeriod, systemInformation.subscriptionStartPeriod) && + Objects.equals(this.subscriptionEndPeriod, systemInformation.subscriptionEndPeriod) && + Objects.equals(this.caseCounterLimit, systemInformation.caseCounterLimit) && + Objects.equals(this.caseCounter, systemInformation.caseCounter); + } + + @Override + public int hashCode() { + return Objects.hash(licenseStartDate, duration, licenseExpirationDate, numberOfCPUCores, edition, + subscriptionType, licenseMode, managedAppsLimit, licensee, contactInfo, expirationDate, activeFeatures, + requestKey, subscriptionStartPeriod, subscriptionEndPeriod, caseCounterLimit, caseCounter); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class SystemInformation {\n"); + sb.append(" licenseStartDate: ").append(toIndentedString(licenseStartDate)).append("\n"); + sb.append(" duration: ").append(toIndentedString(duration)).append("\n"); + sb.append(" licenseExpirationDate: ").append(toIndentedString(licenseExpirationDate)).append("\n"); + sb.append(" numberOfCPUCores: ").append(toIndentedString(numberOfCPUCores)).append("\n"); + sb.append(" edition: ").append(toIndentedString(edition)).append("\n"); + sb.append(" subscriptionType: ").append(toIndentedString(subscriptionType)).append("\n"); + sb.append(" licenseMode: ").append(toIndentedString(licenseMode)).append("\n"); + sb.append(" managedAppsLimit: ").append(toIndentedString(managedAppsLimit)).append("\n"); + sb.append(" licensee: ").append(toIndentedString(licensee)).append("\n"); + sb.append(" contactInfo: ").append(toIndentedString(contactInfo)).append("\n"); + sb.append(" expirationDate: ").append(toIndentedString(expirationDate)).append("\n"); + sb.append(" activeFeatures: ").append(toIndentedString(activeFeatures)).append("\n"); + sb.append(" requestKey: ").append(toIndentedString(requestKey)).append("\n"); + sb.append(" subscriptionStartPeriod: ").append(toIndentedString(subscriptionStartPeriod)).append("\n"); + sb.append(" subscriptionEndPeriod: ").append(toIndentedString(subscriptionEndPeriod)).append("\n"); + sb.append(" caseCounterLimit: ").append(toIndentedString(caseCounterLimit)).append("\n"); + sb.append(" caseCounter: ").append(toIndentedString(caseCounter)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +}