diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b1f26ff..3aa1a7e 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -78,7 +78,6 @@ docs/DeleteApiKeyVM.md docs/DownloadApi.md docs/EmailTaskVM.md docs/EntityType.md -docs/EntityVM.md docs/ExportCreateAdminVM.md docs/ExportCreateVM.md docs/ExportFolderCreateVM.md @@ -375,7 +374,6 @@ src/main/java/cloud/fastreport/model/DefaultPermissionsVM.java src/main/java/cloud/fastreport/model/DeleteApiKeyVM.java src/main/java/cloud/fastreport/model/EmailTaskVM.java src/main/java/cloud/fastreport/model/EntityType.java -src/main/java/cloud/fastreport/model/EntityVM.java src/main/java/cloud/fastreport/model/ExportCreateAdminVM.java src/main/java/cloud/fastreport/model/ExportCreateVM.java src/main/java/cloud/fastreport/model/ExportFolderCreateVM.java @@ -630,7 +628,6 @@ src/test/java/cloud/fastreport/model/DefaultPermissionsVMTest.java src/test/java/cloud/fastreport/model/DeleteApiKeyVMTest.java src/test/java/cloud/fastreport/model/EmailTaskVMTest.java src/test/java/cloud/fastreport/model/EntityTypeTest.java -src/test/java/cloud/fastreport/model/EntityVMTest.java src/test/java/cloud/fastreport/model/ExportCreateAdminVMTest.java src/test/java/cloud/fastreport/model/ExportCreateVMTest.java src/test/java/cloud/fastreport/model/ExportFolderCreateVMTest.java diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 4b49d9b..8b23b8d 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -7.2.0 \ No newline at end of file +7.3.0 \ No newline at end of file diff --git a/README.md b/README.md index 7ff5863..a48d177 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Add this dependency to your project's POM: cloud.fastreport.sdk fastreport-cloud-sdk - 2024.1.20 + 2024.1.21 compile ``` @@ -44,7 +44,7 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "cloud.fastreport.sdk:fastreport-cloud-sdk:2024.1.20" +compile "cloud.fastreport.sdk:fastreport-cloud-sdk:2024.1.21" ``` ### Others @@ -57,7 +57,7 @@ mvn clean package Then manually install the following JARs: -- `target/fastreport-cloud-sdk-2024.1.20.jar` +- `target/fastreport-cloud-sdk-2024.1.21.jar` - `target/lib/*.jar` ## Getting Started @@ -398,7 +398,6 @@ Class | Method | HTTP request | Description - [DeleteApiKeyVM](docs/DeleteApiKeyVM.md) - [EmailTaskVM](docs/EmailTaskVM.md) - [EntityType](docs/EntityType.md) - - [EntityVM](docs/EntityVM.md) - [ExportCreateAdminVM](docs/ExportCreateAdminVM.md) - [ExportCreateVM](docs/ExportCreateVM.md) - [ExportFolderCreateVM](docs/ExportFolderCreateVM.md) diff --git a/VERSION b/VERSION index 56a76e8..b733f9f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2024.1.20 \ No newline at end of file +2024.1.21 \ No newline at end of file diff --git a/api/openapi.yaml b/api/openapi.yaml index b934c77..eea8700 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1484,7 +1484,7 @@ paths: summary: Returns export's thumbnail tags: - Download - x-accepts: application/json + x-accepts: "application/json,image/jpeg,image/png,text/plain" /download/e/{id}: get: operationId: Download_GetExport @@ -1591,7 +1591,7 @@ paths: summary: Returns a export file with specified id tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/octet-stream,application/pdf,text/plain" /download/es/{archiveName}: get: operationId: Download_GetExports @@ -1688,7 +1688,7 @@ paths: summary: Returns a zip archive with selected ids tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/zip,text/plain" /download/lastPreview/{reportId}: get: operationId: Download_GetLastSVGExport @@ -1769,7 +1769,7 @@ paths: INTERNAL USAGE ONLY!" tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/octet-stream,text/plain" /download/r/{id}/thumbnail: get: operationId: Download_GetReportThumbnail @@ -1867,7 +1867,7 @@ paths: summary: Returns report's thumbnail tags: - Download - x-accepts: application/json + x-accepts: "application/json,image/jpeg,image/png,text/plain" /download/r/{id}: get: operationId: Download_GetReport @@ -1949,7 +1949,7 @@ paths: summary: Returns a prepared file with specified id tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/octet-stream,text/plain" /download/rs/{archiveName}: get: operationId: Download_GetReports @@ -2045,7 +2045,7 @@ paths: summary: Returns a zip archive with selected files tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/zip,text/plain" /download/t/{id}/thumbnail: get: operationId: Download_GetTemplateThumbnail @@ -2143,7 +2143,7 @@ paths: summary: Returns template's thumbnail tags: - Download - x-accepts: application/json + x-accepts: "application/json,image/jpeg,image/png,text/plain" /download/t/{id}: get: operationId: Download_GetTemplate @@ -2225,7 +2225,7 @@ paths: summary: Returns a Template file with specified id tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/octet-stream,text/plain" /download/ts/{archiveName}: get: operationId: Download_GetTemplates @@ -2321,7 +2321,7 @@ paths: summary: Returns a zip archive with selected files tags: - Download - x-accepts: application/json + x-accepts: "application/json,application/zip,text/plain" /api/rp/v1/Exports/Folder/{id}/CountFolderAndFiles: get: description: User with a Get Count permission can access this method. @@ -13081,6 +13081,13 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FolderCreateVM' + discriminator: + mapping: + AdminFolderCreateVM: '#/components/schemas/AdminFolderCreateVM' + AdminExportFolderCreateVM: '#/components/schemas/AdminExportFolderCreateVM' + AdminReportFolderCreateVM: '#/components/schemas/AdminReportFolderCreateVM' + AdminTemplateFolderCreateVM: '#/components/schemas/AdminTemplateFolderCreateVM' + propertyName: $t properties: parentId: minLength: 1 @@ -13092,7 +13099,10 @@ components: type: string force: type: boolean + $t: + type: string required: + - $t - ownerId - parentId type: object @@ -13680,8 +13690,14 @@ components: type: object CreateDataSourceVM: additionalProperties: false + discriminator: + mapping: + CreateDataSourceAdminVM: '#/components/schemas/CreateDataSourceAdminVM' + CreateDataSourceVM: '#/components/schemas/CreateDataSourceVM' + propertyName: $t example: connectionString: connectionString + $t: $t name: name subscriptionId: subscriptionId connectionType: null @@ -13701,7 +13717,10 @@ components: type: string connectionType: $ref: '#/components/schemas/DataSourceConnectionType' + $t: + type: string required: + - $t - connectionString - subscriptionId type: object @@ -13852,7 +13871,13 @@ components: type: object CreateGroupVM: additionalProperties: false + discriminator: + mapping: + CreateGroupAdminVM: '#/components/schemas/CreateGroupAdminVM' + CreateGroupVM: '#/components/schemas/CreateGroupVM' + propertyName: $t example: + $t: $t name: name subscriptionId: subscriptionId properties: @@ -13864,7 +13889,10 @@ components: nullable: true pattern: "^[A-Fa-f0-9]{24}$" type: string + $t: + type: string required: + - $t - name type: object CreatePrepareTemplateTaskVM: @@ -14141,6 +14169,13 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/DataSourceCreateDataSourceGetDataSourceUpdateDataSourceDeleteDataSourceExecuteDataSourceAdministratePermission' + example: + get: null + create: null + update: null + administrate: null + delete: null + execute: null type: object ? DataSourcePermissionDataSourceCreateDataSourceGetDataSourceUpdateDataSourceDeleteDataSourceExecuteDataSourceAdministratePermissions : additionalProperties: false @@ -14166,11 +14201,72 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/DataSourcePermissionDataSourceCreateDataSourceGetDataSourceUpdateDataSourceDeleteDataSourceExecuteDataSourceAdministratePermissions' + example: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId type: object DataSourcePermissionsVM: additionalProperties: false example: - permissions: null + permissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: permissions: $ref: '#/components/schemas/DataSourcePermissions' @@ -14310,10 +14406,130 @@ components: DefaultPermissionsVM: additionalProperties: false example: - taskPermissions: null - groupPermissions: null - filePermissions: null - dataSourcePermissions: null + taskPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId + groupPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId + filePermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId + dataSourcePermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: filePermissions: $ref: '#/components/schemas/FilePermissions' @@ -14392,36 +14608,6 @@ components: - ExportFolder type: string x-typeName: FastReport.Cloud.Base.Enums.EntityType - EntityVM: - additionalProperties: false - discriminator: - mapping: - ExportVM: '#/components/schemas/ExportVM' - FileVM: '#/components/schemas/FileVM' - ReportVM: '#/components/schemas/ReportVM' - TemplateVM: '#/components/schemas/TemplateVM' - propertyName: $t - properties: - id: - nullable: true - type: string - createdTime: - format: date-time - type: string - creatorUserId: - nullable: true - type: string - editedTime: - format: date-time - type: string - editorUserId: - nullable: true - type: string - $t: - type: string - required: - - $t - type: object ExportCreateAdminVM: additionalProperties: false allOf: @@ -14443,6 +14629,11 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FileCreateVM' + discriminator: + mapping: + ExportCreateVM: '#/components/schemas/ExportCreateVM' + ExportCreateAdminVM: '#/components/schemas/ExportCreateAdminVM' + propertyName: $t properties: templateId: nullable: true @@ -14452,11 +14643,23 @@ components: nullable: true pattern: "(^$)|(^[A-Fa-f0-9]{24}$)" type: string + $t: + type: string + required: + - $t type: object ExportFolderCreateVM: additionalProperties: false allOf: - $ref: '#/components/schemas/FolderCreateVM' + example: + $t: $t + name: name + icon: icon + tags: + - tags + - tags + - tags type: object ExportFormat: enum: @@ -14656,6 +14859,17 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/ExportVMFilesVMBase' + example: + take: 1 + count: 0 + files: + - reportId: reportId + format: null + templateId: templateId + - reportId: reportId + format: null + templateId: templateId + skip: 6 type: object FTPUploadTaskVM: additionalProperties: false @@ -14745,6 +14959,16 @@ components: type: object FileCreateVM: additionalProperties: false + discriminator: + mapping: + ExportCreateVM: '#/components/schemas/ExportCreateVM' + FileCreateVM: '#/components/schemas/FileCreateVM' + ReportCreateVM: '#/components/schemas/ReportCreateVM' + TemplateCreateVM: '#/components/schemas/TemplateCreateVM' + TemplateCreateAdminVM: '#/components/schemas/TemplateCreateAdminVM' + ReportCreateAdminVM: '#/components/schemas/ReportCreateAdminVM' + ExportCreateAdminVM: '#/components/schemas/ExportCreateAdminVM' + propertyName: $t properties: name: maxLength: 250 @@ -14769,6 +14993,10 @@ components: maxLength: 100000000 nullable: true type: string + $t: + type: string + required: + - $t type: object FileDelete: enum: @@ -14848,6 +15076,13 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FileCreateFileGetFileUpdateFileDeleteFileExecuteFileAdministratePermission' + example: + get: null + create: null + update: null + administrate: null + delete: null + execute: null type: object FilePermissionFileCreateFileGetFileUpdateFileDeleteFileExecuteFileAdministratePermissions: additionalProperties: false @@ -14873,11 +15108,72 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FilePermissionFileCreateFileGetFileUpdateFileDeleteFileExecuteFileAdministratePermissions' + example: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId type: object FilePermissionsVM: additionalProperties: false example: - permissions: null + permissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: permissions: $ref: '#/components/schemas/FilePermissions' @@ -14968,8 +15264,6 @@ components: x-typeName: FastReport.Cloud.Enums.FilePermissionsEnums.FileUpdate FileVM: additionalProperties: false - allOf: - - $ref: '#/components/schemas/EntityVM' discriminator: mapping: ExportVM: '#/components/schemas/ExportVM' @@ -14978,21 +15272,41 @@ components: TemplateVM: '#/components/schemas/TemplateVM' propertyName: $t example: - $t: $t - statusReason: null - size: 0 - isDeleted: true - name: name + creatorUserId: creatorUserId icon: icon errorMessage: errorMessage type: null - subscriptionId: subscriptionId parentId: parentId tags: - tags - tags + $t: $t + editedTime: 2000-01-23T04:56:07.000+00:00 + statusReason: null + size: 0 + isDeleted: true + editorUserId: editorUserId + name: name + createdTime: 2000-01-23T04:56:07.000+00:00 + id: id + subscriptionId: subscriptionId status: null properties: + id: + nullable: true + type: string + createdTime: + format: date-time + type: string + creatorUserId: + nullable: true + type: string + editedTime: + format: date-time + type: string + editorUserId: + nullable: true + type: string name: nullable: true type: string @@ -15052,9 +15366,63 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FileVMFilesVMBase' + example: + take: 5 + count: 6 + files: + - creatorUserId: creatorUserId + icon: icon + errorMessage: errorMessage + type: null + parentId: parentId + tags: + - tags + - tags + $t: $t + editedTime: 2000-01-23T04:56:07.000+00:00 + statusReason: null + size: 0 + isDeleted: true + editorUserId: editorUserId + name: name + createdTime: 2000-01-23T04:56:07.000+00:00 + id: id + subscriptionId: subscriptionId + status: null + - creatorUserId: creatorUserId + icon: icon + errorMessage: errorMessage + type: null + parentId: parentId + tags: + - tags + - tags + $t: $t + editedTime: 2000-01-23T04:56:07.000+00:00 + statusReason: null + size: 0 + isDeleted: true + editorUserId: editorUserId + name: name + createdTime: 2000-01-23T04:56:07.000+00:00 + id: id + subscriptionId: subscriptionId + status: null + skip: 1 type: object FolderCreateVM: additionalProperties: false + discriminator: + mapping: + AdminFolderCreateVM: '#/components/schemas/AdminFolderCreateVM' + ExportFolderCreateVM: '#/components/schemas/ExportFolderCreateVM' + FolderCreateVM: '#/components/schemas/FolderCreateVM' + ReportFolderCreateVM: '#/components/schemas/ReportFolderCreateVM' + TemplateFolderCreateVM: '#/components/schemas/TemplateFolderCreateVM' + AdminExportFolderCreateVM: '#/components/schemas/AdminExportFolderCreateVM' + AdminReportFolderCreateVM: '#/components/schemas/AdminReportFolderCreateVM' + AdminTemplateFolderCreateVM: '#/components/schemas/AdminTemplateFolderCreateVM' + propertyName: $t properties: name: maxLength: 250 @@ -15074,6 +15442,10 @@ components: maxLength: 65536 nullable: true type: string + $t: + type: string + required: + - $t type: object FolderIconVM: additionalProperties: false @@ -15238,6 +15610,13 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/GroupCreateGroupGetGroupUpdateGroupDeleteGroupExecuteGroupAdministratePermission' + example: + get: null + create: null + update: null + administrate: null + delete: null + execute: null type: object GroupPermissionGroupCreateGroupGetGroupUpdateGroupDeleteGroupExecuteGroupAdministratePermissions: additionalProperties: false @@ -15263,11 +15642,72 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/GroupPermissionGroupCreateGroupGetGroupUpdateGroupDeleteGroupExecuteGroupAdministratePermissions' + example: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId type: object GroupPermissionsVM: additionalProperties: false example: - permissions: null + permissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: permissions: $ref: '#/components/schemas/GroupPermissions' @@ -15404,11 +15844,41 @@ components: MyPermissionsVM: additionalProperties: false example: - datasources: null - files: null - groups: null - subscription: null - tasks: null + datasources: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + files: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + subscription: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + tasks: + get: null + create: null + update: null + administrate: null + delete: null + execute: null properties: subscription: $ref: '#/components/schemas/SubscriptionPermission' @@ -15539,6 +16009,12 @@ components: type: object ProblemDetails: additionalProperties: {} + example: + instance: instance + detail: detail + type: type + title: title + status: 6 properties: type: nullable: true @@ -15629,18 +16105,36 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FileCreateVM' + discriminator: + mapping: + ReportCreateVM: '#/components/schemas/ReportCreateVM' + ReportCreateAdminVM: '#/components/schemas/ReportCreateAdminVM' + propertyName: $t example: + $t: $t templateId: templateId properties: templateId: nullable: true pattern: "(^$)|(^[A-Fa-f0-9]{24}$)" type: string + $t: + type: string + required: + - $t type: object ReportFolderCreateVM: additionalProperties: false allOf: - $ref: '#/components/schemas/FolderCreateVM' + example: + $t: $t + name: name + icon: icon + tags: + - tags + - tags + - tags type: object ReportInfo: additionalProperties: false @@ -15742,6 +16236,39 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/ReportVMFilesVMBase' + example: + take: 1 + count: 0 + files: + - reportInfo: + saveMode: null + author: author + created: 2000-01-23T04:56:07.000+00:00 + name: name + description: description + modified: 2000-01-23T04:56:07.000+00:00 + previewPictureRatio: 0.8008282 + tag: tag + savePreviewPicture: true + version: version + creatorVersion: creatorVersion + picture: picture + templateId: templateId + - reportInfo: + saveMode: null + author: author + created: 2000-01-23T04:56:07.000+00:00 + name: name + description: description + modified: 2000-01-23T04:56:07.000+00:00 + previewPictureRatio: 0.8008282 + tag: tag + savePreviewPicture: true + version: version + creatorVersion: creatorVersion + picture: picture + templateId: templateId + skip: 6 type: object RunEmailTaskVM: additionalProperties: false @@ -16416,6 +16943,13 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/SubscriptionCreateSubscriptionGetSubscriptionUpdateSubscriptionDeleteSubscriptionExecuteSubscriptionAdministratePermission' + example: + get: null + create: null + update: null + administrate: null + delete: null + execute: null type: object ? SubscriptionPermissionSubscriptionCreateSubscriptionGetSubscriptionUpdateSubscriptionDeleteSubscriptionExecuteSubscriptionAdministratePermissions : additionalProperties: false @@ -16441,11 +16975,72 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/SubscriptionPermissionSubscriptionCreateSubscriptionGetSubscriptionUpdateSubscriptionDeleteSubscriptionExecuteSubscriptionAdministratePermissions' + example: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId type: object SubscriptionPermissionsVM: additionalProperties: false example: - permissions: null + permissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: permissions: $ref: '#/components/schemas/SubscriptionPermissions' @@ -16714,10 +17309,16 @@ components: type: object SubscriptionVM: additionalProperties: false + discriminator: + mapping: + SubscriptionVM: '#/components/schemas/SubscriptionVM' + AdminSubscriptionVM: '#/components/schemas/AdminSubscriptionVM' + propertyName: $t example: exportsFolder: bytesUsed: 0 folderId: folderId + $t: $t current: startTime: 2000-01-23T04:56:07.000+00:00 endTime: 2000-01-23T04:56:07.000+00:00 @@ -16848,6 +17449,10 @@ components: $ref: '#/components/schemas/SubscriptionFolder' exportsFolder: $ref: '#/components/schemas/SubscriptionFolder' + $t: + type: string + required: + - $t type: object SubscriptionsVM: additionalProperties: false @@ -16857,6 +17462,7 @@ components: - exportsFolder: bytesUsed: 0 folderId: folderId + $t: $t current: startTime: 2000-01-23T04:56:07.000+00:00 endTime: 2000-01-23T04:56:07.000+00:00 @@ -16967,6 +17573,7 @@ components: - exportsFolder: bytesUsed: 0 folderId: folderId + $t: $t current: startTime: 2000-01-23T04:56:07.000+00:00 endTime: 2000-01-23T04:56:07.000+00:00 @@ -17247,6 +17854,13 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/TaskCreateTaskGetTaskUpdateTaskDeleteTaskExecuteTaskAdministratePermission' + example: + get: null + create: null + update: null + administrate: null + delete: null + execute: null type: object TaskPermissionTaskCreateTaskGetTaskUpdateTaskDeleteTaskExecuteTaskAdministratePermissions: additionalProperties: false @@ -17272,11 +17886,72 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/TaskPermissionTaskCreateTaskGetTaskUpdateTaskDeleteTaskExecuteTaskAdministratePermissions' + example: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId type: object TaskPermissionsVM: additionalProperties: false example: - permissions: null + permissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: permissions: $ref: '#/components/schemas/TaskPermissions' @@ -17399,11 +18074,31 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/FileCreateVM' + discriminator: + mapping: + TemplateCreateVM: '#/components/schemas/TemplateCreateVM' + TemplateCreateAdminVM: '#/components/schemas/TemplateCreateAdminVM' + propertyName: $t + example: + $t: $t + properties: + $t: + type: string + required: + - $t type: object TemplateFolderCreateVM: additionalProperties: false allOf: - $ref: '#/components/schemas/FolderCreateVM' + example: + $t: $t + name: name + icon: icon + tags: + - tags + - tags + - tags type: object TemplateVM: additionalProperties: false @@ -17449,6 +18144,37 @@ components: additionalProperties: false allOf: - $ref: '#/components/schemas/TemplateVMFilesVMBase' + example: + take: 1 + count: 0 + files: + - reportInfo: + saveMode: null + author: author + created: 2000-01-23T04:56:07.000+00:00 + name: name + description: description + modified: 2000-01-23T04:56:07.000+00:00 + previewPictureRatio: 0.8008282 + tag: tag + savePreviewPicture: true + version: version + creatorVersion: creatorVersion + picture: picture + - reportInfo: + saveMode: null + author: author + created: 2000-01-23T04:56:07.000+00:00 + name: name + description: description + modified: 2000-01-23T04:56:07.000+00:00 + previewPictureRatio: 0.8008282 + tag: tag + savePreviewPicture: true + version: version + creatorVersion: creatorVersion + picture: picture + skip: 6 type: object ThumbnailReportTaskVM: additionalProperties: false @@ -17587,7 +18313,37 @@ components: UpdateDataSourcePermissionsVM: additionalProperties: false example: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null properties: newPermissions: @@ -17615,15 +18371,135 @@ components: example: taskPermissions: administrate: null - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId groupPermissions: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null filePermissions: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null dataSourcePermissions: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null properties: filePermissions: @@ -17795,7 +18671,37 @@ components: UpdateFilePermissionsVM: additionalProperties: false example: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null properties: newPermissions: @@ -17809,7 +18715,37 @@ components: UpdateGroupPermissionsVM: additionalProperties: false example: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null properties: newPermissions: @@ -17860,7 +18796,37 @@ components: UpdateSubscriptionPermissionsVM: additionalProperties: false example: - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId administrate: null properties: newPermissions: @@ -17913,7 +18879,37 @@ components: additionalProperties: false example: administrate: null - newPermissions: null + newPermissions: + owner: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + anon: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + other: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + groups: + key: + get: null + create: null + update: null + administrate: null + delete: null + execute: null + ownerId: ownerId properties: administrate: $ref: '#/components/schemas/TaskAdministrate' diff --git a/build.gradle b/build.gradle index 4114068..801ccef 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'cloud.fastreport.sdk' -version = '2024.1.20' +version = '2024.1.21' buildscript { repositories { diff --git a/build.sbt b/build.sbt index 4a01750..65e8314 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "cloud.fastreport.sdk", name := "fastreport-cloud-sdk", - version := "2024.1.20", + version := "2024.1.21", scalaVersion := "2.11.4", scalacOptions ++= Seq("-feature"), javacOptions in compile ++= Seq("-Xlint:deprecation"), diff --git a/docs/AdminExportFolderCreateVM.md b/docs/AdminExportFolderCreateVM.md index 0db318e..1376c0b 100644 --- a/docs/AdminExportFolderCreateVM.md +++ b/docs/AdminExportFolderCreateVM.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | diff --git a/docs/AdminFolderCreateVM.md b/docs/AdminFolderCreateVM.md index f81dcb1..2a53712 100644 --- a/docs/AdminFolderCreateVM.md +++ b/docs/AdminFolderCreateVM.md @@ -10,9 +10,7 @@ |**parentId** | **String** | | | |**ownerId** | **String** | | | |**force** | **Boolean** | | [optional] | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/AdminReportFolderCreateVM.md b/docs/AdminReportFolderCreateVM.md index d4a8a84..953534f 100644 --- a/docs/AdminReportFolderCreateVM.md +++ b/docs/AdminReportFolderCreateVM.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | diff --git a/docs/AdminSubscriptionVM.md b/docs/AdminSubscriptionVM.md index f853a88..6e278f9 100644 --- a/docs/AdminSubscriptionVM.md +++ b/docs/AdminSubscriptionVM.md @@ -9,14 +9,6 @@ |------------ | ------------- | ------------- | -------------| |**defaultPermissions** | [**DefaultPermissionsVM**](DefaultPermissionsVM.md) | | [optional] | |**ownerId** | **String** | | [optional] | -|**id** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**locale** | **String** | | [optional] | -|**current** | [**SubscriptionPeriodVM**](SubscriptionPeriodVM.md) | | [optional] | -|**old** | [**List<SubscriptionPeriodVM>**](SubscriptionPeriodVM.md) | | [optional] | -|**templatesFolder** | [**SubscriptionFolder**](SubscriptionFolder.md) | | [optional] | -|**reportsFolder** | [**SubscriptionFolder**](SubscriptionFolder.md) | | [optional] | -|**exportsFolder** | [**SubscriptionFolder**](SubscriptionFolder.md) | | [optional] | diff --git a/docs/AdminTemplateFolderCreateVM.md b/docs/AdminTemplateFolderCreateVM.md index 6b4e438..5ef3b1b 100644 --- a/docs/AdminTemplateFolderCreateVM.md +++ b/docs/AdminTemplateFolderCreateVM.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | diff --git a/docs/CreateDataSourceAdminVM.md b/docs/CreateDataSourceAdminVM.md index 1ea725a..d3cf881 100644 --- a/docs/CreateDataSourceAdminVM.md +++ b/docs/CreateDataSourceAdminVM.md @@ -8,10 +8,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**ownerId** | **String** | | | -|**name** | **String** | | [optional] | -|**connectionString** | **String** | | | -|**subscriptionId** | **String** | | | -|**connectionType** | **DataSourceConnectionType** | | [optional] | diff --git a/docs/CreateDataSourceVM.md b/docs/CreateDataSourceVM.md index b6f98aa..72be1c0 100644 --- a/docs/CreateDataSourceVM.md +++ b/docs/CreateDataSourceVM.md @@ -11,6 +11,7 @@ |**connectionString** | **String** | | | |**subscriptionId** | **String** | | | |**connectionType** | **DataSourceConnectionType** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/CreateGroupAdminVM.md b/docs/CreateGroupAdminVM.md index 388a7f9..268f242 100644 --- a/docs/CreateGroupAdminVM.md +++ b/docs/CreateGroupAdminVM.md @@ -8,8 +8,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**ownerId** | **String** | | [optional] | -|**name** | **String** | | | -|**subscriptionId** | **String** | | [optional] | diff --git a/docs/CreateGroupVM.md b/docs/CreateGroupVM.md index ae95dd7..fcf2eed 100644 --- a/docs/CreateGroupVM.md +++ b/docs/CreateGroupVM.md @@ -9,6 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**name** | **String** | | | |**subscriptionId** | **String** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/EntityVM.md b/docs/EntityVM.md deleted file mode 100644 index 71bce14..0000000 --- a/docs/EntityVM.md +++ /dev/null @@ -1,18 +0,0 @@ - - -# EntityVM - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**id** | **String** | | [optional] | -|**createdTime** | **OffsetDateTime** | | [optional] | -|**creatorUserId** | **String** | | [optional] | -|**editedTime** | **OffsetDateTime** | | [optional] | -|**editorUserId** | **String** | | [optional] | -|**$t** | **String** | | | - - - diff --git a/docs/ExportCreateAdminVM.md b/docs/ExportCreateAdminVM.md index 9f9d21f..05bd47e 100644 --- a/docs/ExportCreateAdminVM.md +++ b/docs/ExportCreateAdminVM.md @@ -9,10 +9,6 @@ |------------ | ------------- | ------------- | -------------| |**ownerId** | **String** | | | |**parentId** | **String** | | | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | -|**content** | **byte[]** | | [optional] | diff --git a/docs/ExportCreateVM.md b/docs/ExportCreateVM.md index 8049ddb..9d61e20 100644 --- a/docs/ExportCreateVM.md +++ b/docs/ExportCreateVM.md @@ -9,10 +9,7 @@ |------------ | ------------- | ------------- | -------------| |**templateId** | **String** | | [optional] | |**reportId** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | -|**content** | **byte[]** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/ExportFolderCreateVM.md b/docs/ExportFolderCreateVM.md index 3c66736..f12e62b 100644 --- a/docs/ExportFolderCreateVM.md +++ b/docs/ExportFolderCreateVM.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | diff --git a/docs/FileCreateVM.md b/docs/FileCreateVM.md index 19a8dd5..878bda4 100644 --- a/docs/FileCreateVM.md +++ b/docs/FileCreateVM.md @@ -11,6 +11,7 @@ |**tags** | **List<String>** | | [optional] | |**icon** | **byte[]** | | [optional] | |**content** | **byte[]** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/FileVM.md b/docs/FileVM.md index b0eeb34..56da036 100644 --- a/docs/FileVM.md +++ b/docs/FileVM.md @@ -7,6 +7,11 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| +|**id** | **String** | | [optional] | +|**createdTime** | **OffsetDateTime** | | [optional] | +|**creatorUserId** | **String** | | [optional] | +|**editedTime** | **OffsetDateTime** | | [optional] | +|**editorUserId** | **String** | | [optional] | |**name** | **String** | | [optional] | |**parentId** | **String** | | [optional] | |**tags** | **List<String>** | | [optional] | diff --git a/docs/FolderCreateVM.md b/docs/FolderCreateVM.md index 13447e8..4607dea 100644 --- a/docs/FolderCreateVM.md +++ b/docs/FolderCreateVM.md @@ -10,6 +10,7 @@ |**name** | **String** | | [optional] | |**tags** | **List<String>** | | [optional] | |**icon** | **byte[]** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/ReportCreateAdminVM.md b/docs/ReportCreateAdminVM.md index 0ad6b85..9832bfd 100644 --- a/docs/ReportCreateAdminVM.md +++ b/docs/ReportCreateAdminVM.md @@ -9,10 +9,6 @@ |------------ | ------------- | ------------- | -------------| |**ownerId** | **String** | | | |**parentId** | **String** | | | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | -|**content** | **byte[]** | | [optional] | diff --git a/docs/ReportCreateVM.md b/docs/ReportCreateVM.md index 48320c9..eeecb1b 100644 --- a/docs/ReportCreateVM.md +++ b/docs/ReportCreateVM.md @@ -8,10 +8,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**templateId** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | -|**content** | **byte[]** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/ReportFolderCreateVM.md b/docs/ReportFolderCreateVM.md index 3743a3f..24ba48a 100644 --- a/docs/ReportFolderCreateVM.md +++ b/docs/ReportFolderCreateVM.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | diff --git a/docs/SubscriptionVM.md b/docs/SubscriptionVM.md index b548b03..a6be379 100644 --- a/docs/SubscriptionVM.md +++ b/docs/SubscriptionVM.md @@ -15,6 +15,7 @@ |**templatesFolder** | [**SubscriptionFolder**](SubscriptionFolder.md) | | [optional] | |**reportsFolder** | [**SubscriptionFolder**](SubscriptionFolder.md) | | [optional] | |**exportsFolder** | [**SubscriptionFolder**](SubscriptionFolder.md) | | [optional] | +|**$t** | **String** | | | diff --git a/docs/TemplateCreateAdminVM.md b/docs/TemplateCreateAdminVM.md index 6dfe8f9..57a488c 100644 --- a/docs/TemplateCreateAdminVM.md +++ b/docs/TemplateCreateAdminVM.md @@ -9,10 +9,6 @@ |------------ | ------------- | ------------- | -------------| |**ownerId** | **String** | | | |**parentId** | **String** | | | -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | -|**content** | **byte[]** | | [optional] | diff --git a/docs/TemplateCreateVM.md b/docs/TemplateCreateVM.md index 95e98f8..1cd6156 100644 --- a/docs/TemplateCreateVM.md +++ b/docs/TemplateCreateVM.md @@ -7,10 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | -|**content** | **byte[]** | | [optional] | +|**$t** | **String** | | | diff --git a/docs/TemplateFolderCreateVM.md b/docs/TemplateFolderCreateVM.md index eccd09b..46f709a 100644 --- a/docs/TemplateFolderCreateVM.md +++ b/docs/TemplateFolderCreateVM.md @@ -7,9 +7,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**name** | **String** | | [optional] | -|**tags** | **List<String>** | | [optional] | -|**icon** | **byte[]** | | [optional] | diff --git a/pom.xml b/pom.xml index a090055..f05438b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ fastreport-cloud-sdk jar fastreport-cloud-sdk - 2024.1.20 + 2024.1.21 https://github.com/FastReports/FastReport-Cloud-Java FastReport Cloud SDK diff --git a/src/main/java/cloud/fastreport/ApiClient.java b/src/main/java/cloud/fastreport/ApiClient.java index d69113a..c2857ee 100644 --- a/src/main/java/cloud/fastreport/ApiClient.java +++ b/src/main/java/cloud/fastreport/ApiClient.java @@ -143,7 +143,7 @@ private void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/2024.1.20/java"); + setUserAgent("OpenAPI-Generator/2024.1.21/java"); authentications = new HashMap(); } diff --git a/src/main/java/cloud/fastreport/ApiException.java b/src/main/java/cloud/fastreport/ApiException.java index 45b996e..a2bcd27 100644 --- a/src/main/java/cloud/fastreport/ApiException.java +++ b/src/main/java/cloud/fastreport/ApiException.java @@ -23,6 +23,8 @@ @SuppressWarnings("serial") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class ApiException extends Exception { + private static final long serialVersionUID = 1L; + private int code = 0; private Map> responseHeaders = null; private String responseBody = null; diff --git a/src/main/java/cloud/fastreport/Configuration.java b/src/main/java/cloud/fastreport/Configuration.java index 56c3f16..7e18ff2 100644 --- a/src/main/java/cloud/fastreport/Configuration.java +++ b/src/main/java/cloud/fastreport/Configuration.java @@ -15,7 +15,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "2024.1.20"; + public static final String VERSION = "2024.1.21"; private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/cloud/fastreport/JSON.java b/src/main/java/cloud/fastreport/JSON.java index 0384d51..02804a9 100644 --- a/src/main/java/cloud/fastreport/JSON.java +++ b/src/main/java/cloud/fastreport/JSON.java @@ -13,11 +13,11 @@ package cloud.fastreport; +import com.fasterxml.jackson.databind.util.StdDateFormat; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonParseException; import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import com.google.gson.JsonElement; @@ -31,14 +31,16 @@ import java.lang.reflect.Type; import java.text.DateFormat; import java.text.ParseException; -import java.text.ParsePosition; import java.time.LocalDate; import java.time.OffsetDateTime; +import java.time.ZoneId; +import java.time.ZoneOffset; import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Locale; import java.util.Map; import java.util.HashMap; +import java.util.TimeZone; /* * A JSON utility class @@ -55,9 +57,63 @@ public class JSON { private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); + private static final StdDateFormat sdf = new StdDateFormat() + .withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault())) + .withColonInTimeZone(true); + private static final DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME; + @SuppressWarnings("unchecked") public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() + .registerTypeSelector(cloud.fastreport.model.AdminExportFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminExportFolderCreateVM", cloud.fastreport.model.AdminExportFolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.AdminFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminExportFolderCreateVM", cloud.fastreport.model.AdminExportFolderCreateVM.class); + classByDiscriminatorValue.put("AdminFolderCreateVM", cloud.fastreport.model.AdminFolderCreateVM.class); + classByDiscriminatorValue.put("AdminReportFolderCreateVM", cloud.fastreport.model.AdminReportFolderCreateVM.class); + classByDiscriminatorValue.put("AdminTemplateFolderCreateVM", cloud.fastreport.model.AdminTemplateFolderCreateVM.class); + classByDiscriminatorValue.put("AdminFolderCreateVM", cloud.fastreport.model.AdminFolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.AdminReportFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminReportFolderCreateVM", cloud.fastreport.model.AdminReportFolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.AdminSubscriptionVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminSubscriptionVM", cloud.fastreport.model.AdminSubscriptionVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.AdminTemplateFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminTemplateFolderCreateVM", cloud.fastreport.model.AdminTemplateFolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) .registerTypeSelector(cloud.fastreport.model.AuditActionVM.class, new TypeSelector() { @Override public Class getClassForElement(JsonElement readElement) { @@ -96,6 +152,26 @@ public Class getClassForElem return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.CreateDataSourceAdminVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("CreateDataSourceAdminVM", cloud.fastreport.model.CreateDataSourceAdminVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.CreateDataSourceVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("CreateDataSourceAdminVM", cloud.fastreport.model.CreateDataSourceAdminVM.class); + classByDiscriminatorValue.put("CreateDataSourceVM", cloud.fastreport.model.CreateDataSourceVM.class); + classByDiscriminatorValue.put("CreateDataSourceVM", cloud.fastreport.model.CreateDataSourceVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.CreateEmailTaskVM.class, new TypeSelector() { @Override @@ -143,6 +219,26 @@ public Class getClassForElem return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.CreateGroupAdminVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("CreateGroupAdminVM", cloud.fastreport.model.CreateGroupAdminVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.CreateGroupVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("CreateGroupAdminVM", cloud.fastreport.model.CreateGroupAdminVM.class); + classByDiscriminatorValue.put("CreateGroupVM", cloud.fastreport.model.CreateGroupVM.class); + classByDiscriminatorValue.put("CreateGroupVM", cloud.fastreport.model.CreateGroupVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.CreatePrepareTemplateTaskVM.class, new TypeSelector() { @Override @@ -233,15 +329,31 @@ public Class getClassForElement(Js getDiscriminatorValue(readElement, "$t")); } }) - .registerTypeSelector(cloud.fastreport.model.EntityVM.class, new TypeSelector() { + .registerTypeSelector(cloud.fastreport.model.ExportCreateAdminVM.class, new TypeSelector() { @Override - public Class getClassForElement(JsonElement readElement) { + public Class getClassForElement(JsonElement readElement) { Map classByDiscriminatorValue = new HashMap(); - classByDiscriminatorValue.put("ExportVM", cloud.fastreport.model.ExportVM.class); - classByDiscriminatorValue.put("FileVM", cloud.fastreport.model.FileVM.class); - classByDiscriminatorValue.put("ReportVM", cloud.fastreport.model.ReportVM.class); - classByDiscriminatorValue.put("TemplateVM", cloud.fastreport.model.TemplateVM.class); - classByDiscriminatorValue.put("EntityVM", cloud.fastreport.model.EntityVM.class); + classByDiscriminatorValue.put("ExportCreateAdminVM", cloud.fastreport.model.ExportCreateAdminVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.ExportCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("ExportCreateAdminVM", cloud.fastreport.model.ExportCreateAdminVM.class); + classByDiscriminatorValue.put("ExportCreateVM", cloud.fastreport.model.ExportCreateVM.class); + classByDiscriminatorValue.put("ExportCreateVM", cloud.fastreport.model.ExportCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.ExportFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("ExportFolderCreateVM", cloud.fastreport.model.ExportFolderCreateVM.class); return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } @@ -292,6 +404,22 @@ public Class getClassForElement(Js return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.FileCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("ExportCreateAdminVM", cloud.fastreport.model.ExportCreateAdminVM.class); + classByDiscriminatorValue.put("ExportCreateVM", cloud.fastreport.model.ExportCreateVM.class); + classByDiscriminatorValue.put("FileCreateVM", cloud.fastreport.model.FileCreateVM.class); + classByDiscriminatorValue.put("ReportCreateAdminVM", cloud.fastreport.model.ReportCreateAdminVM.class); + classByDiscriminatorValue.put("ReportCreateVM", cloud.fastreport.model.ReportCreateVM.class); + classByDiscriminatorValue.put("TemplateCreateAdminVM", cloud.fastreport.model.TemplateCreateAdminVM.class); + classByDiscriminatorValue.put("TemplateCreateVM", cloud.fastreport.model.TemplateCreateVM.class); + classByDiscriminatorValue.put("FileCreateVM", cloud.fastreport.model.FileCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.FileVM.class, new TypeSelector() { @Override @@ -305,6 +433,23 @@ public Class getClassForElement(JsonEle return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.FolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminExportFolderCreateVM", cloud.fastreport.model.AdminExportFolderCreateVM.class); + classByDiscriminatorValue.put("AdminFolderCreateVM", cloud.fastreport.model.AdminFolderCreateVM.class); + classByDiscriminatorValue.put("AdminReportFolderCreateVM", cloud.fastreport.model.AdminReportFolderCreateVM.class); + classByDiscriminatorValue.put("AdminTemplateFolderCreateVM", cloud.fastreport.model.AdminTemplateFolderCreateVM.class); + classByDiscriminatorValue.put("ExportFolderCreateVM", cloud.fastreport.model.ExportFolderCreateVM.class); + classByDiscriminatorValue.put("FolderCreateVM", cloud.fastreport.model.FolderCreateVM.class); + classByDiscriminatorValue.put("ReportFolderCreateVM", cloud.fastreport.model.ReportFolderCreateVM.class); + classByDiscriminatorValue.put("TemplateFolderCreateVM", cloud.fastreport.model.TemplateFolderCreateVM.class); + classByDiscriminatorValue.put("FolderCreateVM", cloud.fastreport.model.FolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.PrepareTemplateTaskVM.class, new TypeSelector() { @Override @@ -314,6 +459,35 @@ public Class getClassFor return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.ReportCreateAdminVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("ReportCreateAdminVM", cloud.fastreport.model.ReportCreateAdminVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.ReportCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("ReportCreateAdminVM", cloud.fastreport.model.ReportCreateAdminVM.class); + classByDiscriminatorValue.put("ReportCreateVM", cloud.fastreport.model.ReportCreateVM.class); + classByDiscriminatorValue.put("ReportCreateVM", cloud.fastreport.model.ReportCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.ReportFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("ReportFolderCreateVM", cloud.fastreport.model.ReportFolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.ReportVM.class, new TypeSelector() { @Override @@ -450,6 +624,17 @@ public Class getClassForEleme return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.SubscriptionVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("AdminSubscriptionVM", cloud.fastreport.model.AdminSubscriptionVM.class); + classByDiscriminatorValue.put("SubscriptionVM", cloud.fastreport.model.SubscriptionVM.class); + classByDiscriminatorValue.put("SubscriptionVM", cloud.fastreport.model.SubscriptionVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.TaskBaseVM.class, new TypeSelector() { @Override @@ -470,6 +655,35 @@ public Class getClassForElement(Jso return getClassByDiscriminator(classByDiscriminatorValue, getDiscriminatorValue(readElement, "$t")); } + }) + .registerTypeSelector(cloud.fastreport.model.TemplateCreateAdminVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("TemplateCreateAdminVM", cloud.fastreport.model.TemplateCreateAdminVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.TemplateCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("TemplateCreateAdminVM", cloud.fastreport.model.TemplateCreateAdminVM.class); + classByDiscriminatorValue.put("TemplateCreateVM", cloud.fastreport.model.TemplateCreateVM.class); + classByDiscriminatorValue.put("TemplateCreateVM", cloud.fastreport.model.TemplateCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } + }) + .registerTypeSelector(cloud.fastreport.model.TemplateFolderCreateVM.class, new TypeSelector() { + @Override + public Class getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = new HashMap(); + classByDiscriminatorValue.put("TemplateFolderCreateVM", cloud.fastreport.model.TemplateFolderCreateVM.class); + return getClassByDiscriminator(classByDiscriminatorValue, + getDiscriminatorValue(readElement, "$t")); + } }) .registerTypeSelector(cloud.fastreport.model.TemplateVM.class, new TypeSelector() { @Override @@ -696,7 +910,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.AcceptAgreementsVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.AdminExportFolderCreateVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.AdminFolderCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.AdminReportFolderCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.AdminSubscriptionVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.AdminTemplateFolderCreateVM.CustomTypeAdapterFactory()); @@ -720,13 +933,11 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateContactGroupVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateContactVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateDataSourceAdminVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateDataSourceVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateEmailTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateExportTemplateTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateFTPUploadTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateFetchTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateGroupAdminVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateGroupVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreatePrepareTemplateTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateSubscriptionInviteVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.CreateThumbnailReportTaskVM.CustomTypeAdapterFactory()); @@ -743,7 +954,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.DeleteApiKeyVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.EmailTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ExportCreateAdminVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ExportCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ExportFolderCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ExportReportVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ExportTemplateTaskVM.CustomTypeAdapterFactory()); @@ -754,7 +964,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FTPUploadTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FetchTaskVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FileCreateFileGetFileUpdateFileDeleteFileExecuteFileAdministratePermission.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FileCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FileIconVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FilePermission.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FilePermissionFileCreateFileGetFileUpdateFileDeleteFileExecuteFileAdministratePermissions.CustomTypeAdapterFactory()); @@ -764,7 +973,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FileTagsUpdateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FileVMFilesVMBase.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FilesVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FolderCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FolderIconVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FolderRenameVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.FolderSizeVM.CustomTypeAdapterFactory()); @@ -793,7 +1001,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.RenameGroupVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.RenameSubscriptionVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ReportCreateAdminVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ReportCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ReportFolderCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ReportInfo.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.ReportVM.CustomTypeAdapterFactory()); @@ -823,7 +1030,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.SubscriptionPlansVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.SubscriptionUserVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.SubscriptionUsersVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.SubscriptionVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.SubscriptionsVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TaskCreateTaskGetTaskUpdateTaskDeleteTaskExecuteTaskAdministratePermission.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TaskPermission.CustomTypeAdapterFactory()); @@ -833,7 +1039,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TaskSettingsVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TasksVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TemplateCreateAdminVM.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TemplateCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TemplateFolderCreateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TemplateVM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new cloud.fastreport.model.TemplateVMFilesVMBase.CustomTypeAdapterFactory()); @@ -1097,7 +1302,7 @@ public java.sql.Date read(JsonReader in) throws IOException { if (dateFormat != null) { return new java.sql.Date(dateFormat.parse(date).getTime()); } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); + return new java.sql.Date(sdf.parse(date).getTime()); } catch (ParseException e) { throw new JsonParseException(e); } @@ -1107,7 +1312,7 @@ public java.sql.Date read(JsonReader in) throws IOException { /** * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. + * If the dateFormat is null, DateTimeFormatter will be used. */ public static class DateTypeAdapter extends TypeAdapter { @@ -1132,7 +1337,7 @@ public void write(JsonWriter out, Date date) throws IOException { if (dateFormat != null) { value = dateFormat.format(date); } else { - value = ISO8601Utils.format(date, true); + value = date.toInstant().atOffset(ZoneOffset.UTC).format(dtf); } out.value(value); } @@ -1151,7 +1356,7 @@ public Date read(JsonReader in) throws IOException { if (dateFormat != null) { return dateFormat.parse(date); } - return ISO8601Utils.parse(date, new ParsePosition(0)); + return sdf.parse(date); } catch (ParseException e) { throw new JsonParseException(e); } diff --git a/src/main/java/cloud/fastreport/client/ExportsApi.java b/src/main/java/cloud/fastreport/client/ExportsApi.java index 4fef42c..5889326 100644 --- a/src/main/java/cloud/fastreport/client/ExportsApi.java +++ b/src/main/java/cloud/fastreport/client/ExportsApi.java @@ -40,6 +40,7 @@ import cloud.fastreport.model.FileTagsUpdateVM; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.FilesVM; +import cloud.fastreport.model.FolderCreateVM; import cloud.fastreport.model.FolderIconVM; import cloud.fastreport.model.FolderRenameVM; import cloud.fastreport.model.FolderSizeVM; diff --git a/src/main/java/cloud/fastreport/client/ReportsApi.java b/src/main/java/cloud/fastreport/client/ReportsApi.java index 44391df..04394a8 100644 --- a/src/main/java/cloud/fastreport/client/ReportsApi.java +++ b/src/main/java/cloud/fastreport/client/ReportsApi.java @@ -40,6 +40,7 @@ import cloud.fastreport.model.FileTagsUpdateVM; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.FilesVM; +import cloud.fastreport.model.FolderCreateVM; import cloud.fastreport.model.FolderIconVM; import cloud.fastreport.model.FolderRenameVM; import cloud.fastreport.model.FolderSizeVM; diff --git a/src/main/java/cloud/fastreport/client/TemplatesApi.java b/src/main/java/cloud/fastreport/client/TemplatesApi.java index a86d9eb..548dc4e 100644 --- a/src/main/java/cloud/fastreport/client/TemplatesApi.java +++ b/src/main/java/cloud/fastreport/client/TemplatesApi.java @@ -40,6 +40,7 @@ import cloud.fastreport.model.FileTagsUpdateVM; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.FilesVM; +import cloud.fastreport.model.FolderCreateVM; import cloud.fastreport.model.FolderIconVM; import cloud.fastreport.model.FolderRenameVM; import cloud.fastreport.model.FolderSizeVM; diff --git a/src/main/java/cloud/fastreport/model/AdminExportFolderCreateVM.java b/src/main/java/cloud/fastreport/model/AdminExportFolderCreateVM.java index fb3c1a5..05b4971 100644 --- a/src/main/java/cloud/fastreport/model/AdminExportFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/AdminExportFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.AdminFolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,87 +54,11 @@ * AdminExportFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdminExportFolderCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - +public class AdminExportFolderCreateVM extends AdminFolderCreateVM { public AdminExportFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public AdminExportFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public AdminExportFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public AdminExportFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public AdminExportFolderCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - @Override public boolean equals(Object o) { @@ -143,10 +68,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdminExportFolderCreateVM adminExportFolderCreateVM = (AdminExportFolderCreateVM) o; - return Objects.equals(this.name, adminExportFolderCreateVM.name) && - Objects.equals(this.tags, adminExportFolderCreateVM.tags) && - Arrays.equals(this.icon, adminExportFolderCreateVM.icon); + return super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +77,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -169,9 +91,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminExportFolderCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -194,12 +114,19 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("parentId"); + openapiFields.add("ownerId"); + openapiFields.add("force"); + openapiFields.add("$t"); openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("parentId"); + openapiRequiredFields.add("ownerId"); + openapiRequiredFields.add("$t"); } /** @@ -222,13 +149,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminExportFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdminExportFolderCreateVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } } diff --git a/src/main/java/cloud/fastreport/model/AdminFolderCreateVM.java b/src/main/java/cloud/fastreport/model/AdminFolderCreateVM.java index d3a2961..d64f935 100644 --- a/src/main/java/cloud/fastreport/model/AdminFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/AdminFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,7 +54,7 @@ * AdminFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdminFolderCreateVM { +public class AdminFolderCreateVM extends FolderCreateVM { public static final String SERIALIZED_NAME_PARENT_ID = "parentId"; @SerializedName(SERIALIZED_NAME_PARENT_ID) private String parentId; @@ -66,19 +67,12 @@ public class AdminFolderCreateVM { @SerializedName(SERIALIZED_NAME_FORCE) private Boolean force; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; public AdminFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } public AdminFolderCreateVM parentId(String parentId) { @@ -138,68 +132,22 @@ public void setForce(Boolean force) { } - public AdminFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public AdminFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public AdminFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public AdminFolderCreateVM icon(byte[] icon) { - this.icon = icon; + public AdminFolderCreateVM $t(String $t) { + this.$t = $t; return this; } /** - * Get icon - * @return icon + * Get $t + * @return $t **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; + @javax.annotation.Nonnull + public String get$T() { + return $t; } - public void setIcon(byte[] icon) { - this.icon = icon; + public void set$T(String $t) { + this.$t = $t; } @@ -216,9 +164,8 @@ public boolean equals(Object o) { return Objects.equals(this.parentId, adminFolderCreateVM.parentId) && Objects.equals(this.ownerId, adminFolderCreateVM.ownerId) && Objects.equals(this.force, adminFolderCreateVM.force) && - Objects.equals(this.name, adminFolderCreateVM.name) && - Objects.equals(this.tags, adminFolderCreateVM.tags) && - Arrays.equals(this.icon, adminFolderCreateVM.icon); + Objects.equals(this.$t, adminFolderCreateVM.$t) && + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -227,7 +174,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(parentId, ownerId, force, name, tags, Arrays.hashCode(icon)); + return Objects.hash(parentId, ownerId, force, $t, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -241,12 +188,11 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminFolderCreateVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" force: ").append(toIndentedString(force)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -272,11 +218,13 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("parentId"); openapiRequiredFields.add("ownerId"); + openapiRequiredFields.add("$t"); } /** @@ -292,64 +240,25 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!AdminFolderCreateVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : AdminFolderCreateVM.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("parentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); - } - if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "AdminExportFolderCreateVM": + AdminExportFolderCreateVM.validateJsonElement(jsonElement); + break; + case "AdminFolderCreateVM": + AdminFolderCreateVM.validateJsonElement(jsonElement); + break; + case "AdminReportFolderCreateVM": + AdminReportFolderCreateVM.validateJsonElement(jsonElement); + break; + case "AdminTemplateFolderCreateVM": + AdminTemplateFolderCreateVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!AdminFolderCreateVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'AdminFolderCreateVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(AdminFolderCreateVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, AdminFolderCreateVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public AdminFolderCreateVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of AdminFolderCreateVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/AdminReportFolderCreateVM.java b/src/main/java/cloud/fastreport/model/AdminReportFolderCreateVM.java index b08c56c..98996e3 100644 --- a/src/main/java/cloud/fastreport/model/AdminReportFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/AdminReportFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.AdminFolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,87 +54,11 @@ * AdminReportFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdminReportFolderCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - +public class AdminReportFolderCreateVM extends AdminFolderCreateVM { public AdminReportFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public AdminReportFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public AdminReportFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public AdminReportFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public AdminReportFolderCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - @Override public boolean equals(Object o) { @@ -143,10 +68,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdminReportFolderCreateVM adminReportFolderCreateVM = (AdminReportFolderCreateVM) o; - return Objects.equals(this.name, adminReportFolderCreateVM.name) && - Objects.equals(this.tags, adminReportFolderCreateVM.tags) && - Arrays.equals(this.icon, adminReportFolderCreateVM.icon); + return super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +77,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -169,9 +91,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminReportFolderCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -194,12 +114,19 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("parentId"); + openapiFields.add("ownerId"); + openapiFields.add("force"); + openapiFields.add("$t"); openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("parentId"); + openapiRequiredFields.add("ownerId"); + openapiRequiredFields.add("$t"); } /** @@ -222,13 +149,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminReportFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdminReportFolderCreateVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } } diff --git a/src/main/java/cloud/fastreport/model/AdminSubscriptionVM.java b/src/main/java/cloud/fastreport/model/AdminSubscriptionVM.java index 4032aa4..7694b37 100644 --- a/src/main/java/cloud/fastreport/model/AdminSubscriptionVM.java +++ b/src/main/java/cloud/fastreport/model/AdminSubscriptionVM.java @@ -17,6 +17,7 @@ import cloud.fastreport.model.DefaultPermissionsVM; import cloud.fastreport.model.SubscriptionFolder; import cloud.fastreport.model.SubscriptionPeriodVM; +import cloud.fastreport.model.SubscriptionVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -56,7 +57,7 @@ * AdminSubscriptionVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdminSubscriptionVM { +public class AdminSubscriptionVM extends SubscriptionVM { public static final String SERIALIZED_NAME_DEFAULT_PERMISSIONS = "defaultPermissions"; @SerializedName(SERIALIZED_NAME_DEFAULT_PERMISSIONS) private DefaultPermissionsVM defaultPermissions; @@ -65,39 +66,8 @@ public class AdminSubscriptionVM { @SerializedName(SERIALIZED_NAME_OWNER_ID) private String ownerId; - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_LOCALE = "locale"; - @SerializedName(SERIALIZED_NAME_LOCALE) - private String locale; - - public static final String SERIALIZED_NAME_CURRENT = "current"; - @SerializedName(SERIALIZED_NAME_CURRENT) - private SubscriptionPeriodVM current; - - public static final String SERIALIZED_NAME_OLD = "old"; - @SerializedName(SERIALIZED_NAME_OLD) - private List old; - - public static final String SERIALIZED_NAME_TEMPLATES_FOLDER = "templatesFolder"; - @SerializedName(SERIALIZED_NAME_TEMPLATES_FOLDER) - private SubscriptionFolder templatesFolder; - - public static final String SERIALIZED_NAME_REPORTS_FOLDER = "reportsFolder"; - @SerializedName(SERIALIZED_NAME_REPORTS_FOLDER) - private SubscriptionFolder reportsFolder; - - public static final String SERIALIZED_NAME_EXPORTS_FOLDER = "exportsFolder"; - @SerializedName(SERIALIZED_NAME_EXPORTS_FOLDER) - private SubscriptionFolder exportsFolder; - public AdminSubscriptionVM() { + this.$t = this.getClass().getSimpleName(); } public AdminSubscriptionVM defaultPermissions(DefaultPermissionsVM defaultPermissions) { @@ -138,166 +108,6 @@ public void setOwnerId(String ownerId) { } - public AdminSubscriptionVM id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public AdminSubscriptionVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public AdminSubscriptionVM locale(String locale) { - this.locale = locale; - return this; - } - - /** - * Get locale - * @return locale - **/ - @javax.annotation.Nullable - public String getLocale() { - return locale; - } - - public void setLocale(String locale) { - this.locale = locale; - } - - - public AdminSubscriptionVM current(SubscriptionPeriodVM current) { - this.current = current; - return this; - } - - /** - * Get current - * @return current - **/ - @javax.annotation.Nullable - public SubscriptionPeriodVM getCurrent() { - return current; - } - - public void setCurrent(SubscriptionPeriodVM current) { - this.current = current; - } - - - public AdminSubscriptionVM old(List old) { - this.old = old; - return this; - } - - public AdminSubscriptionVM addOldItem(SubscriptionPeriodVM oldItem) { - if (this.old == null) { - this.old = new ArrayList<>(); - } - this.old.add(oldItem); - return this; - } - - /** - * Get old - * @return old - **/ - @javax.annotation.Nullable - public List getOld() { - return old; - } - - public void setOld(List old) { - this.old = old; - } - - - public AdminSubscriptionVM templatesFolder(SubscriptionFolder templatesFolder) { - this.templatesFolder = templatesFolder; - return this; - } - - /** - * Get templatesFolder - * @return templatesFolder - **/ - @javax.annotation.Nullable - public SubscriptionFolder getTemplatesFolder() { - return templatesFolder; - } - - public void setTemplatesFolder(SubscriptionFolder templatesFolder) { - this.templatesFolder = templatesFolder; - } - - - public AdminSubscriptionVM reportsFolder(SubscriptionFolder reportsFolder) { - this.reportsFolder = reportsFolder; - return this; - } - - /** - * Get reportsFolder - * @return reportsFolder - **/ - @javax.annotation.Nullable - public SubscriptionFolder getReportsFolder() { - return reportsFolder; - } - - public void setReportsFolder(SubscriptionFolder reportsFolder) { - this.reportsFolder = reportsFolder; - } - - - public AdminSubscriptionVM exportsFolder(SubscriptionFolder exportsFolder) { - this.exportsFolder = exportsFolder; - return this; - } - - /** - * Get exportsFolder - * @return exportsFolder - **/ - @javax.annotation.Nullable - public SubscriptionFolder getExportsFolder() { - return exportsFolder; - } - - public void setExportsFolder(SubscriptionFolder exportsFolder) { - this.exportsFolder = exportsFolder; - } - - @Override public boolean equals(Object o) { @@ -310,14 +120,7 @@ public boolean equals(Object o) { AdminSubscriptionVM adminSubscriptionVM = (AdminSubscriptionVM) o; return Objects.equals(this.defaultPermissions, adminSubscriptionVM.defaultPermissions) && Objects.equals(this.ownerId, adminSubscriptionVM.ownerId) && - Objects.equals(this.id, adminSubscriptionVM.id) && - Objects.equals(this.name, adminSubscriptionVM.name) && - Objects.equals(this.locale, adminSubscriptionVM.locale) && - Objects.equals(this.current, adminSubscriptionVM.current) && - Objects.equals(this.old, adminSubscriptionVM.old) && - Objects.equals(this.templatesFolder, adminSubscriptionVM.templatesFolder) && - Objects.equals(this.reportsFolder, adminSubscriptionVM.reportsFolder) && - Objects.equals(this.exportsFolder, adminSubscriptionVM.exportsFolder); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -326,7 +129,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(defaultPermissions, ownerId, id, name, locale, current, old, templatesFolder, reportsFolder, exportsFolder); + return Objects.hash(defaultPermissions, ownerId, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -340,16 +143,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminSubscriptionVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" defaultPermissions: ").append(toIndentedString(defaultPermissions)).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); - sb.append(" current: ").append(toIndentedString(current)).append("\n"); - sb.append(" old: ").append(toIndentedString(old)).append("\n"); - sb.append(" templatesFolder: ").append(toIndentedString(templatesFolder)).append("\n"); - sb.append(" reportsFolder: ").append(toIndentedString(reportsFolder)).append("\n"); - sb.append(" exportsFolder: ").append(toIndentedString(exportsFolder)).append("\n"); sb.append("}"); return sb.toString(); } @@ -380,9 +176,11 @@ private String toIndentedString(Object o) { openapiFields.add("templatesFolder"); openapiFields.add("reportsFolder"); openapiFields.add("exportsFolder"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -405,53 +203,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminSubscriptionVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `defaultPermissions` - if (jsonObj.get("defaultPermissions") != null && !jsonObj.get("defaultPermissions").isJsonNull()) { - DefaultPermissionsVM.validateJsonElement(jsonObj.get("defaultPermissions")); - } - if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) && !jsonObj.get("locale").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); - } - // validate the optional field `current` - if (jsonObj.get("current") != null && !jsonObj.get("current").isJsonNull()) { - SubscriptionPeriodVM.validateJsonElement(jsonObj.get("current")); - } - if (jsonObj.get("old") != null && !jsonObj.get("old").isJsonNull()) { - JsonArray jsonArrayold = jsonObj.getAsJsonArray("old"); - if (jsonArrayold != null) { - // ensure the json data is an array - if (!jsonObj.get("old").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `old` to be an array in the JSON string but got `%s`", jsonObj.get("old").toString())); - } - - // validate the optional field `old` (array) - for (int i = 0; i < jsonArrayold.size(); i++) { - SubscriptionPeriodVM.validateJsonElement(jsonArrayold.get(i)); - }; + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdminSubscriptionVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - // validate the optional field `templatesFolder` - if (jsonObj.get("templatesFolder") != null && !jsonObj.get("templatesFolder").isJsonNull()) { - SubscriptionFolder.validateJsonElement(jsonObj.get("templatesFolder")); - } - // validate the optional field `reportsFolder` - if (jsonObj.get("reportsFolder") != null && !jsonObj.get("reportsFolder").isJsonNull()) { - SubscriptionFolder.validateJsonElement(jsonObj.get("reportsFolder")); - } - // validate the optional field `exportsFolder` - if (jsonObj.get("exportsFolder") != null && !jsonObj.get("exportsFolder").isJsonNull()) { - SubscriptionFolder.validateJsonElement(jsonObj.get("exportsFolder")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/cloud/fastreport/model/AdminTemplateFolderCreateVM.java b/src/main/java/cloud/fastreport/model/AdminTemplateFolderCreateVM.java index 3d6aadc..b0e15c2 100644 --- a/src/main/java/cloud/fastreport/model/AdminTemplateFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/AdminTemplateFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.AdminFolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,87 +54,11 @@ * AdminTemplateFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class AdminTemplateFolderCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - +public class AdminTemplateFolderCreateVM extends AdminFolderCreateVM { public AdminTemplateFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public AdminTemplateFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public AdminTemplateFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public AdminTemplateFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public AdminTemplateFolderCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - @Override public boolean equals(Object o) { @@ -143,10 +68,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AdminTemplateFolderCreateVM adminTemplateFolderCreateVM = (AdminTemplateFolderCreateVM) o; - return Objects.equals(this.name, adminTemplateFolderCreateVM.name) && - Objects.equals(this.tags, adminTemplateFolderCreateVM.tags) && - Arrays.equals(this.icon, adminTemplateFolderCreateVM.icon); + return super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +77,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -169,9 +91,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AdminTemplateFolderCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -194,12 +114,19 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("parentId"); + openapiFields.add("ownerId"); + openapiFields.add("force"); + openapiFields.add("$t"); openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("parentId"); + openapiRequiredFields.add("ownerId"); + openapiRequiredFields.add("$t"); } /** @@ -222,13 +149,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `AdminTemplateFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AdminTemplateFolderCreateVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } } diff --git a/src/main/java/cloud/fastreport/model/CreateDataSourceAdminVM.java b/src/main/java/cloud/fastreport/model/CreateDataSourceAdminVM.java index 2674073..f3348f2 100644 --- a/src/main/java/cloud/fastreport/model/CreateDataSourceAdminVM.java +++ b/src/main/java/cloud/fastreport/model/CreateDataSourceAdminVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.CreateDataSourceVM; import cloud.fastreport.model.DataSourceConnectionType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -52,28 +53,13 @@ * CreateDataSourceAdminVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateDataSourceAdminVM { +public class CreateDataSourceAdminVM extends CreateDataSourceVM { public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) private String ownerId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_CONNECTION_STRING = "connectionString"; - @SerializedName(SERIALIZED_NAME_CONNECTION_STRING) - private String connectionString; - - public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId"; - @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID) - private String subscriptionId; - - public static final String SERIALIZED_NAME_CONNECTION_TYPE = "connectionType"; - @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) - private DataSourceConnectionType connectionType; - public CreateDataSourceAdminVM() { + this.$t = this.getClass().getSimpleName(); } public CreateDataSourceAdminVM ownerId(String ownerId) { @@ -95,82 +81,6 @@ public void setOwnerId(String ownerId) { } - public CreateDataSourceAdminVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public CreateDataSourceAdminVM connectionString(String connectionString) { - this.connectionString = connectionString; - return this; - } - - /** - * Get connectionString - * @return connectionString - **/ - @javax.annotation.Nonnull - public String getConnectionString() { - return connectionString; - } - - public void setConnectionString(String connectionString) { - this.connectionString = connectionString; - } - - - public CreateDataSourceAdminVM subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get subscriptionId - * @return subscriptionId - **/ - @javax.annotation.Nonnull - public String getSubscriptionId() { - return subscriptionId; - } - - public void setSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - } - - - public CreateDataSourceAdminVM connectionType(DataSourceConnectionType connectionType) { - this.connectionType = connectionType; - return this; - } - - /** - * Get connectionType - * @return connectionType - **/ - @javax.annotation.Nullable - public DataSourceConnectionType getConnectionType() { - return connectionType; - } - - public void setConnectionType(DataSourceConnectionType connectionType) { - this.connectionType = connectionType; - } - - @Override public boolean equals(Object o) { @@ -182,10 +92,7 @@ public boolean equals(Object o) { } CreateDataSourceAdminVM createDataSourceAdminVM = (CreateDataSourceAdminVM) o; return Objects.equals(this.ownerId, createDataSourceAdminVM.ownerId) && - Objects.equals(this.name, createDataSourceAdminVM.name) && - Objects.equals(this.connectionString, createDataSourceAdminVM.connectionString) && - Objects.equals(this.subscriptionId, createDataSourceAdminVM.subscriptionId) && - Objects.equals(this.connectionType, createDataSourceAdminVM.connectionType); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -194,7 +101,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ownerId, name, connectionString, subscriptionId, connectionType); + return Objects.hash(ownerId, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -208,11 +115,8 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateDataSourceAdminVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" connectionString: ").append(toIndentedString(connectionString)).append("\n"); - sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); - sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); sb.append("}"); return sb.toString(); } @@ -239,12 +143,14 @@ private String toIndentedString(Object o) { openapiFields.add("connectionString"); openapiFields.add("subscriptionId"); openapiFields.add("connectionType"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("ownerId"); openapiRequiredFields.add("connectionString"); openapiRequiredFields.add("subscriptionId"); + openapiRequiredFields.add("$t"); } /** @@ -274,23 +180,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("connectionString").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `connectionString` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectionString").toString())); - } - if (!jsonObj.get("subscriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionId").toString())); - } - // validate the optional field `connectionType` - if (jsonObj.get("connectionType") != null && !jsonObj.get("connectionType").isJsonNull()) { - DataSourceConnectionType.validateJsonElement(jsonObj.get("connectionType")); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/cloud/fastreport/model/CreateDataSourceVM.java b/src/main/java/cloud/fastreport/model/CreateDataSourceVM.java index 95f8387..a04a62f 100644 --- a/src/main/java/cloud/fastreport/model/CreateDataSourceVM.java +++ b/src/main/java/cloud/fastreport/model/CreateDataSourceVM.java @@ -69,7 +69,12 @@ public class CreateDataSourceVM { @SerializedName(SERIALIZED_NAME_CONNECTION_TYPE) private DataSourceConnectionType connectionType; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; + public CreateDataSourceVM() { + this.$t = this.getClass().getSimpleName(); } public CreateDataSourceVM name(String name) { @@ -148,6 +153,25 @@ public void setConnectionType(DataSourceConnectionType connectionType) { } + public CreateDataSourceVM $t(String $t) { + this.$t = $t; + return this; + } + + /** + * Get $t + * @return $t + **/ + @javax.annotation.Nonnull + public String get$T() { + return $t; + } + + public void set$T(String $t) { + this.$t = $t; + } + + @Override public boolean equals(Object o) { @@ -161,7 +185,8 @@ public boolean equals(Object o) { return Objects.equals(this.name, createDataSourceVM.name) && Objects.equals(this.connectionString, createDataSourceVM.connectionString) && Objects.equals(this.subscriptionId, createDataSourceVM.subscriptionId) && - Objects.equals(this.connectionType, createDataSourceVM.connectionType); + Objects.equals(this.connectionType, createDataSourceVM.connectionType) && + Objects.equals(this.$t, createDataSourceVM.$t); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -170,7 +195,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, connectionString, subscriptionId, connectionType); + return Objects.hash(name, connectionString, subscriptionId, connectionType, $t); } private static int hashCodeNullable(JsonNullable a) { @@ -188,6 +213,7 @@ public String toString() { sb.append(" connectionString: ").append(toIndentedString(connectionString)).append("\n"); sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); sb.append(" connectionType: ").append(toIndentedString(connectionType)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -214,11 +240,13 @@ private String toIndentedString(Object o) { openapiFields.add("connectionString"); openapiFields.add("subscriptionId"); openapiFields.add("connectionType"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("connectionString"); openapiRequiredFields.add("subscriptionId"); + openapiRequiredFields.add("$t"); } /** @@ -234,64 +262,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateDataSourceVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateDataSourceVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateDataSourceVM.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if (!jsonObj.get("connectionString").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `connectionString` to be a primitive type in the JSON string but got `%s`", jsonObj.get("connectionString").toString())); - } - if (!jsonObj.get("subscriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionId").toString())); - } - // validate the optional field `connectionType` - if (jsonObj.get("connectionType") != null && !jsonObj.get("connectionType").isJsonNull()) { - DataSourceConnectionType.validateJsonElement(jsonObj.get("connectionType")); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "CreateDataSourceAdminVM": + CreateDataSourceAdminVM.validateJsonElement(jsonElement); + break; + case "CreateDataSourceVM": + CreateDataSourceVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateDataSourceVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateDataSourceVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateDataSourceVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateDataSourceVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateDataSourceVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of CreateDataSourceVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/CreateEmailTaskVM.java b/src/main/java/cloud/fastreport/model/CreateEmailTaskVM.java index 59be20a..810be77 100644 --- a/src/main/java/cloud/fastreport/model/CreateEmailTaskVM.java +++ b/src/main/java/cloud/fastreport/model/CreateEmailTaskVM.java @@ -15,6 +15,7 @@ import java.util.Objects; import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -376,11 +377,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/CreateExportReportTaskVM.java b/src/main/java/cloud/fastreport/model/CreateExportReportTaskVM.java index 9b01f12..231f5b6 100644 --- a/src/main/java/cloud/fastreport/model/CreateExportReportTaskVM.java +++ b/src/main/java/cloud/fastreport/model/CreateExportReportTaskVM.java @@ -15,7 +15,10 @@ import java.util.Objects; import cloud.fastreport.model.CreateTransformTaskBaseVM; +import cloud.fastreport.model.CreateTransportTaskBaseVM; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,8 +26,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -227,11 +232,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transports"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/CreateExportTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/CreateExportTemplateTaskVM.java index e878eee..bba82ec 100644 --- a/src/main/java/cloud/fastreport/model/CreateExportTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/CreateExportTemplateTaskVM.java @@ -15,6 +15,10 @@ import java.util.Objects; import cloud.fastreport.model.CreateExportReportTaskVM; +import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,8 +26,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -149,11 +155,18 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("exportParameters"); + openapiFields.add("format"); + openapiFields.add("pagesCount"); + openapiFields.add("$t"); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transports"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/CreateFTPUploadTaskVM.java b/src/main/java/cloud/fastreport/model/CreateFTPUploadTaskVM.java index 26322f3..3a94828 100644 --- a/src/main/java/cloud/fastreport/model/CreateFTPUploadTaskVM.java +++ b/src/main/java/cloud/fastreport/model/CreateFTPUploadTaskVM.java @@ -15,6 +15,7 @@ import java.util.Objects; import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -314,11 +315,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/CreateGroupAdminVM.java b/src/main/java/cloud/fastreport/model/CreateGroupAdminVM.java index f86f763..cb95a74 100644 --- a/src/main/java/cloud/fastreport/model/CreateGroupAdminVM.java +++ b/src/main/java/cloud/fastreport/model/CreateGroupAdminVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.CreateGroupVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -51,20 +52,13 @@ * CreateGroupAdminVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class CreateGroupAdminVM { +public class CreateGroupAdminVM extends CreateGroupVM { public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) private String ownerId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId"; - @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID) - private String subscriptionId; - public CreateGroupAdminVM() { + this.$t = this.getClass().getSimpleName(); } public CreateGroupAdminVM ownerId(String ownerId) { @@ -86,44 +80,6 @@ public void setOwnerId(String ownerId) { } - public CreateGroupAdminVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nonnull - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public CreateGroupAdminVM subscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - return this; - } - - /** - * Get subscriptionId - * @return subscriptionId - **/ - @javax.annotation.Nullable - public String getSubscriptionId() { - return subscriptionId; - } - - public void setSubscriptionId(String subscriptionId) { - this.subscriptionId = subscriptionId; - } - - @Override public boolean equals(Object o) { @@ -135,8 +91,7 @@ public boolean equals(Object o) { } CreateGroupAdminVM createGroupAdminVM = (CreateGroupAdminVM) o; return Objects.equals(this.ownerId, createGroupAdminVM.ownerId) && - Objects.equals(this.name, createGroupAdminVM.name) && - Objects.equals(this.subscriptionId, createGroupAdminVM.subscriptionId); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -145,7 +100,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ownerId, name, subscriptionId); + return Objects.hash(ownerId, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -159,9 +114,8 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateGroupAdminVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -186,10 +140,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("name"); openapiFields.add("subscriptionId"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); + openapiRequiredFields.add("$t"); } /** @@ -219,16 +175,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("ownerId") != null && !jsonObj.get("ownerId").isJsonNull()) && !jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("subscriptionId") != null && !jsonObj.get("subscriptionId").isJsonNull()) && !jsonObj.get("subscriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionId").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/cloud/fastreport/model/CreateGroupVM.java b/src/main/java/cloud/fastreport/model/CreateGroupVM.java index c7d3ae1..7c84d57 100644 --- a/src/main/java/cloud/fastreport/model/CreateGroupVM.java +++ b/src/main/java/cloud/fastreport/model/CreateGroupVM.java @@ -60,7 +60,12 @@ public class CreateGroupVM { @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID) private String subscriptionId; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; + public CreateGroupVM() { + this.$t = this.getClass().getSimpleName(); } public CreateGroupVM name(String name) { @@ -101,6 +106,25 @@ public void setSubscriptionId(String subscriptionId) { } + public CreateGroupVM $t(String $t) { + this.$t = $t; + return this; + } + + /** + * Get $t + * @return $t + **/ + @javax.annotation.Nonnull + public String get$T() { + return $t; + } + + public void set$T(String $t) { + this.$t = $t; + } + + @Override public boolean equals(Object o) { @@ -112,7 +136,8 @@ public boolean equals(Object o) { } CreateGroupVM createGroupVM = (CreateGroupVM) o; return Objects.equals(this.name, createGroupVM.name) && - Objects.equals(this.subscriptionId, createGroupVM.subscriptionId); + Objects.equals(this.subscriptionId, createGroupVM.subscriptionId) && + Objects.equals(this.$t, createGroupVM.$t); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -121,7 +146,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, subscriptionId); + return Objects.hash(name, subscriptionId, $t); } private static int hashCodeNullable(JsonNullable a) { @@ -137,6 +162,7 @@ public String toString() { sb.append("class CreateGroupVM {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -161,10 +187,12 @@ private String toIndentedString(Object o) { openapiFields = new HashSet(); openapiFields.add("name"); openapiFields.add("subscriptionId"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); openapiRequiredFields.add("name"); + openapiRequiredFields.add("$t"); } /** @@ -180,57 +208,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!CreateGroupVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreateGroupVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : CreateGroupVM.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("subscriptionId") != null && !jsonObj.get("subscriptionId").isJsonNull()) && !jsonObj.get("subscriptionId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `subscriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionId").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "CreateGroupAdminVM": + CreateGroupAdminVM.validateJsonElement(jsonElement); + break; + case "CreateGroupVM": + CreateGroupVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!CreateGroupVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'CreateGroupVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(CreateGroupVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, CreateGroupVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public CreateGroupVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of CreateGroupVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/CreatePrepareTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/CreatePrepareTemplateTaskVM.java index dd27850..fa671f8 100644 --- a/src/main/java/cloud/fastreport/model/CreatePrepareTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/CreatePrepareTemplateTaskVM.java @@ -16,6 +16,9 @@ import java.util.Objects; import cloud.fastreport.model.CreateExportReportTaskVM; import cloud.fastreport.model.CreateTransformTaskBaseVM; +import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -212,11 +215,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transports"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/CreateWebhookTaskVM.java b/src/main/java/cloud/fastreport/model/CreateWebhookTaskVM.java index 5b81452..4fca5c5 100644 --- a/src/main/java/cloud/fastreport/model/CreateWebhookTaskVM.java +++ b/src/main/java/cloud/fastreport/model/CreateWebhookTaskVM.java @@ -15,6 +15,7 @@ import java.util.Objects; import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -175,11 +176,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/EmailTaskVM.java b/src/main/java/cloud/fastreport/model/EmailTaskVM.java index 7d4af74..5be31e3 100644 --- a/src/main/java/cloud/fastreport/model/EmailTaskVM.java +++ b/src/main/java/cloud/fastreport/model/EmailTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.TransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -351,6 +352,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("delayedWasRunTime"); @@ -359,7 +362,6 @@ private String toIndentedString(Object o) { openapiFields.add("recurrentRunTime"); openapiFields.add("recurrentWasRunTime"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/EntityVM.java b/src/main/java/cloud/fastreport/model/EntityVM.java deleted file mode 100644 index b94e40b..0000000 --- a/src/main/java/cloud/fastreport/model/EntityVM.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * FastReport Cloud - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package cloud.fastreport.model; - -import java.util.Objects; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import cloud.fastreport.JSON; - -/** - * EntityVM - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EntityVM { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private String id; - - public static final String SERIALIZED_NAME_CREATED_TIME = "createdTime"; - @SerializedName(SERIALIZED_NAME_CREATED_TIME) - private OffsetDateTime createdTime; - - public static final String SERIALIZED_NAME_CREATOR_USER_ID = "creatorUserId"; - @SerializedName(SERIALIZED_NAME_CREATOR_USER_ID) - private String creatorUserId; - - public static final String SERIALIZED_NAME_EDITED_TIME = "editedTime"; - @SerializedName(SERIALIZED_NAME_EDITED_TIME) - private OffsetDateTime editedTime; - - public static final String SERIALIZED_NAME_EDITOR_USER_ID = "editorUserId"; - @SerializedName(SERIALIZED_NAME_EDITOR_USER_ID) - private String editorUserId; - - public static final String SERIALIZED_NAME_$_T = "$t"; - @SerializedName(SERIALIZED_NAME_$_T) - protected String $t; - - public EntityVM() { - this.$t = this.getClass().getSimpleName(); - } - - public EntityVM id(String id) { - this.id = id; - return this; - } - - /** - * Get id - * @return id - **/ - @javax.annotation.Nullable - public String getId() { - return id; - } - - public void setId(String id) { - this.id = id; - } - - - public EntityVM createdTime(OffsetDateTime createdTime) { - this.createdTime = createdTime; - return this; - } - - /** - * Get createdTime - * @return createdTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getCreatedTime() { - return createdTime; - } - - public void setCreatedTime(OffsetDateTime createdTime) { - this.createdTime = createdTime; - } - - - public EntityVM creatorUserId(String creatorUserId) { - this.creatorUserId = creatorUserId; - return this; - } - - /** - * Get creatorUserId - * @return creatorUserId - **/ - @javax.annotation.Nullable - public String getCreatorUserId() { - return creatorUserId; - } - - public void setCreatorUserId(String creatorUserId) { - this.creatorUserId = creatorUserId; - } - - - public EntityVM editedTime(OffsetDateTime editedTime) { - this.editedTime = editedTime; - return this; - } - - /** - * Get editedTime - * @return editedTime - **/ - @javax.annotation.Nullable - public OffsetDateTime getEditedTime() { - return editedTime; - } - - public void setEditedTime(OffsetDateTime editedTime) { - this.editedTime = editedTime; - } - - - public EntityVM editorUserId(String editorUserId) { - this.editorUserId = editorUserId; - return this; - } - - /** - * Get editorUserId - * @return editorUserId - **/ - @javax.annotation.Nullable - public String getEditorUserId() { - return editorUserId; - } - - public void setEditorUserId(String editorUserId) { - this.editorUserId = editorUserId; - } - - - public EntityVM $t(String $t) { - this.$t = $t; - return this; - } - - /** - * Get $t - * @return $t - **/ - @javax.annotation.Nonnull - public String get$T() { - return $t; - } - - public void set$T(String $t) { - this.$t = $t; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - EntityVM entityVM = (EntityVM) o; - return Objects.equals(this.id, entityVM.id) && - Objects.equals(this.createdTime, entityVM.createdTime) && - Objects.equals(this.creatorUserId, entityVM.creatorUserId) && - Objects.equals(this.editedTime, entityVM.editedTime) && - Objects.equals(this.editorUserId, entityVM.editorUserId) && - Objects.equals(this.$t, entityVM.$t); - } - - private static boolean equalsNullable(JsonNullable a, JsonNullable b) { - return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); - } - - @Override - public int hashCode() { - return Objects.hash(id, createdTime, creatorUserId, editedTime, editorUserId, $t); - } - - private static int hashCodeNullable(JsonNullable a) { - if (a == null) { - return 1; - } - return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EntityVM {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); - sb.append(" creatorUserId: ").append(toIndentedString(creatorUserId)).append("\n"); - sb.append(" editedTime: ").append(toIndentedString(editedTime)).append("\n"); - sb.append(" editorUserId: ").append(toIndentedString(editorUserId)).append("\n"); - sb.append(" $t: ").append(toIndentedString($t)).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 "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("id"); - openapiFields.add("createdTime"); - openapiFields.add("creatorUserId"); - openapiFields.add("editedTime"); - openapiFields.add("editorUserId"); - openapiFields.add("$t"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("$t"); - } - - /** - * Validates the JSON Element and throws an exception if issues found - * - * @param jsonElement JSON Element - * @throws IOException if the JSON Element is invalid with respect to EntityVM - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EntityVM.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format("The required field(s) %s in EntityVM is not found in the empty JSON string", EntityVM.openapiRequiredFields.toString())); - } - } - - String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); - switch (discriminatorValue) { - case "ExportVM": - ExportVM.validateJsonElement(jsonElement); - break; - case "FileVM": - FileVM.validateJsonElement(jsonElement); - break; - case "ReportVM": - ReportVM.validateJsonElement(jsonElement); - break; - case "TemplateVM": - TemplateVM.validateJsonElement(jsonElement); - break; - default: - throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); - } - } - - - /** - * Create an instance of EntityVM given an JSON string - * - * @param jsonString JSON string - * @return An instance of EntityVM - * @throws IOException if the JSON string is invalid with respect to EntityVM - */ - public static EntityVM fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EntityVM.class); - } - - /** - * Convert an instance of EntityVM to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/cloud/fastreport/model/ExportCreateAdminVM.java b/src/main/java/cloud/fastreport/model/ExportCreateAdminVM.java index 1c87cee..fd1fba0 100644 --- a/src/main/java/cloud/fastreport/model/ExportCreateAdminVM.java +++ b/src/main/java/cloud/fastreport/model/ExportCreateAdminVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.ExportCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,7 +54,7 @@ * ExportCreateAdminVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExportCreateAdminVM { +public class ExportCreateAdminVM extends ExportCreateVM { public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) private String ownerId; @@ -62,23 +63,8 @@ public class ExportCreateAdminVM { @SerializedName(SERIALIZED_NAME_PARENT_ID) private String parentId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private byte[] content; - public ExportCreateAdminVM() { + this.$t = this.getClass().getSimpleName(); } public ExportCreateAdminVM ownerId(String ownerId) { @@ -119,90 +105,6 @@ public void setParentId(String parentId) { } - public ExportCreateAdminVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public ExportCreateAdminVM tags(List tags) { - this.tags = tags; - return this; - } - - public ExportCreateAdminVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public ExportCreateAdminVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - - public ExportCreateAdminVM content(byte[] content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - **/ - @javax.annotation.Nullable - public byte[] getContent() { - return content; - } - - public void setContent(byte[] content) { - this.content = content; - } - - @Override public boolean equals(Object o) { @@ -215,10 +117,7 @@ public boolean equals(Object o) { ExportCreateAdminVM exportCreateAdminVM = (ExportCreateAdminVM) o; return Objects.equals(this.ownerId, exportCreateAdminVM.ownerId) && Objects.equals(this.parentId, exportCreateAdminVM.parentId) && - Objects.equals(this.name, exportCreateAdminVM.name) && - Objects.equals(this.tags, exportCreateAdminVM.tags) && - Arrays.equals(this.icon, exportCreateAdminVM.icon) && - Arrays.equals(this.content, exportCreateAdminVM.content); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -227,7 +126,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ownerId, parentId, name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash(ownerId, parentId, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -241,12 +140,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExportCreateAdminVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append("}"); return sb.toString(); } @@ -269,6 +165,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("templateId"); + openapiFields.add("reportId"); + openapiFields.add("$t"); openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); @@ -278,6 +177,7 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("ownerId"); openapiRequiredFields.add("parentId"); + openapiRequiredFields.add("$t"); } /** @@ -307,20 +207,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if (!jsonObj.get("parentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/cloud/fastreport/model/ExportCreateVM.java b/src/main/java/cloud/fastreport/model/ExportCreateVM.java index 4bc9843..17d1451 100644 --- a/src/main/java/cloud/fastreport/model/ExportCreateVM.java +++ b/src/main/java/cloud/fastreport/model/ExportCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FileCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,7 +54,7 @@ * ExportCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExportCreateVM { +public class ExportCreateVM extends FileCreateVM { public static final String SERIALIZED_NAME_TEMPLATE_ID = "templateId"; @SerializedName(SERIALIZED_NAME_TEMPLATE_ID) private String templateId; @@ -62,23 +63,12 @@ public class ExportCreateVM { @SerializedName(SERIALIZED_NAME_REPORT_ID) private String reportId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private byte[] content; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; public ExportCreateVM() { + this.$t = this.getClass().getSimpleName(); } public ExportCreateVM templateId(String templateId) { @@ -119,87 +109,22 @@ public void setReportId(String reportId) { } - public ExportCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public ExportCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public ExportCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public ExportCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - - public ExportCreateVM content(byte[] content) { - this.content = content; + public ExportCreateVM $t(String $t) { + this.$t = $t; return this; } /** - * Get content - * @return content + * Get $t + * @return $t **/ - @javax.annotation.Nullable - public byte[] getContent() { - return content; + @javax.annotation.Nonnull + public String get$T() { + return $t; } - public void setContent(byte[] content) { - this.content = content; + public void set$T(String $t) { + this.$t = $t; } @@ -215,10 +140,8 @@ public boolean equals(Object o) { ExportCreateVM exportCreateVM = (ExportCreateVM) o; return Objects.equals(this.templateId, exportCreateVM.templateId) && Objects.equals(this.reportId, exportCreateVM.reportId) && - Objects.equals(this.name, exportCreateVM.name) && - Objects.equals(this.tags, exportCreateVM.tags) && - Arrays.equals(this.icon, exportCreateVM.icon) && - Arrays.equals(this.content, exportCreateVM.content); + Objects.equals(this.$t, exportCreateVM.$t) && + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -227,7 +150,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(templateId, reportId, name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash(templateId, reportId, $t, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -241,12 +164,10 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExportCreateVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); sb.append(" reportId: ").append(toIndentedString(reportId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -273,9 +194,11 @@ private String toIndentedString(Object o) { openapiFields.add("tags"); openapiFields.add("icon"); openapiFields.add("content"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -291,57 +214,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ExportCreateVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("templateId") != null && !jsonObj.get("templateId").isJsonNull()) && !jsonObj.get("templateId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `templateId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("templateId").toString())); - } - if ((jsonObj.get("reportId") != null && !jsonObj.get("reportId").isJsonNull()) && !jsonObj.get("reportId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `reportId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("reportId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "ExportCreateAdminVM": + ExportCreateAdminVM.validateJsonElement(jsonElement); + break; + case "ExportCreateVM": + ExportCreateVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExportCreateVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExportCreateVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExportCreateVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExportCreateVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExportCreateVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of ExportCreateVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/ExportFolderCreateVM.java b/src/main/java/cloud/fastreport/model/ExportFolderCreateVM.java index 0be09cb..5adc16a 100644 --- a/src/main/java/cloud/fastreport/model/ExportFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/ExportFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,87 +54,11 @@ * ExportFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExportFolderCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - +public class ExportFolderCreateVM extends FolderCreateVM { public ExportFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public ExportFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public ExportFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public ExportFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public ExportFolderCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - @Override public boolean equals(Object o) { @@ -143,10 +68,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ExportFolderCreateVM exportFolderCreateVM = (ExportFolderCreateVM) o; - return Objects.equals(this.name, exportFolderCreateVM.name) && - Objects.equals(this.tags, exportFolderCreateVM.tags) && - Arrays.equals(this.icon, exportFolderCreateVM.icon); + return super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +77,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -169,9 +91,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ExportFolderCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -197,9 +117,11 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -222,13 +144,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExportFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ExportFolderCreateVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } } diff --git a/src/main/java/cloud/fastreport/model/ExportReportTaskVM.java b/src/main/java/cloud/fastreport/model/ExportReportTaskVM.java index 09c1b07..f7697a2 100644 --- a/src/main/java/cloud/fastreport/model/ExportReportTaskVM.java +++ b/src/main/java/cloud/fastreport/model/ExportReportTaskVM.java @@ -15,6 +15,8 @@ import java.util.Objects; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.TransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -23,8 +25,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -227,6 +231,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transportIds"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("delayedWasRunTime"); @@ -235,7 +244,6 @@ private String toIndentedString(Object o) { openapiFields.add("recurrentRunTime"); openapiFields.add("recurrentWasRunTime"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/ExportTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/ExportTemplateTaskVM.java index 1906a54..168b5ac 100644 --- a/src/main/java/cloud/fastreport/model/ExportTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/ExportTemplateTaskVM.java @@ -14,7 +14,10 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.ExportFormat; import cloud.fastreport.model.ExportReportTaskVM; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,8 +25,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -149,6 +154,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("exportParameters"); + openapiFields.add("format"); + openapiFields.add("pagesCount"); + openapiFields.add("$t"); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transportIds"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("delayedWasRunTime"); @@ -157,7 +170,6 @@ private String toIndentedString(Object o) { openapiFields.add("recurrentRunTime"); openapiFields.add("recurrentWasRunTime"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/ExportVM.java b/src/main/java/cloud/fastreport/model/ExportVM.java index 93308bf..639422d 100644 --- a/src/main/java/cloud/fastreport/model/ExportVM.java +++ b/src/main/java/cloud/fastreport/model/ExportVM.java @@ -15,6 +15,9 @@ import java.util.Objects; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.FileStatus; +import cloud.fastreport.model.FileStatusReason; +import cloud.fastreport.model.FileType; import cloud.fastreport.model.FileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -23,7 +26,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -195,6 +200,17 @@ private String toIndentedString(Object o) { openapiFields.add("creatorUserId"); openapiFields.add("editedTime"); openapiFields.add("editorUserId"); + openapiFields.add("name"); + openapiFields.add("parentId"); + openapiFields.add("tags"); + openapiFields.add("icon"); + openapiFields.add("type"); + openapiFields.add("size"); + openapiFields.add("subscriptionId"); + openapiFields.add("status"); + openapiFields.add("statusReason"); + openapiFields.add("errorMessage"); + openapiFields.add("isDeleted"); openapiFields.add("$t"); // a set of required properties/fields (JSON key names) diff --git a/src/main/java/cloud/fastreport/model/FTPUploadTaskVM.java b/src/main/java/cloud/fastreport/model/FTPUploadTaskVM.java index 6d73dfa..2c6dea7 100644 --- a/src/main/java/cloud/fastreport/model/FTPUploadTaskVM.java +++ b/src/main/java/cloud/fastreport/model/FTPUploadTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.TransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -289,6 +290,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("delayedWasRunTime"); @@ -297,7 +300,6 @@ private String toIndentedString(Object o) { openapiFields.add("recurrentRunTime"); openapiFields.add("recurrentWasRunTime"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/FileCreateVM.java b/src/main/java/cloud/fastreport/model/FileCreateVM.java index 8999f5c..5bdd4d5 100644 --- a/src/main/java/cloud/fastreport/model/FileCreateVM.java +++ b/src/main/java/cloud/fastreport/model/FileCreateVM.java @@ -70,7 +70,12 @@ public class FileCreateVM { @SerializedName(SERIALIZED_NAME_CONTENT) private byte[] content; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; + public FileCreateVM() { + this.$t = this.getClass().getSimpleName(); } public FileCreateVM name(String name) { @@ -157,6 +162,25 @@ public void setContent(byte[] content) { } + public FileCreateVM $t(String $t) { + this.$t = $t; + return this; + } + + /** + * Get $t + * @return $t + **/ + @javax.annotation.Nonnull + public String get$T() { + return $t; + } + + public void set$T(String $t) { + this.$t = $t; + } + + @Override public boolean equals(Object o) { @@ -170,7 +194,8 @@ public boolean equals(Object o) { return Objects.equals(this.name, fileCreateVM.name) && Objects.equals(this.tags, fileCreateVM.tags) && Arrays.equals(this.icon, fileCreateVM.icon) && - Arrays.equals(this.content, fileCreateVM.content); + Arrays.equals(this.content, fileCreateVM.content) && + Objects.equals(this.$t, fileCreateVM.$t); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -179,7 +204,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash(name, tags, Arrays.hashCode(icon), Arrays.hashCode(content), $t); } private static int hashCodeNullable(JsonNullable a) { @@ -197,6 +222,7 @@ public String toString() { sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -223,9 +249,11 @@ private String toIndentedString(Object o) { openapiFields.add("tags"); openapiFields.add("icon"); openapiFields.add("content"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -241,51 +269,34 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FileCreateVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FileCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "ExportCreateAdminVM": + ExportCreateAdminVM.validateJsonElement(jsonElement); + break; + case "ExportCreateVM": + ExportCreateVM.validateJsonElement(jsonElement); + break; + case "FileCreateVM": + FileCreateVM.validateJsonElement(jsonElement); + break; + case "ReportCreateAdminVM": + ReportCreateAdminVM.validateJsonElement(jsonElement); + break; + case "ReportCreateVM": + ReportCreateVM.validateJsonElement(jsonElement); + break; + case "TemplateCreateAdminVM": + TemplateCreateAdminVM.validateJsonElement(jsonElement); + break; + case "TemplateCreateVM": + TemplateCreateVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FileCreateVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FileCreateVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FileCreateVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FileCreateVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FileCreateVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of FileCreateVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/FileVM.java b/src/main/java/cloud/fastreport/model/FileVM.java index d7a4536..d1907d4 100644 --- a/src/main/java/cloud/fastreport/model/FileVM.java +++ b/src/main/java/cloud/fastreport/model/FileVM.java @@ -14,7 +14,6 @@ package cloud.fastreport.model; import java.util.Objects; -import cloud.fastreport.model.EntityVM; import cloud.fastreport.model.FileStatus; import cloud.fastreport.model.FileStatusReason; import cloud.fastreport.model.FileType; @@ -58,7 +57,27 @@ * FileVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class FileVM extends EntityVM { +public class FileVM { + public static final String SERIALIZED_NAME_ID = "id"; + @SerializedName(SERIALIZED_NAME_ID) + private String id; + + public static final String SERIALIZED_NAME_CREATED_TIME = "createdTime"; + @SerializedName(SERIALIZED_NAME_CREATED_TIME) + private OffsetDateTime createdTime; + + public static final String SERIALIZED_NAME_CREATOR_USER_ID = "creatorUserId"; + @SerializedName(SERIALIZED_NAME_CREATOR_USER_ID) + private String creatorUserId; + + public static final String SERIALIZED_NAME_EDITED_TIME = "editedTime"; + @SerializedName(SERIALIZED_NAME_EDITED_TIME) + private OffsetDateTime editedTime; + + public static final String SERIALIZED_NAME_EDITOR_USER_ID = "editorUserId"; + @SerializedName(SERIALIZED_NAME_EDITOR_USER_ID) + private String editorUserId; + public static final String SERIALIZED_NAME_NAME = "name"; @SerializedName(SERIALIZED_NAME_NAME) private String name; @@ -111,6 +130,101 @@ public FileVM() { this.$t = this.getClass().getSimpleName(); } + public FileVM id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @javax.annotation.Nullable + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public FileVM createdTime(OffsetDateTime createdTime) { + this.createdTime = createdTime; + return this; + } + + /** + * Get createdTime + * @return createdTime + **/ + @javax.annotation.Nullable + public OffsetDateTime getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(OffsetDateTime createdTime) { + this.createdTime = createdTime; + } + + + public FileVM creatorUserId(String creatorUserId) { + this.creatorUserId = creatorUserId; + return this; + } + + /** + * Get creatorUserId + * @return creatorUserId + **/ + @javax.annotation.Nullable + public String getCreatorUserId() { + return creatorUserId; + } + + public void setCreatorUserId(String creatorUserId) { + this.creatorUserId = creatorUserId; + } + + + public FileVM editedTime(OffsetDateTime editedTime) { + this.editedTime = editedTime; + return this; + } + + /** + * Get editedTime + * @return editedTime + **/ + @javax.annotation.Nullable + public OffsetDateTime getEditedTime() { + return editedTime; + } + + public void setEditedTime(OffsetDateTime editedTime) { + this.editedTime = editedTime; + } + + + public FileVM editorUserId(String editorUserId) { + this.editorUserId = editorUserId; + return this; + } + + /** + * Get editorUserId + * @return editorUserId + **/ + @javax.annotation.Nullable + public String getEditorUserId() { + return editorUserId; + } + + public void setEditorUserId(String editorUserId) { + this.editorUserId = editorUserId; + } + + public FileVM name(String name) { this.name = name; return this; @@ -357,7 +471,12 @@ public boolean equals(Object o) { return false; } FileVM fileVM = (FileVM) o; - return Objects.equals(this.name, fileVM.name) && + return Objects.equals(this.id, fileVM.id) && + Objects.equals(this.createdTime, fileVM.createdTime) && + Objects.equals(this.creatorUserId, fileVM.creatorUserId) && + Objects.equals(this.editedTime, fileVM.editedTime) && + Objects.equals(this.editorUserId, fileVM.editorUserId) && + Objects.equals(this.name, fileVM.name) && Objects.equals(this.parentId, fileVM.parentId) && Objects.equals(this.tags, fileVM.tags) && Arrays.equals(this.icon, fileVM.icon) && @@ -368,8 +487,7 @@ public boolean equals(Object o) { Objects.equals(this.statusReason, fileVM.statusReason) && Objects.equals(this.errorMessage, fileVM.errorMessage) && Objects.equals(this.isDeleted, fileVM.isDeleted) && - Objects.equals(this.$t, fileVM.$t) && - super.equals(o); + Objects.equals(this.$t, fileVM.$t); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -378,7 +496,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, parentId, tags, Arrays.hashCode(icon), type, size, subscriptionId, status, statusReason, errorMessage, isDeleted, $t, super.hashCode()); + return Objects.hash(id, createdTime, creatorUserId, editedTime, editorUserId, name, parentId, tags, Arrays.hashCode(icon), type, size, subscriptionId, status, statusReason, errorMessage, isDeleted, $t); } private static int hashCodeNullable(JsonNullable a) { @@ -392,7 +510,11 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileVM {\n"); - sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" createdTime: ").append(toIndentedString(createdTime)).append("\n"); + sb.append(" creatorUserId: ").append(toIndentedString(creatorUserId)).append("\n"); + sb.append(" editedTime: ").append(toIndentedString(editedTime)).append("\n"); + sb.append(" editorUserId: ").append(toIndentedString(editorUserId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); @@ -432,6 +554,17 @@ private String toIndentedString(Object o) { openapiFields.add("creatorUserId"); openapiFields.add("editedTime"); openapiFields.add("editorUserId"); + openapiFields.add("name"); + openapiFields.add("parentId"); + openapiFields.add("tags"); + openapiFields.add("icon"); + openapiFields.add("type"); + openapiFields.add("size"); + openapiFields.add("subscriptionId"); + openapiFields.add("status"); + openapiFields.add("statusReason"); + openapiFields.add("errorMessage"); + openapiFields.add("isDeleted"); openapiFields.add("$t"); // a set of required properties/fields (JSON key names) diff --git a/src/main/java/cloud/fastreport/model/FolderCreateVM.java b/src/main/java/cloud/fastreport/model/FolderCreateVM.java index 99634c0..e669af8 100644 --- a/src/main/java/cloud/fastreport/model/FolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/FolderCreateVM.java @@ -66,7 +66,12 @@ public class FolderCreateVM { @SerializedName(SERIALIZED_NAME_ICON) private byte[] icon; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; + public FolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } public FolderCreateVM name(String name) { @@ -134,6 +139,25 @@ public void setIcon(byte[] icon) { } + public FolderCreateVM $t(String $t) { + this.$t = $t; + return this; + } + + /** + * Get $t + * @return $t + **/ + @javax.annotation.Nonnull + public String get$T() { + return $t; + } + + public void set$T(String $t) { + this.$t = $t; + } + + @Override public boolean equals(Object o) { @@ -146,7 +170,8 @@ public boolean equals(Object o) { FolderCreateVM folderCreateVM = (FolderCreateVM) o; return Objects.equals(this.name, folderCreateVM.name) && Objects.equals(this.tags, folderCreateVM.tags) && - Arrays.equals(this.icon, folderCreateVM.icon); + Arrays.equals(this.icon, folderCreateVM.icon) && + Objects.equals(this.$t, folderCreateVM.$t); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +180,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(name, tags, Arrays.hashCode(icon), $t); } private static int hashCodeNullable(JsonNullable a) { @@ -172,6 +197,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -197,9 +223,11 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -215,51 +243,37 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!FolderCreateVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `FolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "AdminExportFolderCreateVM": + AdminExportFolderCreateVM.validateJsonElement(jsonElement); + break; + case "AdminFolderCreateVM": + AdminFolderCreateVM.validateJsonElement(jsonElement); + break; + case "AdminReportFolderCreateVM": + AdminReportFolderCreateVM.validateJsonElement(jsonElement); + break; + case "AdminTemplateFolderCreateVM": + AdminTemplateFolderCreateVM.validateJsonElement(jsonElement); + break; + case "ExportFolderCreateVM": + ExportFolderCreateVM.validateJsonElement(jsonElement); + break; + case "FolderCreateVM": + FolderCreateVM.validateJsonElement(jsonElement); + break; + case "ReportFolderCreateVM": + ReportFolderCreateVM.validateJsonElement(jsonElement); + break; + case "TemplateFolderCreateVM": + TemplateFolderCreateVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!FolderCreateVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'FolderCreateVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(FolderCreateVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, FolderCreateVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public FolderCreateVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of FolderCreateVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/HttpValidationProblemDetails.java b/src/main/java/cloud/fastreport/model/HttpValidationProblemDetails.java index 471b441..0f71794 100644 --- a/src/main/java/cloud/fastreport/model/HttpValidationProblemDetails.java +++ b/src/main/java/cloud/fastreport/model/HttpValidationProblemDetails.java @@ -372,7 +372,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } diff --git a/src/main/java/cloud/fastreport/model/PrepareTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/PrepareTemplateTaskVM.java index 3941c7b..0245521 100644 --- a/src/main/java/cloud/fastreport/model/PrepareTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/PrepareTemplateTaskVM.java @@ -14,6 +14,8 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.TransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -211,6 +213,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transportIds"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("delayedWasRunTime"); @@ -219,7 +226,6 @@ private String toIndentedString(Object o) { openapiFields.add("recurrentRunTime"); openapiFields.add("recurrentWasRunTime"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/ProblemDetails.java b/src/main/java/cloud/fastreport/model/ProblemDetails.java index 468b475..e1f7d49 100644 --- a/src/main/java/cloud/fastreport/model/ProblemDetails.java +++ b/src/main/java/cloud/fastreport/model/ProblemDetails.java @@ -345,7 +345,12 @@ else if (entry.getValue() instanceof Boolean) else if (entry.getValue() instanceof Character) obj.addProperty(entry.getKey(), (Character) entry.getValue()); else { - obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject()); + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } } } } diff --git a/src/main/java/cloud/fastreport/model/ReportCreateAdminVM.java b/src/main/java/cloud/fastreport/model/ReportCreateAdminVM.java index 32d2191..db5d14a 100644 --- a/src/main/java/cloud/fastreport/model/ReportCreateAdminVM.java +++ b/src/main/java/cloud/fastreport/model/ReportCreateAdminVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.ReportCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,7 +54,7 @@ * ReportCreateAdminVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReportCreateAdminVM { +public class ReportCreateAdminVM extends ReportCreateVM { public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) private String ownerId; @@ -62,23 +63,8 @@ public class ReportCreateAdminVM { @SerializedName(SERIALIZED_NAME_PARENT_ID) private String parentId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private byte[] content; - public ReportCreateAdminVM() { + this.$t = this.getClass().getSimpleName(); } public ReportCreateAdminVM ownerId(String ownerId) { @@ -119,90 +105,6 @@ public void setParentId(String parentId) { } - public ReportCreateAdminVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public ReportCreateAdminVM tags(List tags) { - this.tags = tags; - return this; - } - - public ReportCreateAdminVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public ReportCreateAdminVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - - public ReportCreateAdminVM content(byte[] content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - **/ - @javax.annotation.Nullable - public byte[] getContent() { - return content; - } - - public void setContent(byte[] content) { - this.content = content; - } - - @Override public boolean equals(Object o) { @@ -215,10 +117,7 @@ public boolean equals(Object o) { ReportCreateAdminVM reportCreateAdminVM = (ReportCreateAdminVM) o; return Objects.equals(this.ownerId, reportCreateAdminVM.ownerId) && Objects.equals(this.parentId, reportCreateAdminVM.parentId) && - Objects.equals(this.name, reportCreateAdminVM.name) && - Objects.equals(this.tags, reportCreateAdminVM.tags) && - Arrays.equals(this.icon, reportCreateAdminVM.icon) && - Arrays.equals(this.content, reportCreateAdminVM.content); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -227,7 +126,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ownerId, parentId, name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash(ownerId, parentId, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -241,12 +140,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportCreateAdminVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append("}"); return sb.toString(); } @@ -269,6 +165,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("templateId"); + openapiFields.add("$t"); openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); @@ -278,6 +176,7 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("ownerId"); openapiRequiredFields.add("parentId"); + openapiRequiredFields.add("$t"); } /** @@ -307,20 +206,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if (!jsonObj.get("parentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/cloud/fastreport/model/ReportCreateVM.java b/src/main/java/cloud/fastreport/model/ReportCreateVM.java index e073ef1..02f9640 100644 --- a/src/main/java/cloud/fastreport/model/ReportCreateVM.java +++ b/src/main/java/cloud/fastreport/model/ReportCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FileCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,28 +54,17 @@ * ReportCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReportCreateVM { +public class ReportCreateVM extends FileCreateVM { public static final String SERIALIZED_NAME_TEMPLATE_ID = "templateId"; @SerializedName(SERIALIZED_NAME_TEMPLATE_ID) private String templateId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private byte[] content; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; public ReportCreateVM() { + this.$t = this.getClass().getSimpleName(); } public ReportCreateVM templateId(String templateId) { @@ -96,87 +86,22 @@ public void setTemplateId(String templateId) { } - public ReportCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public ReportCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public ReportCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); + public ReportCreateVM $t(String $t) { + this.$t = $t; return this; } /** - * Get tags - * @return tags + * Get $t + * @return $t **/ - @javax.annotation.Nullable - public List getTags() { - return tags; + @javax.annotation.Nonnull + public String get$T() { + return $t; } - public void setTags(List tags) { - this.tags = tags; - } - - - public ReportCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - - public ReportCreateVM content(byte[] content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - **/ - @javax.annotation.Nullable - public byte[] getContent() { - return content; - } - - public void setContent(byte[] content) { - this.content = content; + public void set$T(String $t) { + this.$t = $t; } @@ -191,10 +116,8 @@ public boolean equals(Object o) { } ReportCreateVM reportCreateVM = (ReportCreateVM) o; return Objects.equals(this.templateId, reportCreateVM.templateId) && - Objects.equals(this.name, reportCreateVM.name) && - Objects.equals(this.tags, reportCreateVM.tags) && - Arrays.equals(this.icon, reportCreateVM.icon) && - Arrays.equals(this.content, reportCreateVM.content); + Objects.equals(this.$t, reportCreateVM.$t) && + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -203,7 +126,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(templateId, name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash(templateId, $t, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -217,11 +140,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportCreateVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" templateId: ").append(toIndentedString(templateId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -248,9 +169,11 @@ private String toIndentedString(Object o) { openapiFields.add("tags"); openapiFields.add("icon"); openapiFields.add("content"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -266,54 +189,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!ReportCreateVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReportCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("templateId") != null && !jsonObj.get("templateId").isJsonNull()) && !jsonObj.get("templateId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `templateId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("templateId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "ReportCreateAdminVM": + ReportCreateAdminVM.validateJsonElement(jsonElement); + break; + case "ReportCreateVM": + ReportCreateVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ReportCreateVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ReportCreateVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ReportCreateVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ReportCreateVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ReportCreateVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of ReportCreateVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/ReportFolderCreateVM.java b/src/main/java/cloud/fastreport/model/ReportFolderCreateVM.java index 97c87e1..075f5fe 100644 --- a/src/main/java/cloud/fastreport/model/ReportFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/ReportFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,87 +54,11 @@ * ReportFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ReportFolderCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - +public class ReportFolderCreateVM extends FolderCreateVM { public ReportFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public ReportFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public ReportFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public ReportFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public ReportFolderCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - @Override public boolean equals(Object o) { @@ -143,10 +68,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ReportFolderCreateVM reportFolderCreateVM = (ReportFolderCreateVM) o; - return Objects.equals(this.name, reportFolderCreateVM.name) && - Objects.equals(this.tags, reportFolderCreateVM.tags) && - Arrays.equals(this.icon, reportFolderCreateVM.icon); + return super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +77,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -169,9 +91,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ReportFolderCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -197,9 +117,11 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -222,13 +144,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ReportFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ReportFolderCreateVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } } diff --git a/src/main/java/cloud/fastreport/model/ReportVM.java b/src/main/java/cloud/fastreport/model/ReportVM.java index 9f34cc1..abbc832 100644 --- a/src/main/java/cloud/fastreport/model/ReportVM.java +++ b/src/main/java/cloud/fastreport/model/ReportVM.java @@ -14,6 +14,9 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FileStatus; +import cloud.fastreport.model.FileStatusReason; +import cloud.fastreport.model.FileType; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.ReportInfo; import com.google.gson.TypeAdapter; @@ -23,7 +26,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -170,6 +175,17 @@ private String toIndentedString(Object o) { openapiFields.add("creatorUserId"); openapiFields.add("editedTime"); openapiFields.add("editorUserId"); + openapiFields.add("name"); + openapiFields.add("parentId"); + openapiFields.add("tags"); + openapiFields.add("icon"); + openapiFields.add("type"); + openapiFields.add("size"); + openapiFields.add("subscriptionId"); + openapiFields.add("status"); + openapiFields.add("statusReason"); + openapiFields.add("errorMessage"); + openapiFields.add("isDeleted"); openapiFields.add("$t"); // a set of required properties/fields (JSON key names) diff --git a/src/main/java/cloud/fastreport/model/RunEmailTaskVM.java b/src/main/java/cloud/fastreport/model/RunEmailTaskVM.java index a8d4236..2be75b2 100644 --- a/src/main/java/cloud/fastreport/model/RunEmailTaskVM.java +++ b/src/main/java/cloud/fastreport/model/RunEmailTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -375,8 +376,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("subscriptionId"); + openapiFields.add("inputFile"); openapiFields.add("$t"); + openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/RunExportReportTaskVM.java b/src/main/java/cloud/fastreport/model/RunExportReportTaskVM.java index 2b93336..a0e164b 100644 --- a/src/main/java/cloud/fastreport/model/RunExportReportTaskVM.java +++ b/src/main/java/cloud/fastreport/model/RunExportReportTaskVM.java @@ -15,15 +15,20 @@ import java.util.Objects; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.OutputFileVM; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransformTaskBaseVM; +import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -226,8 +231,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("subscriptionId"); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transports"); openapiFields.add("$t"); + openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/RunExportTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/RunExportTemplateTaskVM.java index ea1cfe8..56ad227 100644 --- a/src/main/java/cloud/fastreport/model/RunExportTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/RunExportTemplateTaskVM.java @@ -14,15 +14,21 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.RunExportReportTaskVM; +import cloud.fastreport.model.RunInputFileVM; +import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -148,8 +154,15 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("subscriptionId"); + openapiFields.add("exportParameters"); + openapiFields.add("format"); + openapiFields.add("pagesCount"); openapiFields.add("$t"); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transports"); + openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/RunFTPUploadTaskVM.java b/src/main/java/cloud/fastreport/model/RunFTPUploadTaskVM.java index 0d798f1..0c2d343 100644 --- a/src/main/java/cloud/fastreport/model/RunFTPUploadTaskVM.java +++ b/src/main/java/cloud/fastreport/model/RunFTPUploadTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -313,8 +314,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("subscriptionId"); + openapiFields.add("inputFile"); openapiFields.add("$t"); + openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/RunPrepareTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/RunPrepareTemplateTaskVM.java index eb1e7c3..df17670 100644 --- a/src/main/java/cloud/fastreport/model/RunPrepareTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/RunPrepareTemplateTaskVM.java @@ -14,8 +14,11 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.RunExportReportTaskVM; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransformTaskBaseVM; +import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -211,8 +214,12 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("subscriptionId"); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transports"); openapiFields.add("$t"); + openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/RunWebhookTaskVM.java b/src/main/java/cloud/fastreport/model/RunWebhookTaskVM.java index 16d893e..5382900 100644 --- a/src/main/java/cloud/fastreport/model/RunWebhookTaskVM.java +++ b/src/main/java/cloud/fastreport/model/RunWebhookTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -174,8 +175,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); - openapiFields.add("subscriptionId"); + openapiFields.add("inputFile"); openapiFields.add("$t"); + openapiFields.add("subscriptionId"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/SubscriptionVM.java b/src/main/java/cloud/fastreport/model/SubscriptionVM.java index 64b8a95..83cd9a2 100644 --- a/src/main/java/cloud/fastreport/model/SubscriptionVM.java +++ b/src/main/java/cloud/fastreport/model/SubscriptionVM.java @@ -88,7 +88,12 @@ public class SubscriptionVM { @SerializedName(SERIALIZED_NAME_EXPORTS_FOLDER) private SubscriptionFolder exportsFolder; + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; + public SubscriptionVM() { + this.$t = this.getClass().getSimpleName(); } public SubscriptionVM id(String id) { @@ -251,6 +256,25 @@ public void setExportsFolder(SubscriptionFolder exportsFolder) { } + public SubscriptionVM $t(String $t) { + this.$t = $t; + return this; + } + + /** + * Get $t + * @return $t + **/ + @javax.annotation.Nonnull + public String get$T() { + return $t; + } + + public void set$T(String $t) { + this.$t = $t; + } + + @Override public boolean equals(Object o) { @@ -268,7 +292,8 @@ public boolean equals(Object o) { Objects.equals(this.old, subscriptionVM.old) && Objects.equals(this.templatesFolder, subscriptionVM.templatesFolder) && Objects.equals(this.reportsFolder, subscriptionVM.reportsFolder) && - Objects.equals(this.exportsFolder, subscriptionVM.exportsFolder); + Objects.equals(this.exportsFolder, subscriptionVM.exportsFolder) && + Objects.equals(this.$t, subscriptionVM.$t); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -277,7 +302,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, name, locale, current, old, templatesFolder, reportsFolder, exportsFolder); + return Objects.hash(id, name, locale, current, old, templatesFolder, reportsFolder, exportsFolder, $t); } private static int hashCodeNullable(JsonNullable a) { @@ -299,6 +324,7 @@ public String toString() { sb.append(" templatesFolder: ").append(toIndentedString(templatesFolder)).append("\n"); sb.append(" reportsFolder: ").append(toIndentedString(reportsFolder)).append("\n"); sb.append(" exportsFolder: ").append(toIndentedString(exportsFolder)).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -329,9 +355,11 @@ private String toIndentedString(Object o) { openapiFields.add("templatesFolder"); openapiFields.add("reportsFolder"); openapiFields.add("exportsFolder"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -347,83 +375,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!SubscriptionVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SubscriptionVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("locale") != null && !jsonObj.get("locale").isJsonNull()) && !jsonObj.get("locale").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `locale` to be a primitive type in the JSON string but got `%s`", jsonObj.get("locale").toString())); - } - // validate the optional field `current` - if (jsonObj.get("current") != null && !jsonObj.get("current").isJsonNull()) { - SubscriptionPeriodVM.validateJsonElement(jsonObj.get("current")); - } - if (jsonObj.get("old") != null && !jsonObj.get("old").isJsonNull()) { - JsonArray jsonArrayold = jsonObj.getAsJsonArray("old"); - if (jsonArrayold != null) { - // ensure the json data is an array - if (!jsonObj.get("old").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `old` to be an array in the JSON string but got `%s`", jsonObj.get("old").toString())); - } - - // validate the optional field `old` (array) - for (int i = 0; i < jsonArrayold.size(); i++) { - SubscriptionPeriodVM.validateJsonElement(jsonArrayold.get(i)); - }; - } - } - // validate the optional field `templatesFolder` - if (jsonObj.get("templatesFolder") != null && !jsonObj.get("templatesFolder").isJsonNull()) { - SubscriptionFolder.validateJsonElement(jsonObj.get("templatesFolder")); - } - // validate the optional field `reportsFolder` - if (jsonObj.get("reportsFolder") != null && !jsonObj.get("reportsFolder").isJsonNull()) { - SubscriptionFolder.validateJsonElement(jsonObj.get("reportsFolder")); - } - // validate the optional field `exportsFolder` - if (jsonObj.get("exportsFolder") != null && !jsonObj.get("exportsFolder").isJsonNull()) { - SubscriptionFolder.validateJsonElement(jsonObj.get("exportsFolder")); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "AdminSubscriptionVM": + AdminSubscriptionVM.validateJsonElement(jsonElement); + break; + case "SubscriptionVM": + SubscriptionVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!SubscriptionVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'SubscriptionVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(SubscriptionVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, SubscriptionVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public SubscriptionVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of SubscriptionVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/TemplateCreateAdminVM.java b/src/main/java/cloud/fastreport/model/TemplateCreateAdminVM.java index 1d3aad1..34243ef 100644 --- a/src/main/java/cloud/fastreport/model/TemplateCreateAdminVM.java +++ b/src/main/java/cloud/fastreport/model/TemplateCreateAdminVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.TemplateCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,7 +54,7 @@ * TemplateCreateAdminVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TemplateCreateAdminVM { +public class TemplateCreateAdminVM extends TemplateCreateVM { public static final String SERIALIZED_NAME_OWNER_ID = "ownerId"; @SerializedName(SERIALIZED_NAME_OWNER_ID) private String ownerId; @@ -62,23 +63,8 @@ public class TemplateCreateAdminVM { @SerializedName(SERIALIZED_NAME_PARENT_ID) private String parentId; - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private byte[] content; - public TemplateCreateAdminVM() { + this.$t = this.getClass().getSimpleName(); } public TemplateCreateAdminVM ownerId(String ownerId) { @@ -119,90 +105,6 @@ public void setParentId(String parentId) { } - public TemplateCreateAdminVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public TemplateCreateAdminVM tags(List tags) { - this.tags = tags; - return this; - } - - public TemplateCreateAdminVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public TemplateCreateAdminVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - - public TemplateCreateAdminVM content(byte[] content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - **/ - @javax.annotation.Nullable - public byte[] getContent() { - return content; - } - - public void setContent(byte[] content) { - this.content = content; - } - - @Override public boolean equals(Object o) { @@ -215,10 +117,7 @@ public boolean equals(Object o) { TemplateCreateAdminVM templateCreateAdminVM = (TemplateCreateAdminVM) o; return Objects.equals(this.ownerId, templateCreateAdminVM.ownerId) && Objects.equals(this.parentId, templateCreateAdminVM.parentId) && - Objects.equals(this.name, templateCreateAdminVM.name) && - Objects.equals(this.tags, templateCreateAdminVM.tags) && - Arrays.equals(this.icon, templateCreateAdminVM.icon) && - Arrays.equals(this.content, templateCreateAdminVM.content); + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -227,7 +126,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(ownerId, parentId, name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash(ownerId, parentId, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -241,12 +140,9 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TemplateCreateAdminVM {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" ownerId: ").append(toIndentedString(ownerId)).append("\n"); sb.append(" parentId: ").append(toIndentedString(parentId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); sb.append("}"); return sb.toString(); } @@ -269,6 +165,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("$t"); openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); @@ -278,6 +175,7 @@ private String toIndentedString(Object o) { openapiRequiredFields = new HashSet(); openapiRequiredFields.add("ownerId"); openapiRequiredFields.add("parentId"); + openapiRequiredFields.add("$t"); } /** @@ -307,20 +205,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("ownerId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerId").toString())); - } - if (!jsonObj.get("parentId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentId").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/cloud/fastreport/model/TemplateCreateVM.java b/src/main/java/cloud/fastreport/model/TemplateCreateVM.java index bb21503..9ca54eb 100644 --- a/src/main/java/cloud/fastreport/model/TemplateCreateVM.java +++ b/src/main/java/cloud/fastreport/model/TemplateCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FileCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,107 +54,31 @@ * TemplateCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TemplateCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private byte[] content; +public class TemplateCreateVM extends FileCreateVM { + public static final String SERIALIZED_NAME_$_T = "$t"; + @SerializedName(SERIALIZED_NAME_$_T) + protected String $t; public TemplateCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public TemplateCreateVM name(String name) { - this.name = name; + public TemplateCreateVM $t(String $t) { + this.$t = $t; return this; } /** - * Get name - * @return name + * Get $t + * @return $t **/ - @javax.annotation.Nullable - public String getName() { - return name; + @javax.annotation.Nonnull + public String get$T() { + return $t; } - public void setName(String name) { - this.name = name; - } - - - public TemplateCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public TemplateCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public TemplateCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - - public TemplateCreateVM content(byte[] content) { - this.content = content; - return this; - } - - /** - * Get content - * @return content - **/ - @javax.annotation.Nullable - public byte[] getContent() { - return content; - } - - public void setContent(byte[] content) { - this.content = content; + public void set$T(String $t) { + this.$t = $t; } @@ -167,10 +92,8 @@ public boolean equals(Object o) { return false; } TemplateCreateVM templateCreateVM = (TemplateCreateVM) o; - return Objects.equals(this.name, templateCreateVM.name) && - Objects.equals(this.tags, templateCreateVM.tags) && - Arrays.equals(this.icon, templateCreateVM.icon) && - Arrays.equals(this.content, templateCreateVM.content); + return Objects.equals(this.$t, templateCreateVM.$t) && + super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -179,7 +102,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon), Arrays.hashCode(content)); + return Objects.hash($t, super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -193,10 +116,8 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TemplateCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" $t: ").append(toIndentedString($t)).append("\n"); sb.append("}"); return sb.toString(); } @@ -223,9 +144,11 @@ private String toIndentedString(Object o) { openapiFields.add("tags"); openapiFields.add("icon"); openapiFields.add("content"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -241,51 +164,19 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } - Set> entries = jsonElement.getAsJsonObject().entrySet(); - // check to see if the JSON string contains additional fields - for (Map.Entry entry : entries) { - if (!TemplateCreateVM.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplateCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + String discriminatorValue = jsonElement.getAsJsonObject().get("$t").getAsString(); + switch (discriminatorValue) { + case "TemplateCreateAdminVM": + TemplateCreateAdminVM.validateJsonElement(jsonElement); + break; + case "TemplateCreateVM": + TemplateCreateVM.validateJsonElement(jsonElement); + break; + default: + throw new IllegalArgumentException(String.format("The value of the `$t` field `%s` does not match any key defined in the discriminator's mapping.", discriminatorValue)); } } - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!TemplateCreateVM.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'TemplateCreateVM' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(TemplateCreateVM.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, TemplateCreateVM value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public TemplateCreateVM read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - return thisAdapter.fromJsonTree(jsonElement); - } - - }.nullSafe(); - } - } /** * Create an instance of TemplateCreateVM given an JSON string diff --git a/src/main/java/cloud/fastreport/model/TemplateFolderCreateVM.java b/src/main/java/cloud/fastreport/model/TemplateFolderCreateVM.java index 40e536c..5870c1d 100644 --- a/src/main/java/cloud/fastreport/model/TemplateFolderCreateVM.java +++ b/src/main/java/cloud/fastreport/model/TemplateFolderCreateVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -53,87 +54,11 @@ * TemplateFolderCreateVM */ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class TemplateFolderCreateVM { - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_TAGS = "tags"; - @SerializedName(SERIALIZED_NAME_TAGS) - private List tags; - - public static final String SERIALIZED_NAME_ICON = "icon"; - @SerializedName(SERIALIZED_NAME_ICON) - private byte[] icon; - +public class TemplateFolderCreateVM extends FolderCreateVM { public TemplateFolderCreateVM() { + this.$t = this.getClass().getSimpleName(); } - public TemplateFolderCreateVM name(String name) { - this.name = name; - return this; - } - - /** - * Get name - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - - public TemplateFolderCreateVM tags(List tags) { - this.tags = tags; - return this; - } - - public TemplateFolderCreateVM addTagsItem(String tagsItem) { - if (this.tags == null) { - this.tags = new ArrayList<>(); - } - this.tags.add(tagsItem); - return this; - } - - /** - * Get tags - * @return tags - **/ - @javax.annotation.Nullable - public List getTags() { - return tags; - } - - public void setTags(List tags) { - this.tags = tags; - } - - - public TemplateFolderCreateVM icon(byte[] icon) { - this.icon = icon; - return this; - } - - /** - * Get icon - * @return icon - **/ - @javax.annotation.Nullable - public byte[] getIcon() { - return icon; - } - - public void setIcon(byte[] icon) { - this.icon = icon; - } - - @Override public boolean equals(Object o) { @@ -143,10 +68,7 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - TemplateFolderCreateVM templateFolderCreateVM = (TemplateFolderCreateVM) o; - return Objects.equals(this.name, templateFolderCreateVM.name) && - Objects.equals(this.tags, templateFolderCreateVM.tags) && - Arrays.equals(this.icon, templateFolderCreateVM.icon); + return super.equals(o); } private static boolean equalsNullable(JsonNullable a, JsonNullable b) { @@ -155,7 +77,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(name, tags, Arrays.hashCode(icon)); + return Objects.hash(super.hashCode()); } private static int hashCodeNullable(JsonNullable a) { @@ -169,9 +91,7 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class TemplateFolderCreateVM {\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); - sb.append(" icon: ").append(toIndentedString(icon)).append("\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append("}"); return sb.toString(); } @@ -197,9 +117,11 @@ private String toIndentedString(Object o) { openapiFields.add("name"); openapiFields.add("tags"); openapiFields.add("icon"); + openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("$t"); } /** @@ -222,13 +144,12 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TemplateFolderCreateVM` properties. JSON: %s", entry.getKey(), jsonElement.toString())); } } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : TemplateFolderCreateVM.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } } } diff --git a/src/main/java/cloud/fastreport/model/TemplateVM.java b/src/main/java/cloud/fastreport/model/TemplateVM.java index 7372621..90163c2 100644 --- a/src/main/java/cloud/fastreport/model/TemplateVM.java +++ b/src/main/java/cloud/fastreport/model/TemplateVM.java @@ -14,6 +14,9 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.FileStatus; +import cloud.fastreport.model.FileStatusReason; +import cloud.fastreport.model.FileType; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.ReportInfo; import com.google.gson.TypeAdapter; @@ -23,7 +26,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -145,6 +150,17 @@ private String toIndentedString(Object o) { openapiFields.add("creatorUserId"); openapiFields.add("editedTime"); openapiFields.add("editorUserId"); + openapiFields.add("name"); + openapiFields.add("parentId"); + openapiFields.add("tags"); + openapiFields.add("icon"); + openapiFields.add("type"); + openapiFields.add("size"); + openapiFields.add("subscriptionId"); + openapiFields.add("status"); + openapiFields.add("statusReason"); + openapiFields.add("errorMessage"); + openapiFields.add("isDeleted"); openapiFields.add("$t"); // a set of required properties/fields (JSON key names) diff --git a/src/main/java/cloud/fastreport/model/UpdateEmailTaskVM.java b/src/main/java/cloud/fastreport/model/UpdateEmailTaskVM.java index 53b46ff..a786431 100644 --- a/src/main/java/cloud/fastreport/model/UpdateEmailTaskVM.java +++ b/src/main/java/cloud/fastreport/model/UpdateEmailTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.UpdateTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -374,10 +375,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/UpdateExportReportTaskVM.java b/src/main/java/cloud/fastreport/model/UpdateExportReportTaskVM.java index 75b78e5..7c76263 100644 --- a/src/main/java/cloud/fastreport/model/UpdateExportReportTaskVM.java +++ b/src/main/java/cloud/fastreport/model/UpdateExportReportTaskVM.java @@ -15,6 +15,8 @@ import java.util.Objects; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.UpdateTransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -23,8 +25,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -227,10 +231,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transportIds"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/UpdateExportTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/UpdateExportTemplateTaskVM.java index 27a7d18..d0f35c2 100644 --- a/src/main/java/cloud/fastreport/model/UpdateExportTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/UpdateExportTemplateTaskVM.java @@ -14,6 +14,9 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.UpdateExportReportTaskVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -22,8 +25,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; @@ -149,10 +154,17 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("exportParameters"); + openapiFields.add("format"); + openapiFields.add("pagesCount"); + openapiFields.add("$t"); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transportIds"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/UpdateFTPUploadTaskVM.java b/src/main/java/cloud/fastreport/model/UpdateFTPUploadTaskVM.java index bf7a550..5c99bef 100644 --- a/src/main/java/cloud/fastreport/model/UpdateFTPUploadTaskVM.java +++ b/src/main/java/cloud/fastreport/model/UpdateFTPUploadTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.UpdateTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -314,10 +315,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVM.java b/src/main/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVM.java index 4c2ba76..b3d6772 100644 --- a/src/main/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVM.java +++ b/src/main/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVM.java @@ -14,6 +14,8 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.UpdateTransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -211,10 +213,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("locale"); + openapiFields.add("outputFile"); + openapiFields.add("transportIds"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/UpdateWebhookTaskVM.java b/src/main/java/cloud/fastreport/model/UpdateWebhookTaskVM.java index 4e55148..f852022 100644 --- a/src/main/java/cloud/fastreport/model/UpdateWebhookTaskVM.java +++ b/src/main/java/cloud/fastreport/model/UpdateWebhookTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.UpdateTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -175,10 +176,11 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("name"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/main/java/cloud/fastreport/model/WebhookTaskVM.java b/src/main/java/cloud/fastreport/model/WebhookTaskVM.java index 861978d..06142cc 100644 --- a/src/main/java/cloud/fastreport/model/WebhookTaskVM.java +++ b/src/main/java/cloud/fastreport/model/WebhookTaskVM.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import java.util.Objects; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.TransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -175,6 +176,8 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = new HashSet(); + openapiFields.add("inputFile"); + openapiFields.add("$t"); openapiFields.add("cronExpression"); openapiFields.add("delayedRunTime"); openapiFields.add("delayedWasRunTime"); @@ -183,7 +186,6 @@ private String toIndentedString(Object o) { openapiFields.add("recurrentRunTime"); openapiFields.add("recurrentWasRunTime"); openapiFields.add("subscriptionId"); - openapiFields.add("$t"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); diff --git a/src/test/java/cloud/fastreport/client/ExportsApiTest.java b/src/test/java/cloud/fastreport/client/ExportsApiTest.java index f814a7d..78698ba 100644 --- a/src/test/java/cloud/fastreport/client/ExportsApiTest.java +++ b/src/test/java/cloud/fastreport/client/ExportsApiTest.java @@ -27,6 +27,7 @@ import cloud.fastreport.model.FileTagsUpdateVM; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.FilesVM; +import cloud.fastreport.model.FolderCreateVM; import cloud.fastreport.model.FolderIconVM; import cloud.fastreport.model.FolderRenameVM; import cloud.fastreport.model.FolderSizeVM; diff --git a/src/test/java/cloud/fastreport/client/ReportsApiTest.java b/src/test/java/cloud/fastreport/client/ReportsApiTest.java index 0a4b924..05037d1 100644 --- a/src/test/java/cloud/fastreport/client/ReportsApiTest.java +++ b/src/test/java/cloud/fastreport/client/ReportsApiTest.java @@ -27,6 +27,7 @@ import cloud.fastreport.model.FileTagsUpdateVM; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.FilesVM; +import cloud.fastreport.model.FolderCreateVM; import cloud.fastreport.model.FolderIconVM; import cloud.fastreport.model.FolderRenameVM; import cloud.fastreport.model.FolderSizeVM; diff --git a/src/test/java/cloud/fastreport/client/TemplatesApiTest.java b/src/test/java/cloud/fastreport/client/TemplatesApiTest.java index 60b932a..3ba8cbd 100644 --- a/src/test/java/cloud/fastreport/client/TemplatesApiTest.java +++ b/src/test/java/cloud/fastreport/client/TemplatesApiTest.java @@ -27,6 +27,7 @@ import cloud.fastreport.model.FileTagsUpdateVM; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.FilesVM; +import cloud.fastreport.model.FolderCreateVM; import cloud.fastreport.model.FolderIconVM; import cloud.fastreport.model.FolderRenameVM; import cloud.fastreport.model.FolderSizeVM; diff --git a/src/test/java/cloud/fastreport/model/AdminExportFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/AdminExportFolderCreateVMTest.java index 1f87b48..cc8dba4 100644 --- a/src/test/java/cloud/fastreport/model/AdminExportFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/AdminExportFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.AdminFolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,38 @@ public void testAdminExportFolderCreateVM() { // TODO: test AdminExportFolderCreateVM } + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'ownerId' + */ + @Test + public void ownerIdTest() { + // TODO: test ownerId + } + + /** + * Test the property 'force' + */ + @Test + public void forceTest() { + // TODO: test force + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'name' */ diff --git a/src/test/java/cloud/fastreport/model/AdminFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/AdminFolderCreateVMTest.java index d584523..81afd1e 100644 --- a/src/test/java/cloud/fastreport/model/AdminFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/AdminFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -64,4 +65,12 @@ public void iconTest() { // TODO: test icon } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/AdminReportFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/AdminReportFolderCreateVMTest.java index 462d434..dc5b346 100644 --- a/src/test/java/cloud/fastreport/model/AdminReportFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/AdminReportFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.AdminFolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,38 @@ public void testAdminReportFolderCreateVM() { // TODO: test AdminReportFolderCreateVM } + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'ownerId' + */ + @Test + public void ownerIdTest() { + // TODO: test ownerId + } + + /** + * Test the property 'force' + */ + @Test + public void forceTest() { + // TODO: test force + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'name' */ diff --git a/src/test/java/cloud/fastreport/model/AdminSubscriptionVMTest.java b/src/test/java/cloud/fastreport/model/AdminSubscriptionVMTest.java index f166ba8..8a741e9 100644 --- a/src/test/java/cloud/fastreport/model/AdminSubscriptionVMTest.java +++ b/src/test/java/cloud/fastreport/model/AdminSubscriptionVMTest.java @@ -16,6 +16,7 @@ import cloud.fastreport.model.DefaultPermissionsVM; import cloud.fastreport.model.SubscriptionFolder; import cloud.fastreport.model.SubscriptionPeriodVM; +import cloud.fastreport.model.SubscriptionVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -107,4 +108,12 @@ public void exportsFolderTest() { // TODO: test exportsFolder } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/AdminTemplateFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/AdminTemplateFolderCreateVMTest.java index 3588eea..a4b2f8b 100644 --- a/src/test/java/cloud/fastreport/model/AdminTemplateFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/AdminTemplateFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.AdminFolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,38 @@ public void testAdminTemplateFolderCreateVM() { // TODO: test AdminTemplateFolderCreateVM } + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'ownerId' + */ + @Test + public void ownerIdTest() { + // TODO: test ownerId + } + + /** + * Test the property 'force' + */ + @Test + public void forceTest() { + // TODO: test force + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'name' */ diff --git a/src/test/java/cloud/fastreport/model/CreateDataSourceAdminVMTest.java b/src/test/java/cloud/fastreport/model/CreateDataSourceAdminVMTest.java index 19d9209..ea95c63 100644 --- a/src/test/java/cloud/fastreport/model/CreateDataSourceAdminVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateDataSourceAdminVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.CreateDataSourceVM; import cloud.fastreport.model.DataSourceConnectionType; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -71,4 +72,12 @@ public void connectionTypeTest() { // TODO: test connectionType } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/CreateDataSourceVMTest.java b/src/test/java/cloud/fastreport/model/CreateDataSourceVMTest.java index 37c8ffa..fbd4d77 100644 --- a/src/test/java/cloud/fastreport/model/CreateDataSourceVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateDataSourceVMTest.java @@ -71,4 +71,12 @@ public void connectionTypeTest() { // TODO: test connectionType } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/CreateEmailTaskVMTest.java b/src/test/java/cloud/fastreport/model/CreateEmailTaskVMTest.java index bbc7568..9435a48 100644 --- a/src/test/java/cloud/fastreport/model/CreateEmailTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateEmailTaskVMTest.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -42,6 +43,22 @@ public void testCreateEmailTaskVM() { // TODO: test CreateEmailTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -74,12 +91,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/CreateExportReportTaskVMTest.java b/src/test/java/cloud/fastreport/model/CreateExportReportTaskVMTest.java index c76c4c2..fa4ace3 100644 --- a/src/test/java/cloud/fastreport/model/CreateExportReportTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateExportReportTaskVMTest.java @@ -14,7 +14,10 @@ package cloud.fastreport.model; import cloud.fastreport.model.CreateTransformTaskBaseVM; +import cloud.fastreport.model.CreateTransportTaskBaseVM; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -22,8 +25,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -43,6 +48,46 @@ public void testCreateExportReportTaskVM() { // TODO: test CreateExportReportTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transports' + */ + @Test + public void transportsTest() { + // TODO: test transports + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -75,12 +120,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/CreateExportTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/CreateExportTemplateTaskVMTest.java index 81db050..98ebd5a 100644 --- a/src/test/java/cloud/fastreport/model/CreateExportTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateExportTemplateTaskVMTest.java @@ -14,6 +14,10 @@ package cloud.fastreport.model; import cloud.fastreport.model.CreateExportReportTaskVM; +import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,8 +25,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -42,6 +48,70 @@ public void testCreateExportTemplateTaskVM() { // TODO: test CreateExportTemplateTaskVM } + /** + * Test the property 'exportParameters' + */ + @Test + public void exportParametersTest() { + // TODO: test exportParameters + } + + /** + * Test the property 'format' + */ + @Test + public void formatTest() { + // TODO: test format + } + + /** + * Test the property 'pagesCount' + */ + @Test + public void pagesCountTest() { + // TODO: test pagesCount + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transports' + */ + @Test + public void transportsTest() { + // TODO: test transports + } + /** * Test the property 'cronExpression' */ @@ -74,12 +144,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/CreateFTPUploadTaskVMTest.java b/src/test/java/cloud/fastreport/model/CreateFTPUploadTaskVMTest.java index af779fa..cf9f0da 100644 --- a/src/test/java/cloud/fastreport/model/CreateFTPUploadTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateFTPUploadTaskVMTest.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,22 @@ public void testCreateFTPUploadTaskVM() { // TODO: test CreateFTPUploadTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -72,12 +89,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/CreateGroupAdminVMTest.java b/src/test/java/cloud/fastreport/model/CreateGroupAdminVMTest.java index 643d822..b057a5b 100644 --- a/src/test/java/cloud/fastreport/model/CreateGroupAdminVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateGroupAdminVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.CreateGroupVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -54,4 +55,12 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/CreateGroupVMTest.java b/src/test/java/cloud/fastreport/model/CreateGroupVMTest.java index f2fd2a0..53febd1 100644 --- a/src/test/java/cloud/fastreport/model/CreateGroupVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateGroupVMTest.java @@ -54,4 +54,12 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/CreatePrepareTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/CreatePrepareTemplateTaskVMTest.java index dd342a5..799b376 100644 --- a/src/test/java/cloud/fastreport/model/CreatePrepareTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreatePrepareTemplateTaskVMTest.java @@ -15,6 +15,9 @@ import cloud.fastreport.model.CreateExportReportTaskVM; import cloud.fastreport.model.CreateTransformTaskBaseVM; +import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,6 +48,46 @@ public void testCreatePrepareTemplateTaskVM() { // TODO: test CreatePrepareTemplateTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transports' + */ + @Test + public void transportsTest() { + // TODO: test transports + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -77,12 +120,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/CreateWebhookTaskVMTest.java b/src/test/java/cloud/fastreport/model/CreateWebhookTaskVMTest.java index 32d29f8..a268c45 100644 --- a/src/test/java/cloud/fastreport/model/CreateWebhookTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/CreateWebhookTaskVMTest.java @@ -14,6 +14,7 @@ package cloud.fastreport.model; import cloud.fastreport.model.CreateTransportTaskBaseVM; +import cloud.fastreport.model.InputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -43,6 +44,22 @@ public void testCreateWebhookTaskVM() { // TODO: test CreateWebhookTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -75,12 +92,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/EmailTaskVMTest.java b/src/test/java/cloud/fastreport/model/EmailTaskVMTest.java index a96bb9a..4d667f3 100644 --- a/src/test/java/cloud/fastreport/model/EmailTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/EmailTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.TransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -42,6 +43,22 @@ public void testEmailTaskVM() { // TODO: test EmailTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -106,12 +123,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/EntityVMTest.java b/src/test/java/cloud/fastreport/model/EntityVMTest.java deleted file mode 100644 index 31dd9f9..0000000 --- a/src/test/java/cloud/fastreport/model/EntityVMTest.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * FastReport Cloud - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: v1 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package cloud.fastreport.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.openapitools.jackson.nullable.JsonNullable; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -/** - * Model tests for EntityVM - */ -public class EntityVMTest { - private final EntityVM model = new EntityVM(); - - /** - * Model tests for EntityVM - */ - @Test - public void testEntityVM() { - // TODO: test EntityVM - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'createdTime' - */ - @Test - public void createdTimeTest() { - // TODO: test createdTime - } - - /** - * Test the property 'creatorUserId' - */ - @Test - public void creatorUserIdTest() { - // TODO: test creatorUserId - } - - /** - * Test the property 'editedTime' - */ - @Test - public void editedTimeTest() { - // TODO: test editedTime - } - - /** - * Test the property 'editorUserId' - */ - @Test - public void editorUserIdTest() { - // TODO: test editorUserId - } - - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - -} diff --git a/src/test/java/cloud/fastreport/model/ExportCreateAdminVMTest.java b/src/test/java/cloud/fastreport/model/ExportCreateAdminVMTest.java index 3869bf2..295d2d7 100644 --- a/src/test/java/cloud/fastreport/model/ExportCreateAdminVMTest.java +++ b/src/test/java/cloud/fastreport/model/ExportCreateAdminVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.ExportCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,30 @@ public void testExportCreateAdminVM() { // TODO: test ExportCreateAdminVM } + /** + * Test the property 'templateId' + */ + @Test + public void templateIdTest() { + // TODO: test templateId + } + + /** + * Test the property 'reportId' + */ + @Test + public void reportIdTest() { + // TODO: test reportId + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'name' */ diff --git a/src/test/java/cloud/fastreport/model/ExportCreateVMTest.java b/src/test/java/cloud/fastreport/model/ExportCreateVMTest.java index 92aeabf..4ec33c7 100644 --- a/src/test/java/cloud/fastreport/model/ExportCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/ExportCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FileCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -72,4 +73,12 @@ public void contentTest() { // TODO: test content } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/ExportFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/ExportFolderCreateVMTest.java index d24d5d3..078d504 100644 --- a/src/test/java/cloud/fastreport/model/ExportFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/ExportFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -64,4 +65,12 @@ public void iconTest() { // TODO: test icon } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/ExportReportTaskVMTest.java b/src/test/java/cloud/fastreport/model/ExportReportTaskVMTest.java index 1c1b63f..c550913 100644 --- a/src/test/java/cloud/fastreport/model/ExportReportTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/ExportReportTaskVMTest.java @@ -14,6 +14,8 @@ package cloud.fastreport.model; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.TransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -22,8 +24,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -43,6 +47,46 @@ public void testExportReportTaskVM() { // TODO: test ExportReportTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transportIds' + */ + @Test + public void transportIdsTest() { + // TODO: test transportIds + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -107,12 +151,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/ExportTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/ExportTemplateTaskVMTest.java index 957f2aa..27f4971 100644 --- a/src/test/java/cloud/fastreport/model/ExportTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/ExportTemplateTaskVMTest.java @@ -13,7 +13,10 @@ package cloud.fastreport.model; +import cloud.fastreport.model.ExportFormat; import cloud.fastreport.model.ExportReportTaskVM; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,8 +24,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -42,6 +47,70 @@ public void testExportTemplateTaskVM() { // TODO: test ExportTemplateTaskVM } + /** + * Test the property 'exportParameters' + */ + @Test + public void exportParametersTest() { + // TODO: test exportParameters + } + + /** + * Test the property 'format' + */ + @Test + public void formatTest() { + // TODO: test format + } + + /** + * Test the property 'pagesCount' + */ + @Test + public void pagesCountTest() { + // TODO: test pagesCount + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transportIds' + */ + @Test + public void transportIdsTest() { + // TODO: test transportIds + } + /** * Test the property 'cronExpression' */ @@ -106,12 +175,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/ExportVMTest.java b/src/test/java/cloud/fastreport/model/ExportVMTest.java index 5134026..1a5c7f6 100644 --- a/src/test/java/cloud/fastreport/model/ExportVMTest.java +++ b/src/test/java/cloud/fastreport/model/ExportVMTest.java @@ -14,6 +14,9 @@ package cloud.fastreport.model; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.FileStatus; +import cloud.fastreport.model.FileStatusReason; +import cloud.fastreport.model.FileType; import cloud.fastreport.model.FileVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -22,7 +25,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -81,6 +86,94 @@ public void editorUserIdTest() { // TODO: test editorUserId } + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'icon' + */ + @Test + public void iconTest() { + // TODO: test icon + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'statusReason' + */ + @Test + public void statusReasonTest() { + // TODO: test statusReason + } + + /** + * Test the property 'errorMessage' + */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** + * Test the property 'isDeleted' + */ + @Test + public void isDeletedTest() { + // TODO: test isDeleted + } + /** * Test the property '$t' */ diff --git a/src/test/java/cloud/fastreport/model/FTPUploadTaskVMTest.java b/src/test/java/cloud/fastreport/model/FTPUploadTaskVMTest.java index e2f2278..b0696cd 100644 --- a/src/test/java/cloud/fastreport/model/FTPUploadTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/FTPUploadTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.TransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -40,6 +41,22 @@ public void testFTPUploadTaskVM() { // TODO: test FTPUploadTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -104,12 +121,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/FileCreateVMTest.java b/src/test/java/cloud/fastreport/model/FileCreateVMTest.java index e95cbbf..39edb87 100644 --- a/src/test/java/cloud/fastreport/model/FileCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/FileCreateVMTest.java @@ -72,4 +72,12 @@ public void contentTest() { // TODO: test content } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/FileVMTest.java b/src/test/java/cloud/fastreport/model/FileVMTest.java index 7b59cf6..0195bef 100644 --- a/src/test/java/cloud/fastreport/model/FileVMTest.java +++ b/src/test/java/cloud/fastreport/model/FileVMTest.java @@ -13,7 +13,6 @@ package cloud.fastreport.model; -import cloud.fastreport.model.EntityVM; import cloud.fastreport.model.FileStatus; import cloud.fastreport.model.FileStatusReason; import cloud.fastreport.model.FileType; @@ -85,6 +84,94 @@ public void editorUserIdTest() { // TODO: test editorUserId } + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'icon' + */ + @Test + public void iconTest() { + // TODO: test icon + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'statusReason' + */ + @Test + public void statusReasonTest() { + // TODO: test statusReason + } + + /** + * Test the property 'errorMessage' + */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** + * Test the property 'isDeleted' + */ + @Test + public void isDeletedTest() { + // TODO: test isDeleted + } + /** * Test the property '$t' */ diff --git a/src/test/java/cloud/fastreport/model/FolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/FolderCreateVMTest.java index 1099621..b0a98c5 100644 --- a/src/test/java/cloud/fastreport/model/FolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/FolderCreateVMTest.java @@ -64,4 +64,12 @@ public void iconTest() { // TODO: test icon } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/PrepareTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/PrepareTemplateTaskVMTest.java index 510b26a..a3a1f24 100644 --- a/src/test/java/cloud/fastreport/model/PrepareTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/PrepareTemplateTaskVMTest.java @@ -13,6 +13,8 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.TransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,6 +46,46 @@ public void testPrepareTemplateTaskVM() { // TODO: test PrepareTemplateTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transportIds' + */ + @Test + public void transportIdsTest() { + // TODO: test transportIds + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -108,12 +150,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/ReportCreateAdminVMTest.java b/src/test/java/cloud/fastreport/model/ReportCreateAdminVMTest.java index 0a948c7..9830c37 100644 --- a/src/test/java/cloud/fastreport/model/ReportCreateAdminVMTest.java +++ b/src/test/java/cloud/fastreport/model/ReportCreateAdminVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.ReportCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,22 @@ public void testReportCreateAdminVM() { // TODO: test ReportCreateAdminVM } + /** + * Test the property 'templateId' + */ + @Test + public void templateIdTest() { + // TODO: test templateId + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'name' */ diff --git a/src/test/java/cloud/fastreport/model/ReportCreateVMTest.java b/src/test/java/cloud/fastreport/model/ReportCreateVMTest.java index ebd3a57..21b9265 100644 --- a/src/test/java/cloud/fastreport/model/ReportCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/ReportCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FileCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -72,4 +73,12 @@ public void contentTest() { // TODO: test content } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/ReportFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/ReportFolderCreateVMTest.java index d124e8d..f124ee2 100644 --- a/src/test/java/cloud/fastreport/model/ReportFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/ReportFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -64,4 +65,12 @@ public void iconTest() { // TODO: test icon } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/ReportVMTest.java b/src/test/java/cloud/fastreport/model/ReportVMTest.java index a0cf7fc..fda7128 100644 --- a/src/test/java/cloud/fastreport/model/ReportVMTest.java +++ b/src/test/java/cloud/fastreport/model/ReportVMTest.java @@ -13,6 +13,9 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FileStatus; +import cloud.fastreport.model.FileStatusReason; +import cloud.fastreport.model.FileType; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.ReportInfo; import com.google.gson.TypeAdapter; @@ -22,7 +25,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -81,6 +86,94 @@ public void editorUserIdTest() { // TODO: test editorUserId } + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'icon' + */ + @Test + public void iconTest() { + // TODO: test icon + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'statusReason' + */ + @Test + public void statusReasonTest() { + // TODO: test statusReason + } + + /** + * Test the property 'errorMessage' + */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** + * Test the property 'isDeleted' + */ + @Test + public void isDeletedTest() { + // TODO: test isDeleted + } + /** * Test the property '$t' */ diff --git a/src/test/java/cloud/fastreport/model/RunEmailTaskVMTest.java b/src/test/java/cloud/fastreport/model/RunEmailTaskVMTest.java index 174d5b7..d0011e1 100644 --- a/src/test/java/cloud/fastreport/model/RunEmailTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/RunEmailTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -42,11 +43,11 @@ public void testRunEmailTaskVM() { } /** - * Test the property 'subscriptionId' + * Test the property 'inputFile' */ @Test - public void subscriptionIdTest() { - // TODO: test subscriptionId + public void inputFileTest() { + // TODO: test inputFile } /** @@ -57,4 +58,12 @@ public void subscriptionIdTest() { // TODO: test $t } + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + } diff --git a/src/test/java/cloud/fastreport/model/RunExportReportTaskVMTest.java b/src/test/java/cloud/fastreport/model/RunExportReportTaskVMTest.java index 1401fbb..1e63534 100644 --- a/src/test/java/cloud/fastreport/model/RunExportReportTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/RunExportReportTaskVMTest.java @@ -14,15 +14,20 @@ package cloud.fastreport.model; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.OutputFileVM; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransformTaskBaseVM; +import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -43,11 +48,35 @@ public void testRunExportReportTaskVM() { } /** - * Test the property 'subscriptionId' + * Test the property 'inputFile' */ @Test - public void subscriptionIdTest() { - // TODO: test subscriptionId + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transports' + */ + @Test + public void transportsTest() { + // TODO: test transports } /** @@ -58,4 +87,12 @@ public void subscriptionIdTest() { // TODO: test $t } + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + } diff --git a/src/test/java/cloud/fastreport/model/RunExportTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/RunExportTemplateTaskVMTest.java index 5fa428e..4a1821d 100644 --- a/src/test/java/cloud/fastreport/model/RunExportTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/RunExportTemplateTaskVMTest.java @@ -13,15 +13,21 @@ package cloud.fastreport.model; +import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.RunExportReportTaskVM; +import cloud.fastreport.model.RunInputFileVM; +import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -42,11 +48,27 @@ public void testRunExportTemplateTaskVM() { } /** - * Test the property 'subscriptionId' + * Test the property 'exportParameters' */ @Test - public void subscriptionIdTest() { - // TODO: test subscriptionId + public void exportParametersTest() { + // TODO: test exportParameters + } + + /** + * Test the property 'format' + */ + @Test + public void formatTest() { + // TODO: test format + } + + /** + * Test the property 'pagesCount' + */ + @Test + public void pagesCountTest() { + // TODO: test pagesCount } /** @@ -57,4 +79,44 @@ public void subscriptionIdTest() { // TODO: test $t } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transports' + */ + @Test + public void transportsTest() { + // TODO: test transports + } + + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + } diff --git a/src/test/java/cloud/fastreport/model/RunFTPUploadTaskVMTest.java b/src/test/java/cloud/fastreport/model/RunFTPUploadTaskVMTest.java index 2ebae40..737b100 100644 --- a/src/test/java/cloud/fastreport/model/RunFTPUploadTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/RunFTPUploadTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -40,11 +41,11 @@ public void testRunFTPUploadTaskVM() { } /** - * Test the property 'subscriptionId' + * Test the property 'inputFile' */ @Test - public void subscriptionIdTest() { - // TODO: test subscriptionId + public void inputFileTest() { + // TODO: test inputFile } /** @@ -55,4 +56,12 @@ public void subscriptionIdTest() { // TODO: test $t } + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + } diff --git a/src/test/java/cloud/fastreport/model/RunPrepareTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/RunPrepareTemplateTaskVMTest.java index e03c095..bd29406 100644 --- a/src/test/java/cloud/fastreport/model/RunPrepareTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/RunPrepareTemplateTaskVMTest.java @@ -13,8 +13,11 @@ package cloud.fastreport.model; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.RunExportReportTaskVM; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransformTaskBaseVM; +import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -45,11 +48,35 @@ public void testRunPrepareTemplateTaskVM() { } /** - * Test the property 'subscriptionId' + * Test the property 'inputFile' */ @Test - public void subscriptionIdTest() { - // TODO: test subscriptionId + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transports' + */ + @Test + public void transportsTest() { + // TODO: test transports } /** @@ -60,4 +87,12 @@ public void subscriptionIdTest() { // TODO: test $t } + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + } diff --git a/src/test/java/cloud/fastreport/model/RunWebhookTaskVMTest.java b/src/test/java/cloud/fastreport/model/RunWebhookTaskVMTest.java index ca49084..0659375 100644 --- a/src/test/java/cloud/fastreport/model/RunWebhookTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/RunWebhookTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.RunInputFileVM; import cloud.fastreport.model.RunTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,11 +44,11 @@ public void testRunWebhookTaskVM() { } /** - * Test the property 'subscriptionId' + * Test the property 'inputFile' */ @Test - public void subscriptionIdTest() { - // TODO: test subscriptionId + public void inputFileTest() { + // TODO: test inputFile } /** @@ -58,4 +59,12 @@ public void subscriptionIdTest() { // TODO: test $t } + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + } diff --git a/src/test/java/cloud/fastreport/model/SubscriptionVMTest.java b/src/test/java/cloud/fastreport/model/SubscriptionVMTest.java index 3cca8f8..c8fa94a 100644 --- a/src/test/java/cloud/fastreport/model/SubscriptionVMTest.java +++ b/src/test/java/cloud/fastreport/model/SubscriptionVMTest.java @@ -106,4 +106,12 @@ public void exportsFolderTest() { // TODO: test exportsFolder } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/TemplateCreateAdminVMTest.java b/src/test/java/cloud/fastreport/model/TemplateCreateAdminVMTest.java index 3e35f5c..9efebef 100644 --- a/src/test/java/cloud/fastreport/model/TemplateCreateAdminVMTest.java +++ b/src/test/java/cloud/fastreport/model/TemplateCreateAdminVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.TemplateCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -40,6 +41,14 @@ public void testTemplateCreateAdminVM() { // TODO: test TemplateCreateAdminVM } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'name' */ diff --git a/src/test/java/cloud/fastreport/model/TemplateCreateVMTest.java b/src/test/java/cloud/fastreport/model/TemplateCreateVMTest.java index e03b5c2..0c6a279 100644 --- a/src/test/java/cloud/fastreport/model/TemplateCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/TemplateCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FileCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -72,4 +73,12 @@ public void contentTest() { // TODO: test content } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/TemplateFolderCreateVMTest.java b/src/test/java/cloud/fastreport/model/TemplateFolderCreateVMTest.java index 7afe95f..2116329 100644 --- a/src/test/java/cloud/fastreport/model/TemplateFolderCreateVMTest.java +++ b/src/test/java/cloud/fastreport/model/TemplateFolderCreateVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FolderCreateVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -64,4 +65,12 @@ public void iconTest() { // TODO: test icon } + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + } diff --git a/src/test/java/cloud/fastreport/model/TemplateVMTest.java b/src/test/java/cloud/fastreport/model/TemplateVMTest.java index 23295aa..115c56e 100644 --- a/src/test/java/cloud/fastreport/model/TemplateVMTest.java +++ b/src/test/java/cloud/fastreport/model/TemplateVMTest.java @@ -13,6 +13,9 @@ package cloud.fastreport.model; +import cloud.fastreport.model.FileStatus; +import cloud.fastreport.model.FileStatusReason; +import cloud.fastreport.model.FileType; import cloud.fastreport.model.FileVM; import cloud.fastreport.model.ReportInfo; import com.google.gson.TypeAdapter; @@ -22,7 +25,9 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -81,6 +86,94 @@ public void editorUserIdTest() { // TODO: test editorUserId } + /** + * Test the property 'name' + */ + @Test + public void nameTest() { + // TODO: test name + } + + /** + * Test the property 'parentId' + */ + @Test + public void parentIdTest() { + // TODO: test parentId + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'icon' + */ + @Test + public void iconTest() { + // TODO: test icon + } + + /** + * Test the property 'type' + */ + @Test + public void typeTest() { + // TODO: test type + } + + /** + * Test the property 'size' + */ + @Test + public void sizeTest() { + // TODO: test size + } + + /** + * Test the property 'subscriptionId' + */ + @Test + public void subscriptionIdTest() { + // TODO: test subscriptionId + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'statusReason' + */ + @Test + public void statusReasonTest() { + // TODO: test statusReason + } + + /** + * Test the property 'errorMessage' + */ + @Test + public void errorMessageTest() { + // TODO: test errorMessage + } + + /** + * Test the property 'isDeleted' + */ + @Test + public void isDeletedTest() { + // TODO: test isDeleted + } + /** * Test the property '$t' */ diff --git a/src/test/java/cloud/fastreport/model/UpdateEmailTaskVMTest.java b/src/test/java/cloud/fastreport/model/UpdateEmailTaskVMTest.java index db4becb..7a8131e 100644 --- a/src/test/java/cloud/fastreport/model/UpdateEmailTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/UpdateEmailTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.UpdateTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -42,6 +43,22 @@ public void testUpdateEmailTaskVM() { // TODO: test UpdateEmailTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -66,12 +83,4 @@ public void nameTest() { // TODO: test name } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/UpdateExportReportTaskVMTest.java b/src/test/java/cloud/fastreport/model/UpdateExportReportTaskVMTest.java index c8b78fc..c065466 100644 --- a/src/test/java/cloud/fastreport/model/UpdateExportReportTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/UpdateExportReportTaskVMTest.java @@ -14,6 +14,8 @@ package cloud.fastreport.model; import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.UpdateTransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -22,8 +24,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -43,6 +47,46 @@ public void testUpdateExportReportTaskVM() { // TODO: test UpdateExportReportTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transportIds' + */ + @Test + public void transportIdsTest() { + // TODO: test transportIds + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -67,12 +111,4 @@ public void nameTest() { // TODO: test name } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/UpdateExportTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/UpdateExportTemplateTaskVMTest.java index ec2677f..bec54fb 100644 --- a/src/test/java/cloud/fastreport/model/UpdateExportTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/UpdateExportTemplateTaskVMTest.java @@ -13,6 +13,9 @@ package cloud.fastreport.model; +import cloud.fastreport.model.ExportFormat; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.UpdateExportReportTaskVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -21,8 +24,10 @@ import com.google.gson.stream.JsonWriter; import java.io.IOException; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; +import java.util.List; import java.util.Map; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; @@ -42,6 +47,70 @@ public void testUpdateExportTemplateTaskVM() { // TODO: test UpdateExportTemplateTaskVM } + /** + * Test the property 'exportParameters' + */ + @Test + public void exportParametersTest() { + // TODO: test exportParameters + } + + /** + * Test the property 'format' + */ + @Test + public void formatTest() { + // TODO: test format + } + + /** + * Test the property 'pagesCount' + */ + @Test + public void pagesCountTest() { + // TODO: test pagesCount + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transportIds' + */ + @Test + public void transportIdsTest() { + // TODO: test transportIds + } + /** * Test the property 'cronExpression' */ @@ -66,12 +135,4 @@ public void nameTest() { // TODO: test name } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/UpdateFTPUploadTaskVMTest.java b/src/test/java/cloud/fastreport/model/UpdateFTPUploadTaskVMTest.java index 3bcf786..7ee530c 100644 --- a/src/test/java/cloud/fastreport/model/UpdateFTPUploadTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/UpdateFTPUploadTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.UpdateTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -40,6 +41,22 @@ public void testUpdateFTPUploadTaskVM() { // TODO: test UpdateFTPUploadTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -64,12 +81,4 @@ public void nameTest() { // TODO: test name } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVMTest.java b/src/test/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVMTest.java index 2b6be2e..5920980 100644 --- a/src/test/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/UpdatePrepareTemplateTaskVMTest.java @@ -13,6 +13,8 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; +import cloud.fastreport.model.OutputFileVM; import cloud.fastreport.model.UpdateTransformTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -44,6 +46,46 @@ public void testUpdatePrepareTemplateTaskVM() { // TODO: test UpdatePrepareTemplateTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property 'locale' + */ + @Test + public void localeTest() { + // TODO: test locale + } + + /** + * Test the property 'outputFile' + */ + @Test + public void outputFileTest() { + // TODO: test outputFile + } + + /** + * Test the property 'transportIds' + */ + @Test + public void transportIdsTest() { + // TODO: test transportIds + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -68,12 +110,4 @@ public void nameTest() { // TODO: test name } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/UpdateWebhookTaskVMTest.java b/src/test/java/cloud/fastreport/model/UpdateWebhookTaskVMTest.java index 4a4bbea..33624dc 100644 --- a/src/test/java/cloud/fastreport/model/UpdateWebhookTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/UpdateWebhookTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.UpdateTransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,6 +44,22 @@ public void testUpdateWebhookTaskVM() { // TODO: test UpdateWebhookTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -67,12 +84,4 @@ public void nameTest() { // TODO: test name } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - } diff --git a/src/test/java/cloud/fastreport/model/WebhookTaskVMTest.java b/src/test/java/cloud/fastreport/model/WebhookTaskVMTest.java index ad99989..a875692 100644 --- a/src/test/java/cloud/fastreport/model/WebhookTaskVMTest.java +++ b/src/test/java/cloud/fastreport/model/WebhookTaskVMTest.java @@ -13,6 +13,7 @@ package cloud.fastreport.model; +import cloud.fastreport.model.InputFileVM; import cloud.fastreport.model.TransportTaskBaseVM; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; @@ -43,6 +44,22 @@ public void testWebhookTaskVM() { // TODO: test WebhookTaskVM } + /** + * Test the property 'inputFile' + */ + @Test + public void inputFileTest() { + // TODO: test inputFile + } + + /** + * Test the property '$t' + */ + @Test + public void $tTest() { + // TODO: test $t + } + /** * Test the property 'cronExpression' */ @@ -107,12 +124,4 @@ public void subscriptionIdTest() { // TODO: test subscriptionId } - /** - * Test the property '$t' - */ - @Test - public void $tTest() { - // TODO: test $t - } - }